是否可以在 Android 上使用 URL(深层链接)打开设置应用程序?

lop*_*ael 5 android deep-linking android-intent

在 iOS 上可以这样做:(在这里找到)

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];
Run Code Online (Sandbox Code Playgroud)

Android 上有类似的吗?

也许是这样的?

String url = "app-settings:";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i);
Run Code Online (Sandbox Code Playgroud)

Com*_*are 3

AFAIK 没有设置 URL。

但是,该类Settings为“设置”应用程序及其内部的许多屏幕提供了专用的操作字符串

因此,要打开“设置”应用程序的主屏幕,将是:

startActivity(new Intent(Settings.ACTION_SETTINGS));
Run Code Online (Sandbox Code Playgroud)