I'm sending an email using
new Intent(Intent.ACTION_SEND).
In this mail there is the link for donwloading my application.
The goal. I want that link is:
If th开发者_如何学Pythone email is opened on a browser in the PC:
https://market.android.com/details?id=com.myapplication
If the email is opened on an Android device:
market://details?id=com.myapplication
In this way I'm sure that the user that open the link using ad Android device is linked directly to the default Android Market applcation...
Cheers, B.
There is no way to detect from the email only if the user is on an android device, or a PC (or even an other smartphone).
You could give the two links directly and let the user click on the correct one.
You can't use JavaScript in your mail as it's ignored by most mail readers (for security purpose), but you may have a single link to a blank webpage (either JS, php or anything you're most familiar with), that will then detect if the user is on a phone or not, and redirect him accordingly.
精彩评论