How do you prompt the user to update google play services?

前端 未结 5 1673
谎友^
谎友^ 2020-12-19 02:20

I can easily detect that my device\'s google play services app needs to be updated, and present the getErrorDialogFragment() to prompt the user to update it with:

         


        
5条回答
  •  甜味超标
    2020-12-19 02:43

    Not sure in which version Google has it fixed, but with the latest 11.6.0 you can get the correct statusCode and the dialog that leads to Settings to enable the Google Play Services.

    Logcat:

    11-24 05:48:07.266 V/FA: Activity resumed, time: 2070779368
    11-24 05:48:07.320 W/FA: Service connection failed: ConnectionResult{statusCode=SERVICE_DISABLED, resolution=null, message=null}
    

    Dialog:

提交回复
热议问题