Reputation: 10623
I am building an android application(based on Google Drive Services). I have followed this Google Drive Service for Android link for building my app. And i have done every thing right. Now when i run the app, then it shows the prompt message "Unknown issue with Google Play service" Also Google Play Services is installed over my Mobile (ver: 2.3.4 Ginger bred).
Note: I have checked the Google Play Services programmatically, and it says that Goolge play services is working well, but still i am getting the error in prompt message.
//Checking GooglePlayServices working
int isAvailable = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if (isAvailable == ConnectionResult.SUCCESS)
{
Toast.makeText(this, "Google play services is working well...!", Toast.LENGTH_SHORT).show();
}
else if (GooglePlayServicesUtil.isUserRecoverableError(isAvailable))
{
int RESOLVE_CONNECTION_REQUEST_CODE= 0;
Dialog dialog = GooglePlayServicesUtil.getErrorDialog(isAvailable, this,RESOLVE_CONNECTION_REQUEST_CODE);
dialog.show();
}
else
Toast.makeText(this, "Can't connect to google play services.", Toast.LENGTH_SHORT).show();
Actually the connectionResult.hasResolution() is not returning true value.I am getting the Prompt error message here in this code:
if (connectionResult.hasResolution())
{
//My essential code
}
else
{
GooglePlayServicesUtil.getErrorDialog(connectionResult.getErrorCode(), this, 0).show();
}
Upvotes: 1
Views: 961
Reputation: 6709
According to the android documentation, the error code 1500 means the following:
public static final int DRIVE_EXTERNAL_STORAGE_REQUIRED
The Drive API requires external storage (such as an SD card), but no external storage is mounted. This error is recoverable if the user installs external storage (if none is present) and ensures that it is mounted (which may involve disabling USB storage mode, formatting the storage, or other initialization as required by the device). This error should never be returned on a device with emulated external storage. On devices with emulated external storage, the emulated "external storage" is always present regardless of whether the device also has removable storage.
Upvotes: 2