- android中调用系统的设置项,比较简单,只需要new一个对应设置的Intent,并调用startActivity(intent)即可。如下方法中,调用时传入相应的action:
public void processActionSetting(String action) {
Intent intent = new Intent(action);
startActivity(intent);
} 系统设置action的介绍
android系统设置的action都是在android.provider.Settings下定义的,下面具体介绍一下,各个设置项的意义:
// Show settings for accessibility modules.辅助功能:例如字幕、自动旋转屏幕、按电源键结束通话等。
android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS;// Show add account screen for creating a new account。添加帐户:主要是电子邮件账户 android.provider.Settings.ACTION_ADD_ACCOUNT // Show settings to allow entering/exiting airplane // mode。无线和网络:主要是运营商选择相关 android.provider.Settings.ACTION_AIRPLANE_MODE_SETTINGS; // Show settings to allow configuration of APNs.APN的相关设置。 android.provider.Settings.ACTION_APN_SETTINGS; // Show settings to allow configuration of application // developm
android应用调用系统相关设置的方法
最新推荐文章于 2023-02-14 17:16:28 发布