Unable to reinstall Sony SmartWatch emergency control

I hope this is not common, but I am developing an application for Sony SmartWatch. When ever I make a mistake, for example, excluding the null pointer exception. I cannot get my application to restart. As if he is in a broken state forever. To make matters worse, I also stopped receiving messages through Logcat related to the application. When I uninstall and reinstall the application, it is not listed in the SmartWatch application on the phone. As if he is not registering. This is difficult to fix, because at the moment I am not receiving log messages. The only thing I can do is uninstall the application. Reboot my phone. Then reinstall the application. At this point, he returns to normal, and I can start writing code again. Therefore, I am interested in my questions. Is there a better way to re-register a control? Will this happen to end users? If they need to uninstall, restart and install for recovery if the application crashes?

Some information (names have been changed to protect inappropriate):

I created a Broadcast repeater and installed it in my mainfest to listen to these broadcasts.

<receiver android:name=".MyExtensionReceiver" > <intent-filter> <!-- Receiver intents --> <action android:name="com.sonyericsson.extras.liveware.aef.registration.EXTENSION_REGISTER_REQUEST" /> <action android:name="com.sonyericsson.extras.liveware.aef.registration.ACCESSORY_CONNECTION" /> <!-- Control intents --> <action android:name="com.sonyericsson.extras.aef.control.START" /> <action android:name="com.sonyericsson.extras.aef.control.STOP" /> <action android:name="com.sonyericsson.extras.aef.control.PAUSE" /> <action android:name="com.sonyericsson.extras.aef.control.RESUME" /> <action android:name="com.sonyericsson.extras.aef.control.ERROR" /> <action android:name="com.sonyericsson.extras.aef.control.TOUCH_EVENT" /> <action android:name="com.sonyericsson.extras.aef.control.SWIPE_EVENT" /> </intent-filter> 

Code for MyExtensionReceiver:

  public class MyExtensionReceiver extends BroadcastReceiver { public MyExtensionReceiver() { super(); Log.d("mytag", "MyExtensionReceiver Loaded"); Dbg.setLogTag("mytag"); } @Override public void onReceive(Context context, Intent intent) { Log.d("mytag", "onReceive: " + intent.getAction()); intent.setClass(context, MyExtensionReceiver.class); context.startService(intent); } 

}

Even if my application crashes, I still need to get a log message when onReceive is called. This is similar to passing EXTENSION_REGISTER_REQUEST, which is never sent. I just keep deleting the reboot and reinstall again and again. Ultimately, the application finds the SmartConnect application.

+6
source share
2 answers

This seems to have nothing to do with BroadcastReceiver. Without using one, I have the same unpleasant problem. I need to restart the phone in order to start working normally again, since neither turning off / turning on the application helps nor does it kill the SmartWatch application for the phone (since I see no other way to restart it).

I would also appreciate Sony's help in this matter.

0
source

Just stumbled upon this problem, giving a little gray! To work around this problem, simply create a new intent using the string and run with context.

 Intent intent = new Intent("MY.PACKAGE.NAME.MyExtensionReceiver"); context.startService(intent); 
0
source

All Articles