0

This is my manifest, it works fine in the official dashclock app but not in any other plugin host (i tested sidebar plus and a few similar apps). i always get the same error in logcat: caller is not official dashclock app and extension is not worldReadable.

        <service
        android:name=".DashClockService"
        android:icon="@drawable/ic_dashclock"
        android:label="@string/app_name"
        android:permission="com.google.android.apps.dashclock.permission.READ_EXTENSION_DATA" >

        <intent-filter>
            <action android:name="com.google.android.apps.dashclock.Extension" />
        </intent-filter>

        <meta-data android:name="protocolVersion" android:value="2" />
        <meta-data android:name="worldReadable" android:value="true" />
        <meta-data android:name="description" android:value="@string/extension_description" />
        <meta-data android:name="settingsActivity" android:value=".DashClockSettingsActivity" />
    </service>    

EDIT: Here is the log.

12-06 14:41:32.667: W/System.err(1735): java.lang.NullPointerException
12-06 14:41:32.683: W/System.err(1735):     at com.google.android.apps.dashclock.api.DashClockExtension.publishUpdate(DashClockExtension.java:354)
12-06 14:41:32.683: W/System.err(1735):     at com.myapp.DashClockService.update(DashClockService.java:126)
12-06 14:41:32.683: W/System.err(1735):     at com.myapp.DashClockService.onCreate(DashClockService.java:41)
12-06 14:41:32.687: W/System.err(1735):     at android.app.ActivityThread.handleCreateService(ActivityThread.java:2573)com.myapp12-06 14:41:32.687: W/System.err(1735):     at android.app.ActivityThread.access$1700(ActivityThread.java:145)
12-06 14:41:32.687: W/System.err(1735):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1489)
12-06 14:41:32.687: W/System.err(1735):     at android.os.Handler.dispatchMessage(Handler.java:102)
12-06 14:41:32.687: W/System.err(1735):     at android.os.Looper.loop(Looper.java:137)
12-06 14:41:32.687: W/System.err(1735):     at android.app.ActivityThread.main(ActivityThread.java:5062)
12-06 14:41:32.691: W/System.err(1735):     at java.lang.reflect.Method.invokeNative(Native Method)
12-06 14:41:32.691: W/System.err(1735):     at java.lang.reflect.Method.invoke(Method.java:515)
12-06 14:41:32.691: W/System.err(1735):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
12-06 14:41:32.691: W/System.err(1735):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
12-06 14:41:32.691: W/System.err(1735):     at dalvik.system.NativeStart.main(Native Method)
12-06 14:41:32.953: E/DashClockExtension(1735): Caller is not official DashClock app and this extension is not world-readable.
12-06 14:41:32.960: W/Binder(1735): Caught a RuntimeException from the binder stub implementation.
12-06 14:41:32.960: W/Binder(1735): java.lang.SecurityException: Caller is not official DashClock app and this extension is not world-readable.
12-06 14:41:32.960: W/Binder(1735):     at com.google.android.apps.dashclock.api.DashClockExtension$1.onInitialize(DashClockExtension.java:289)
12-06 14:41:32.960: W/Binder(1735):     at com.google.android.apps.dashclock.api.internal.IExtension$Stub.onTransact(IExtension.java:52)
12-06 14:41:32.960: W/Binder(1735):     at android.os.Binder.execTransact(Binder.java:404)
12-06 14:41:32.960: W/Binder(1735):     at dalvik.system.NativeStart.run(Native Method)

To add some additional info: The Extension shows up as available, but it won't update or initialize. The service is running.

joe1806772
  • 506
  • 6
  • 20
  • Do you see anything in the logs like "Could not load metadata (e.g. world readable) for extension."? – Roman Nurik Dec 06 '13 at 00:52
  • I updated my question. Thanks for having a look at this personally! – joe1806772 Dec 06 '13 at 13:54
  • It looks like you're trying to call `publishUpdate()` from `onCreate()`. That's not valid, `onInitialize()` hasn't been called yet. Try calling your `update()` method from `onInitialize()` instead. Still not sure why you're running into the `worldReadable` issue, but that may be related. – Roman Nurik Dec 06 '13 at 14:11
  • Thanks, i moved the update to onInitialize (along with registering my intent receiver), so i don't override onCreate any more. Now i don't get any log message and also onInitialize doesn't get called at all, this might be related to the worldReadable issue. I tested it with your DashClock app and it still works fine there (it even worked fine before when i called update from onCreate... ;) – joe1806772 Dec 06 '13 at 14:50
  • Hm, it might be related to the host app. If they don't support protocol version 2 you may need to switch to protocol version 1 if you want to support them. – Roman Nurik Dec 06 '13 at 17:00

0 Answers0