Determine which app store is targeted, from code

I am adding an “our other games” screen to my games. I would like to send people directly to the app store if they click on one of the buttons for one of the games.

However, if they are playing on a game that was targeting Amazon, I want to send them to the Amazon app store, vs those playing a game that was targeting google, being sent to Google Play.

Is there any way, in code, to determine which app store was targeted when the app was built?

An help is appreciated.

One option is to use different package names for different stores. You can read package name during runtime with Application.identifier and do actions based on that

another option is to check vending