tags:

views:

56

answers:

1

Some Android devices don't have Android Market, like Korea, etc.

Is it possible to detect the existence of Android Market at runtime?

I know I can try to open a market uri first to see if there is any exception thrown. But I don't think this is a wise approach.

+3  A: 

I know I can try to open a market uri first to see if there is any exception thrown.

Create the ACTION_VIEW Intent for the Market Uri, then use PackageManager and queryIntentActivities() to see if you get anything back. If that returns an empty list, you know nothing on the device handles Market Uri values.

CommonsWare
This is a good approach I hope all the programmers building third party stores handle the market URIs correct make their stores work as a real replacement to the google market.
Janusz