Google Api Client sometime NULL in onConnected

前端 未结 6 418
小蘑菇
小蘑菇 2021-01-03 23:51

I implement GoogleApiClient as bellow:

 mGoogleApiClient = new GoogleApiClient.Builder(this)
                .enableAutoManage(this, 0 /* client         


        
6条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-04 00:40

    I had the same problem (Already managing a GoogleApiClient with id 0) in a fragment, and finally I resolved it :

    • Override onStart() and onStop() normally
    • Add in onStop() call yourApiGoogle.stopAutoManage(context);

    Have a nice day...

提交回复
热议问题