Reputation: 4421
When I open my Preferences via Smart Extension emulator, under tab Controls, menu Extension Preferences, click SampleControlExtension settings. I get:
android.content.ActivityNotFoundException: Unable to find explicit activity class {com.sonyericsson.extras.liveware.extension.q/com.sonyericsson.extras.liveware.extension.q.SamplePreferenceActivity}; have you declared this activity in your AndroidManifest.xml?
This combination does not work in the SmartWatch emulator:
...
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sonyericsson.extras.liveware.extension"
android:versionName="1.0.1" android:versionCode="10001">
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="10"/>
<uses-permission
android:name="com.sonyericsson.extras.liveware.aef.EXTENSION_PERMISSION" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".q.SamplePreferenceActivity" android:label="@string/preference_activity_title">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>
</activity>
<service android:name=".controlsample.SampleExtensionService" />
<receiver android:name=".controlsample.ExtensionReceiver">
<intent-filter>
...
Looks like a bug in the SmartWatch emulator?
Code link
Stacktrace:
01-21 13:01:05.963: E/AndroidRuntime(3295): FATAL EXCEPTION: main
01-21 13:01:05.963: E/AndroidRuntime(3295): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.sonyericsson.extras.liveware.extension.q/com.sonyericsson.extras.liveware.extension.q.SamplePreferenceActivity}; have you declared this activity in your AndroidManifest.xml?
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1541)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1416)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.app.Activity.startActivityForResult(Activity.java:3351)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.app.Activity.startActivityForResult(Activity.java:3312)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.app.Activity.startActivity(Activity.java:3522)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.app.Activity.startActivity(Activity.java:3490)
01-21 13:01:05.963: E/AndroidRuntime(3295): at com.sonyericsson.extras.liveware.emulator.ExtensionPreferenceActivity$1.onPreferenceClick(ExtensionPreferenceActivity.java:87)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.preference.Preference.performClick(Preference.java:944)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.preference.PreferenceScreen.onItemClick(PreferenceScreen.java:208)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.widget.AdapterView.performItemClick(AdapterView.java:298)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.widget.AbsListView.performItemClick(AbsListView.java:1086)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.widget.AbsListView$PerformClick.run(AbsListView.java:2855)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.widget.AbsListView$1.run(AbsListView.java:3529)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.os.Handler.handleCallback(Handler.java:615)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.os.Handler.dispatchMessage(Handler.java:92)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.os.Looper.loop(Looper.java:137)
01-21 13:01:05.963: E/AndroidRuntime(3295): at android.app.ActivityThread.main(ActivityThread.java:4745)
01-21 13:01:05.963: E/AndroidRuntime(3295): at java.lang.reflect.Method.invokeNative(Native Method)
01-21 13:01:05.963: E/AndroidRuntime(3295): at java.lang.reflect.Method.invoke(Method.java:511)
01-21 13:01:05.963: E/AndroidRuntime(3295): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
01-21 13:01:05.963: E/AndroidRuntime(3295): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
01-21 13:01:05.963: E/AndroidRuntime(3295): at dalvik.system.NativeStart.main(Native Method)
Upvotes: 0
Views: 421
Reputation: 805
I have downloaded your example code, imported to eclipse etc etc, but cannot reproduce the issues that you are having. Are you still having them?
And a general comment - the extension that you have implemented is a widget extension, thus it should not be visible in the Control tab of the emulator. So, I am curious how you could find the extension under this tab.
Perhaps you could update your question with some more information, and perhaps more stack trace information?
Update:
I have done some tests, and it is evident that the emulator does not behave as it should with regards to the specific circumstances of the example above. I will now check the update schedule of the Smart Extension SDK to see if we can publish a fix.
Upvotes: 1