Why is LocationSettingsResult startResolutionForResult not calling onActivityResult?

后端 未结 5 1197
悲&欢浪女
悲&欢浪女 2021-02-15 04:33

I\'ve seen this Q&A LocationSettingsRequest dialog - onActivityResult() skipped. It isn\'t the same issue because everything is being done in an Activity already.

Th

5条回答
  •  天涯浪人
    2021-02-15 05:01

    In my case there was this error: I've used

    public abstract class AGoogleDriveBase extends ABase implements
            GoogleApiClient.ConnectionCallbacks,
            GoogleApiClient.OnConnectionFailedListener {
    //...
    @Override
        protected void onActivityResult(int requestCode, int resultCode,  Intent data) {
    //...
    

    and this function not called using

    try {
                result.startResolutionForResult(this, REQUEST_CODE_RESOLUTION);
            } catch (SendIntentException e) {
                Log.e(TAG, "Exception while starting resolution activity", e);
            }
    

    because when I used a main activity

    public class myAct extends AGoogleDriveBase implements ... {
    //...
    @Override
          protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    

    the super method not called (not existed this string):

     super.onActivityResult(requestCode, resultCode, data);
    

提交回复
热议问题