I need to check if the Android Market is installed like this
/*
* Test for existence of Android Market
*/
boolean androidMarketExists = false;
try{
ApplicationInfo info = getPackageManager()
.getApplicationInfo("com.google.process.gapps", 0 );
//application exists
androidMarketExists = true;
} catch( PackageManager.NameNotFoundException e ){
//application doesn't exist
androidMarketExists = false;
}
But I don't know if com.google.process.gapps is the package that has android market or not.