Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

19
  • 63
    if you want to redirect to all Developer's apps use market://search?q=pub:"+devName and http://play.google.com/store/search?q=pub:"+devName Commented Aug 11, 2013 at 13:18
  • 5
    This solution does not work, if some application uses intent filter with "market://" scheme defined. See my answer how to open Google Play AND ONLY Google Play application (or webbrowser if GP not present). :-)
    – Berťák
    Commented Jan 22, 2015 at 14:18
  • 29
    For projects using the Gradle build system, appPackageName is in fact BuildConfig.APPLICATION_ID. No Context/Activity dependencies, reducing the risk of memory leaks. Commented Aug 10, 2015 at 15:42
  • 3
    You still need the context to launch the intent. Context.startActivity()
    – wblaschko
    Commented Dec 7, 2015 at 22:32
  • 2
    This solution assumes there is an intent to open a web browser. This isn't always true (like on Android TV) so be cautious. You may want to use intent.resolveActivity(getPackageManager()) to determine what to do.
    – Coda
    Commented Aug 4, 2016 at 5:56