Whether the app installed is called Google Play or Market, the package name is the same com.android.vending.
I need to be able to detect whether the app
You can also try this much simplified solution:
public boolean isGooglePlayAvailable() {
boolean googlePlayStoreInstalled;
int val= GooglePlayServicesUtil.isGooglePlayServicesAvailable(LocationActivity.this);
googlePlayStoreInstalled = val == ConnectionResult.SUCCESS;
return googlePlayStoreInstalled;
}