打开系统设置从应用程序特定部分系统设置、应用程序、部分

2023-09-04 04:37:51 作者:醉酒劍舞

我有我的应用程序,它会打开系统设置存储部分,(这完美的作品)的快捷方式,但如果设置的应用程序已经在运行,并且是最后一个从左边说的显示设置,你不要指挥到存储的设置,但是显示设置,在pressing快捷。

I have a shortcut from my app which opens the storage part of system settings, (which works perfectly), but if the settings app is already running, and was last left from say the display settings, you don't get directed to the storage settings, but the display settings, when pressing the shortcut.

有没有办法强制打开存储设置,或者说接近(如果没有关闭)设置的应用程序,试图启动存储之前。

Is there a way to force opening storage settings, or say close (if not closed) the settings app, before trying to launch the storage.

我现在用的意图 android.settings.INTERNAL_STORAG​​E_SETTINGS 启动该活动。

I am using the intent android.settings.INTERNAL_STORAGE_SETTINGS to start the activity

非常感谢任何答复

祺雅Harteg

推荐答案

尝试设置下面的标记上你的意图:

try setting the following flag on your intent:

intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);