question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pass installerPackageName on Android

See original GitHub issue

Feature 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:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

0reactions
mikehardycommented, Feb 1, 2020

I think you’re right - closing preliminarily but obviously we can chat more, cheers

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found