Android Code Snippet cGooglePlayServices

I took all the google play services status codes and messages and put them in a code class.

This is from this Link: https://developers.google.com/android/reference/com/google/android/gms/common/ConnectionResult

cGooglePlayServices.CheckStatus returns a Structure (Type) that had the return code, boolean and the status message (Note: you can compile with _cGooglePlayServicesDescriptions_ to get full text descriptions of any problem)

Code from my Starter Routine

B4X:
Sub Service_Start(StartingIntent As Intent)
       Try      
         Dim  GooglePlayServices As TGooglePlayServices = cGooglePlayServices.CheckStatus

         If  GooglePlayServices.AOK Then
              '  OK to do Billing Manager
         Else
              '  Something is wrong
         End If                
       Catch
           #If Debug    
       Log(LastException.Message)
           #End If
       End Try
End Sub
 

Attachments

  • cGooglePlayServices.zip
    2.3 KB · Views: 330
Last edited:
Top