Can't launch oral-b app from Companion APP

I’m trying to launch an application from the companion app. The oral b app specifically. I’ve read through what I think is most of the topics relating to this but I might have missed one.

I’ve tried something along the lines of

data:
          message: "command_activity"
          data:
            intent_package_name: "com.pg.oralb.oralbapp"
            intent_action: "android.intent.action.MAIN"

I get this in the companion app logs
No Activity found to handle Intent { act=android.intent.action.MAIN flg=0x10000000 pkg=com.pg.oralb.oralbapp}

So digging in a little deeper I tried starting the app with adb using the android SDK and I get the same error.

So using aapt I was able to get the launchable activity which looks like

launchable-activity: name='com.pg.oralb.oralbapp.StartActivity'  label='' icon=''

Now if I’m in the abd shell i can run
adb shell am start com.pg.oralb.oralbapp/.StartActivity
and that will launch the app, but I just can’t seem to find the correct combination of action, pkg, and uri to get this thing launching.
Does anyone have any ideas on this?
Sorry my thoughts are a bit scattered I’m sure I have other information that’s useful but I can’t think of it at the moment.

If you just want to launch the app then you can use the direct command, the activity command is to start a specific action (if supported) by the app.

How did I miss that! I was looking through the list of commands at the start of that doc and didn’t see anything about launching apps, so I made the assumption I had to use the start activity. I added a pull request for that doc page in case someone else ever has the same oversight as me.

Thanks @dshokouhi!

1 Like