ywj7931 ywj7931 - 1 year ago 66
Android Question

How to get what App's link going to be in PlayStore before uploading?

I want to add share link in my app including the downloading link of android play. But since my app is not launched on PlayStore, I don't have download link currently. How can I include download link now?

Answer Source

This should help you.

final String appPackageName = getPackageName(); // this is your playstore url id parameter
    try {
        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
    } catch (android.content.ActivityNotFoundException anfe) {
        startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/details?id=" + appPackageName)));
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download