Add “more apps from this developer” button to your Android app

It’s a good practice to add a button called “more apps” or “more apps from this developer” in your Android app. It will increase downloads of your other apps to as well as the user can checkout your other apps if interested.

So now here is the code that you should paste in the button click event or any other place you want.

try {
  //replace "Unified+Apps" with your developer name
  startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pub:Unified+Apps")));
}
catch (android.content.ActivityNotFoundException anfe) {
  //replace "Unified+Apps" with your developer name
  startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/search?q=pub:Unified+Apps")));
}

Here we use try and catch because very few Android device do not have Play Store app in their device. In that case, it will open your developer page as a website in the browser.

Try it now!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s