Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Wear app resulting in getGoogleAppId failed with status error

I have an Android Wear app which was working fine on my Moto360. It access Google Play Services and GCM APIs in the Google Admin console. Then I tried to use another watch (LG G Watch). Because I can only pair one watch at any time with my phone, I had to "forget" the moto360 in order to pair with the LG G Watch. Now I cannot seem to connect to Google App API (GCM or play services). I am getting the following error:

I/GMPM    ( 2746): App measurement is starting up
E/GMPM    ( 2746): getGoogleAppId failed with status: 10
E/GMPM    ( 2746): Uploading is not possible. App measurement disabled

This error occurs in the logcat of both the watch and the accompanying mobile app. I tried looking up what the status code but could not find any info. Could anyone please help in gleaning what this status code mean?

like image 547
VarsMolta Avatar asked Sep 27 '15 20:09

VarsMolta


1 Answers

Replace addApi with addApiIfAvailable

mGoogleApiClient = new GoogleApiClient.Builder(this)                     
                    .addApiIfAvailable(Drive.API)
                    .addScope(Drive.SCOPE_FILE)
                    .addConnectionCallbacks(this)
                    .addOnConnectionFailedListener(this)
                    .build();
like image 61
Ashish Patel Avatar answered Oct 03 '22 19:10

Ashish Patel