Sunday, July 12, 2020

How to open an APP in Google Play Store

How the open an APP in Google Play Store Programatically


In Android Programming we can open Play Store with a Given App Package Name.
The following method opens Apps' playstore page

void openAppInPlaystore(String appPackageName )
{
    
     
        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)));
        }
    
}

6 comments:

  1. This is really a good source of information, I will often follow it to know more information and expand my knowledge, I think everyone should know it, thanks. Get more info about What is Toast and How to use it with Examples at androidaura.com


    ReplyDelete
  2. Nice info, I am very thankful to you that you have shared this special information with us. I got some different kind of knowledge from your web page, and it is really helpful for everyone. Thanks for share it. C++ Coding Help Online.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Hi,
    Thanks for sharing the information with us it was very informative. Hangup.in

    ReplyDelete
  5. terblok.no 082123275001

    ReplyDelete