Same servicein multiple APKs, only want "best one" to launch

by Watcher » Fri, 18 Dec 2009 01:20:49 GMT

Sponsored Links

I have the same service in multiple APKs. In each of the APKs, I am
going to launch the serivce.
Because the APK are difference "applications" that have been installed
& upgraded at various times, the service implementation in each may be
different. I am trying to figure out a way to make sure startService()
runs the implementation that is newest.

I have been fiddling around with PackageManager and Manifest meta-data
and categories but I can't seem to get my head around it. It's really
a leader-election problem... has anyone ever done this ? Any clues ?

Thanks !


Other Threads

1. Reboot bug?

I'm trying to use the new reboot function defined here:

but I'm running into permissions issues even though I have the REBOOT
permission in my manifest:

<uses-permission android:name="android.permission.REBOOT" />

The error I see in logcat is:
E/AndroidRuntime( 5272): java.lang.SecurityException: Neither user
10059 nor current process has android.permission.REBOOT.

The REBOOT permission doesn't show up in the list of permissions for
my app even though other permissions do.  Is this a functionality that
is still protected even though it's now a part of the public API?

All of my testing so far is on a Nexus One with Android 2.2


2. Sending email by Intent... not simply composing a message

I can't see that there is a means of sending an email programmatically
by Intent, as an analog to sending an SMS.  ACTION_SENDTO simply
allows you to pre-fill-out a composition of a new email (subject,
body, addressees, etc), but not cause it to be sent.

Is this correct?



3. Desire NexTSense Official Sense-FroYo 2.2

4. apps2sd widgets

5. How to use Toast.makeText in Service

6. OMAP GPS Porting

7. Loading Modules into Android phones