I want to list an app in both GooglePlay and Amazon Marketplace. How do I identify at run-time which market place this installation came from? The reason is I want to point the "RateMe" URL to the correct listing location.
I build and publish for Samsung, slideme, playstore different apk with different URL. If there is a way to know which market The installation came from will be great but i think there is no way.
Well, there is no way to know from where app was installed but, what I did in IAB interface to detect which stores are available at runtime, is to check what type of apps are installed on the phone
If I detect GooglePlay, I assume google billing is available, if I detect amazon appstore, I assume that IAB for amazon is available, same for samsung etc.
Of course there are some more complex checks for each IAB, but idea remains the same.
So only thing that could be done is: To detect all store apps, provide priorities for them and list the rate me link by first store in priority list.
But... 1) it would require a plugin 2) you would need to know the package name of each possible store app you target 3) while the app is reviewed for some specific store (for example SlideMe), reviewer might have also GooglePlay installed. Which mean if you gave higher priority to GooglePlay (which you probably did), reviewer will see link to google play and will not approve your app.
But if you are interested in such plugin, I can make one, so you provide package name and it returns if app is installed on device, or not.
hmm, how about then setting different package/bundle Ids and then checking inside Lua code, which package/bundleId it has and display corresponding rate me link?
i had some what similar issue with facebook where i want facebook app to open to like the page and if fb app not installed i open the browser with below code
if application:openUrl("fb://profile/214334978734243")==truethen
application:openUrl("fb://profile/214334978734243")else
application:openUrl("<a href="https://www.facebook.com/CrazyChickenCo"" rel="nofollow">https://www.facebook.com/CrazyChickenCo"</a><img class="emoji" src="https://forum.gideros.rocks/resources/emoji/wink.png" title=";)" alt=";)" height="20" />
end
but as arcadia and ar2sawseen said there is no way to detect from which installation came from so going with different apk is only option unless you want give priority
Comments
If there is a way to know which market The installation came from will be great but i think there is no way.
https://play.google.com/store/apps/developer?id=Arcadia Solutions
Edit: I misread the question, if the purpose is just to point RateMe URL then different APK is the solution
but, what I did in IAB interface to detect which stores are available at runtime, is to check what type of apps are installed on the phone
If I detect GooglePlay, I assume google billing is available, if I detect amazon appstore, I assume that IAB for amazon is available, same for samsung etc.
Of course there are some more complex checks for each IAB, but idea remains the same.
So only thing that could be done is:
To detect all store apps, provide priorities for them and list the rate me link by first store in priority list.
But...
1) it would require a plugin
2) you would need to know the package name of each possible store app you target
3) while the app is reviewed for some specific store (for example SlideMe), reviewer might have also GooglePlay installed. Which mean if you gave higher priority to GooglePlay (which you probably did), reviewer will see link to google play and will not approve your app.
But if you are interested in such plugin, I can make one, so you provide package name and it returns if app is installed on device, or not.