Detect Amazon store / Google Play

Hi all,

I have an Android app that will exist on Amazon and Google (same apk). Inside the app is a ‘more apps’ screen with links to other apps on the store.

Is there any way to detect if the user has the Amazon Appstore installed or the Google Play store?

One hacky way would be just to say if device contains the word amazon, show the amazon links, otherwise show the Play links. That would limit Amazon links to Amazon devices though (I know you can install the Amazon store on other devices too)

Thanks
Chris

Don’t know if there is a better way than you mentioned at runtime but in general why do you want to use the same apk? For instance for a lot of features you want to include different libraries at build time. On Amazon I use amazon ads on Google play I use admob. For IAP again different libraries. There are many more examples. Some of these libraries are fairly large so including both is a waste. Since you have to submit the apk separately anyways why not build different apks that way each apk can be more lightweight and you will know 100% which it is.

I’m not using any store specific features like ads or IAP, so doesn’t matter for me. I have 1 android project, which means changing the settings inside the app to amazon or google just for the cross promotion screen, which seems a shame to have to do, but likely I’ll have to.