1
0
Fork 0
mirror of https://github.com/ethauvin/android-about-box.git synced 2025-04-25 02:37:11 -07:00

Merge pull request #35 from ethauvin/develop

Handle both publisher or developer page.
This commit is contained in:
mikemee 2017-09-01 11:00:45 -07:00 committed by GitHub
commit 4fe12914a9

View file

@ -69,9 +69,16 @@ public final class AboutBoxUtils {
String webURI = null;
switch (buildType) {
case GOOGLE:
// per: https://developer.android.com/distribute/marketing-tools/linking-to-google-play.html#OpeningPublisher
appURI = "market://dev?id=" + publisher;
webURI = "http://play.google.com/store/dev?id=" + publisher;
// see:
// https://developer.android.com/distribute/marketing-tools/linking-to-google-play.html#OpeningPublisher
// https://stackoverflow.com/questions/32029408/how-to-open-developer-page-on-google-play-store-market
if (publisher.matches("\\d+")) {
webURI = "http://play.google.com/store/dev?id=" + publisher;
appURI = webURI;
} else {
appURI = "market://search?q=pub:" + publisher;
webURI = "http://play.google.com/store/search?q=pub:" + publisher;
}
break;
case AMAZON:
appURI = "amzn://apps/android?showAll=1&p=" + packageName;