java - Verify Android app signature with public key? -
java - Verify Android app signature with public key? -
i'm creating unlock app remove ads , unlock premium features in few apps. plan phone call packagemanager , verify unlock app installed, , if is, verify signatures ensure it's application. i'm next reply here: detect if app downloaded android market
however, guess i'm little confused on signature i'm verifying... it's public key, correct? if so, how extract existing app or keystore?
the easiest way utilize same signing key both apps , check in main app if unlock app installed , signed same key using code this:
packagemanager manager = app.getcontext().getpackagemanager(); bool unlockappinstalled = manager.checksignatures("<main app bundle name>, "<unlock app bundle name>") == packagemanager.signature_match; unlockappinstalled true if unlock app installed , signed same key.
java android keystore
Comments
Post a Comment