复写demo项目中TestModule 类如下方法即可测试复现
@Override
public void onActivityCreate() {
super.onActivityCreate();
Log.e("testUni", "onCreate");
}
@Override
public void onActivityStart() {
super.onActivityStart();
Log.e("testUni", "onStart");
}
@Override
public void onActivityResume() {
super.onActivityResume();
Log.e("testUni", "onResume");
}
@Override
public void onActivityPause() {
super.onActivityPause();
Log.e("testUni", "onPause");
}
@Override
public void onActivityStop() {
super.onActivityStop();
Log.e("testUni", "onStop");
}
@Override
public void onActivityDestroy() {
super.onActivityDestroy();
Log.e("testUni", "onDestroy");
}
1 个回复
DCloud_Android_DQQ
已沟通确认,因插件机制原因,uniapp插件只支持部分生命周期。
https://nativesupport.dcloud.net.cn/NativePlugin/course/android?id=%e7%9b%ae%e5%89%8d%e5%af%b9uniapp%e6%94%af%e6%8c%81%e7%9a%84%e9%97%ae%e9%a2%98