Reputation: 307
I want my users able to press "Other Games" button, and redirect them to my developer play store page via Google play app. I did it as following, but it redirected incorrectly.
final String appPackageName2 = "MyCompany%20Name"; // getPackageName() from Context or Activity object
try {
activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://developer?id=" + appPackageName2)));
} catch (android.content.ActivityNotFoundException anfe) {
activity.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://play.google.com/store/apps/developer?id=" + appPackageName2)));
}
Upvotes: 0
Views: 494
Reputation: 903
To open the developer page is different, look at an example:
final String developer_id = "my_dev_id";
try {
activity.startActivity(
new Intent(
Intent.ACTION_VIEW,
Uri.parse("market://dev?id=" + developer_id)
)
);
} catch (android.content.ActivityNotFoundException anfe) {
activity.startActivity(
new Intent(
Intent.ACTION_VIEW,
Uri.parse("https://play.google.com/store/dev?id=" + developer_id)
)
);
}
To get the information visit your developer page, there you will find all information about your id and other things. Luck.
Docs: Link to Google Play
Upvotes: 1