Hi there I just finished my first app for Android that I want to publish. In my app I have a button which allows users to share the link, to my app in the Google Play Store. Now I don't know how to get that link, because my app isn't published yet. Thanks.
Asked
Active
Viewed 569 times
2
-
2The link for your app in Google Play is like this: https://play.google.com/store/apps/details?id=#PACKAGE_NAME# – Eliran Tutia Oct 09 '16 at 12:05
-
Possible duplicate of [How to open the Google Play Store directly from my Android application?](http://stackoverflow.com/questions/11753000/how-to-open-the-google-play-store-directly-from-my-android-application) – Masked Man Oct 09 '16 at 12:22
-
It's fully explained in [Linking to Your Products](https://developer.android.com/distribute/tools/promote/linking.html) – Masked Man Oct 09 '16 at 12:23
3 Answers
3
https://play.google.com/store/apps/details?id=<YOUR_PACKAGE_NAME>
Replace <YOUR_PACKAGE_NAME> by your package name
Ganesh Pokale
- 1,616
- 11
- 27
-
By package name you mean the Bundle identifier? I built the app using Unity3D. – Raducu Mihai Oct 09 '16 at 12:39
-
2
the right practice is to call the view intent by market schema using your package name like below:
String yourPackageName = getPackageName();
try {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + yourPackageName)));
}
catch (android.content.ActivityNotFoundException anfe) {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + yourPackageName)));
}
Amir Ziarati
- 13,390
- 11
- 42
- 50
0
You need to know the app's package name which is declared in manifest file.You can link your app -
From an Android app:-
market://details?id=<package_name>
From a web site-
http://play.google.com/store/apps/details?id=<package_name>
Singh
- 870
- 2
- 10
- 16