Is there a way to link to all of a developer's Google Play Store apps?
Asked Answered
L

5

17

In my app, I want to allow users to open the Google Play store to see all of my other apps. In iOS, I just use the following (example) iTunes link to pull them all up:

https://itunes.apple.com/us/artist/electronic-arts/id284800461?mt=8

Is there a way to get ALL of my apps to show (besides a search for my company name, which is rather generic)?

Longevous answered 29/11, 2012 at 17:1 Comment(0)
A
35

Search for a product, including the pub: tag, as can be found at the API page entitled Linking to your products. Note that searching via a URL requires a different method. Both are included here. Start an intent like this:

try {
    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://search?q=pub:Developer+Name+Here")));
} catch (android.content.ActivityNotFoundException anfe) {
    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/developer?id=Developer+Name+Here")));
}

Note that the market doesn't work on the emulator, so this code will instead pull it up in a URL. This method courtesy of this answer.

Absinthe answered 29/11, 2012 at 17:8 Comment(4)
I am getting "ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://developer?id=abc }"Longevous
No that was on my device with 4.2.Longevous
market://details?id= works just fine. changing it to developer causes the crash.Longevous
Are developer ids unique? How can I ensure the search results will not include apps from any other developer with the same name as myself?Superb
P
9

Just use the developer parameter. This is the shortcut for googles

https://play.google.com/store/apps/developer?id=Google+Inc.

Google's Apps

Just put a + between works if there are spaces

Potsherd answered 29/11, 2012 at 17:6 Comment(1)
Not found also with/witout space and dotSzombathely
W
6

Android actually has an even better way to handle this.

You can also group all your applications by the package names, provided you had the discipline to actually think over it. For instance, if all my apps start with com.mycompanyname.androidappname, I can simply search https://play.google.com/store/search?q=com.mycompanyname.*

Warrington answered 29/11, 2012 at 17:36 Comment(1)
This works like a charm. I'm using this to link to a subset of my apps, for them I have a "subdomain", i.e. com.mycompanyname.someofmyappsSteffen
A
0

You can use this, it works for me

private void moreApps(Context context, int devName){
        try {
            context.startActivity(new Intent(Intent.ACTION_VIEW,
                    Uri.parse(context.getString(R.string.url_market_search_app)
                            + context.getString(devName))));
        } catch (android.content.ActivityNotFoundException anfe) {
            try {
                context.startActivity(new Intent(Intent.ACTION_VIEW,
                        Uri.parse(context.getString(R.string.url_playstore_search_app)
                                + context.getString(devName))));
            } catch (Exception e) {
                Toast.makeText(context,
                        R.string.install_google_play_store,
                        Toast.LENGTH_SHORT).show();
            }
        }

}
Addlebrained answered 4/2, 2021 at 6:8 Comment(1)
Please, don't post code without an explanation as an answer. Try to explain what your code does and how it solves the problem of the question. Answers with an explanation are usually more helpful and of better quality, and are more likely to attract upvotes.Tsarevna

© 2022 - 2024 — McMap. All rights reserved.