以编程方式打开特定的“设置”页面 [英] Open specific Settings-page programmatically
本文介绍了以编程方式打开特定的“设置”页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的应用程序中,是否可以将用户重定向到特定设置的页面?我的应用程序用作锁定屏幕应用程序,因此我希望能够将用户直接重定向到Android设置的锁定屏幕部分。 (最好是通过按钮或类似的按钮)
Is there any way to, in my app, to redirect a user to a specific settings 'page'? My app works as a lock screen app, so I want to be able to redirect the user directly to the "Lock Screen" section of the Android settings. (Preferably via a button or something similar)
推荐答案
我设法在旧的 Stackoverflow从一段时间后发布。现在,代码片段如下所示:
I managed to find the correct answer in an old Stackoverflow-post from a while back. The code snippet now looks like this:
Intent intent = new Intent(DevicePolicyManager.ACTION_SET_NEW_PASSWORD);
startActivity(intent);
这篇关于以编程方式打开特定的“设置”页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文