On Fri, Mar 4, 2011 at 5:49 PM, Kostya Vasilyev <[email protected]> wrote:

>
> So keep this scenario in mind - either keep it really simple and just rely
> on local service, or implement measures against code changes, like
> obfuscation and signature checking.
>

Assuming you signed both with the same key, there is a simple way to do it:

PackageManager pm = getPackageManager();
boolean isMyService = pm.checkSignatures("my.service", "my.app") ==
PackageManager.SIGNATURE_MATCH;

You can do the same thing using UIDs:

PackageManager .checkSignatures (int uid1, int uid2)

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to