Pass installerPackageName on Android
See original GitHub issueFeature Request
Pass through installerPackageName on Android so the market the package came from can be identified.
Why it is needed
We have an app which can be installed via the playstore, via an apk , and also via various stores in China. For analytics, and for our forced updates screen, we need to be able to determine which market place the app was installed from
Possible implementation
Add a method getInstallerPackageName()
which would be implemented on Android only, and would pass the result of https://developer.android.com/reference/android/content/pm/PackageManager.html#getInstallerPackageName(java.lang.String) through.
Code sample
console.log("Device Model", DeviceInfo.getInstallerPackageName()); // e.g. com.android.vending
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Pass installerPackageName on Android · Issue #912 - GitHub
Pass through installerPackageName on Android so the market the package came from can be identified. Why it is needed. We have an app...
Read more >Can PackageManager.getInstallerPackageName() tell me that ...
So use the PackageManager.getInstalledPackages() to get all the packages and search for the samsungapp packagename "com.sec.android.app.
Read more >PackageManager - Android Developers
Passed to a package verifier and is used to call back to ... installerPackageName, String : The package name of the new installer....
Read more >PackageManagerShellCommand.java - android Git repositories
installerPackageName, installParams.userId);. // NOTE: adb depends on parsing this string. pw.println("Success: created install session [" + sessionId + "]");.
Read more >Checking if an Android app is installed via Google Play
String installerPackageName = pm.getInstallerPackageName(packageName);. However, this method was deprecated in Android API level 30.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Have started on implementing this.
https://github.com/codecog/react-native-device-info/commit/379135111f4a93bb9c4912e56021bde97c7c1b0d
I think you’re right - closing preliminarily but obviously we can chat more, cheers