Is there a way to know whether the installed application have the same signature as the one begin to install?
Asked
Active
Viewed 1,304 times
1
-
Yes. Been a very long time since I've looked at the code to do this but it's definitely possible. I think the PackageManager is able to give you the signer for an apk but I really can't recall for certain. – mah May 09 '16 at 00:44
-
1Maybe this link helps you http://stackoverflow.com/questions/5578871/how-to-get-app-signature – JpCrow May 09 '16 at 00:47
-
"as the one begin to install?" -- that part, no. Using `PackageManager` to get signatures is possible, but only for installed apps, and *maybe* for an APK that is accessible on the filesystem somewhere. – CommonsWare May 09 '16 at 01:03
1 Answers
0
You can get the signature of an app using PackageManager
:
Signature[] signatures = packageManager.getPackageInfo("packagename", PackageManager.GET_SIGNATURES).signatures;

F43nd1r
- 7,690
- 3
- 24
- 62