Detect from which Market place its installed

  • Replies:2
Prahallad
  • Forum posts: 2

Aug 4, 2013, 10:47:51 PM via Website

One can open market place app using:

1Intent intent = new Intent(Intent.ACTION_VIEW);
2intent.setData(Uri.parse("market://details?id=com.android.example"));
3startActivity(intent);

Cool B)

But, it may be possible that more then one market place app can be used by a user :what:. Or it's possible that they have downloaded directly from a web link. Or, say app is published in more then one market places :mellow:. Is their any way... to identify from which place .apk has been downloaded or installed? >_>

Reasun behind is: I want to place a Rate and Review button :*) inside my app. But what I need is; if any one using different market place they should go to only that place, from where, they have downlod.

Any suggestion, advise or example ?

Sory for my bad english :P I am not that good in it.

Reply
Deactivated Account
  • Forum posts: 131

Aug 15, 2013, 10:39:29 AM via Website

Hi,
Maybe this should help you to know the package name of the app that installed your app.

1PackageManager pm = getPackageManager();
2String installationSource = pm.getInstallerPackageName(getPackageName());

Hope this helps.

Prahallad

Reply
Prahallad
  • Forum posts: 2

Aug 18, 2013, 10:37:22 PM via Website

Henrique Rocha
Hi,
Maybe this should help you to know the package name of the app that installed your app.

1PackageManager pm = getPackageManager();
2String installationSource = pm.getInstallerPackageName(getPackageName());

Hope this helps.

It really helps :blink:, perfect solution. B)

Reply