My application works correctly, when i have installed Google Play Services, but without it, application stop when i open it. It's clear, but when i add the method which checks whether Google Play Services is available on device and when is not, it should display error dialog, but it. Application don't open, too.
This is code which i copy from other post. I tried do this by my code, but it doesn't work, too.
The method:
public void checkGooglePlayServicesAvailability()
{
int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if(resultCode != ConnectionResult.SUCCESS)
{
Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 1);
dialog.setCancelable(false);
dialog.show();
}
Log.d("GooglePlayServicesUtil Check", "Result is: " + resultCode);
}
call in onResume():
@Override
protected void onResume()
{
checkGooglePlayServicesAvailability();
super.onResume();
}
I have installed Google Maps, too. Maybe someone can help me?
Edit: LogCat:
07-07 15:33:39.150: E/Trace(3448): error opening trace file: No such file or directory (2)
07-07 15:33:41.361: E/Google Maps Android API(3448): Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above
07-07 15:43:15.820: E/Google Maps Android API(3524): Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above
07-07 16:06:55.349: E/Trace(3615): error opening trace file: No such file or directory (2)
07-07 16:06:57.841: E/Google Maps Android API(3615): Google Maps Android API v2 only supports devices with OpenGL ES 2.0 and above