thanks list
Thanks to fylfyl2 for writing https://blog.csdn.net/fyilun/article/details/21257595
E4A opens the lock screen method page
Intent intent = new Intent();
ComponentName cm = new ComponentName("com.android.settings","com.android.settings.ChooseLockGeneric");
intent.setComponent(cm);
intent.setAction("android.intent.action.VIEW");
startActivityForResult(intent,0);
But since startActivityForResult reports an error in E4A, I can only study it myself.
jadx decompiles an e4a finished product
jadx decompiles a finished product of e4a, check how e4a opens the network settings
mainActivity.getContext().startActivity(new Intent("android.settings.WIRELESS_SETTINGS"));
Then we replace startActivityForResult with e4a's official mainActivity.getContext().startActivity, then try the effect, and post the dependency package and the modified code in the interface function:
import android.provider.Settings;
import android.app.IntentService;
import android.content.Intent;
import android.content.ComponentName;
@SimpleFunction//导出函数标记
public static void 打开锁屏页面(){
Intent intent = new Intent();
ComponentName cm = new ComponentName("com.android.settings","com.android.settings.ChooseLockGeneric");
intent.setComponent(cm);
intent.setAction("android.intent.action.VIEW");
mainActivity.getContext().startActivity(intent);
}
running result
The test in the Android 4.4.4 emulator successfully opened the unlock method selection interface com.android.settings.ChooseLockGeneric