I am currently attempting to incorporate the use of Drive API authorisation into my app.
The Google Developers Guide states that I must use getErrorDialog in my Connection Failed method.
However, when I put the getErrorDialog in, it stated that the method was depreciated, and that I needed to use an 'updated' version.
It did not state, however, what I should use instead.
Does anyone know the updated version of this function?
However, when I put the getErrorDialog in, it stated that the method was depreciated, and that I needed to use an 'updated' version.
GooglePlayServicesUtil.getErrorDialog
has been deprecated in favour of GoogleApiAvailability.getErrorDialog
, which is not a static method as it was for GooglePlayServicesUtil
. You can get an instance of GoogleApiAvailability
this way
GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();
and call getErrorDialog
on the returned instance
apiAvailability.getErrorDialog(this, resultCode, PLAY_SERVICES_RESOLUTION_REQUEST).show();
where this is a Context
's object and resultCode
is the return value of isGooglePlayServicesAvailable(Context)
. You can read more about it here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With