9157654
9157654
  • 发布:2023-03-31 13:42
  • 更新:2023-03-31 14:08
  • 阅读:914

plus.runtime.openURL("app-settings:")无法跳转系统设置

分类:uni-app

No Activity found to handle Intent { act=android.intent.action.VIEW dat=app-settings: flg=0x10000000 }

2023-03-31 13:42 负责人:无 分享
已邀请:
狗尾草joss

狗尾草joss

if(plus.os.name === 'iOS'){  
            plus.runtime.openURL("app-settings://");  
        }else{  
              var Intent = plus.android.importClass("android.content.Intent");  
              var Settings = plus.android.importClass("android.provider.Settings");  
              var Uri = plus.android.importClass("android.net.Uri");  
              var mainActivity = plus.android.runtimeMainActivity();  
              var intent = new Intent();  
              intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);  
              var uri = Uri.fromParts("package", mainActivity.getPackageName(), null);  
              intent.setData(uri);  
              mainActivity.startActivity(intent);  
        }  
  • 9157654 (作者)

    可以了,多谢

    2023-03-31 15:53

要回复问题请先登录注册