Question

From my extension, I can start the Call Handling extension with this code:

 Intent i1 = new Intent("com.sonyericsson.extras.aef.control.START_REQUEST");
  i1.putExtra("aea_package_name", "com.sonyericsson.extras.liveware.extension.call");
  i1.setPackage("com.sonyericsson.extras.smartwatch");
  mContext.sendBroadcast(i1, "com.sonyericsson.extras.liveware.aef.HOSTAPP_PERMISSION");

But I cannot start my own extension, nor any other third-party extensions in the same way:

Intent i2 = new Intent("com.sonyericsson.extras.aef.control.START_REQUEST");
  i2.putExtra("aea_package_name", "eir.log");
  i2.setPackage("com.sonyericsson.extras.smartwatch");
  mContext.sendBroadcast(i2, "com.sonyericsson.extras.liveware.aef.HOSTAPP_PERMISSION");

The i2 intent works properly, when it's called from a different app, but not from an extension.

I'm puzzled. Is the Call Handling extension receiving some special treatment from the Host app, or what is the problem?

Was it helpful?

Solution

I found two ways to solve this issue:

1) Trigger stopping of the current extension before invoking the other. This happens to work with the latest SmartWatch 2, but as far as I remember, it didn't work on the original SmartWatch.

What is safer to do, in case you're starting your own extensions:

2) Define a custom intent which the extension you want to start would receive (that's, of course, done in the Manifest file); then broadcast that intent from your other extension. I chose this way, also because it enables me to pass data to the extension.

Vote up, if you find this solution useful :-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top