current position:Home>Call startactivityforresult in the Android plug-in of uniapp (in the non activity class)

Call startactivityforresult in the Android plug-in of uniapp (in the non activity class)

2022-05-15 05:16:32A grain of rice

((Activity) mWXSDKInstance.getContext()).startActivityForResult(intent, 1002);

Activity、serivice、Application These classes are inherited to Contex Of ,Contex It can be understood as a scene , Or a usage scenario , Activities 、 service 、 Broadcasting can be understood as a scene ,startActivity It can be done directly by Contex To call , and startActivityForResult But not , Have to Activity To call .

copyright notice
author[A grain of rice],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2022/131/202205111246438927.html

Random recommended