本文整理汇总了Java中android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS属性的典型用法代码示例。如果您正苦于以下问题:Java Settings.ACTION_ACCESSIBILITY_SETTINGS属性的具体用法?Java Settings.ACTION_ACCESSIBILITY_SETTINGS怎么用?Java Settings.ACTION_ACCESSIBILITY_SETTINGS使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.provider.Settings
的用法示例。
在下文中一共展示了Settings.ACTION_ACCESSIBILITY_SETTINGS属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkEnabledAccessibilityService
private boolean checkEnabledAccessibilityService() {
if(isAccessibilitySettingsOn(this))
return true;;
List<AccessibilityServiceInfo> accessibilityServices =
mAccessibilityManager.getEnabledAccessibilityServiceList(AccessibilityServiceInfo.FEEDBACK_ALL_MASK);
for (AccessibilityServiceInfo info : accessibilityServices) {
if (info.getId().equals(SERVICE_NAME)) {
log.d(info.getId()+" "+info.toString());
return true;
}
}
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
return false;
}
示例2: onClick
public void onClick(View v) {
Intent intent = new Intent();
switch (v.getId()) {
case R.id.Accessibility:
Context context = getApplicationContext();
CharSequence text = "請激活 MiHomePlus 無障礙設定";
int duration = Toast.LENGTH_SHORT;
Toast.makeText(context, text, duration).show();
//打开系统无障碍设置界面
Intent accessibleIntent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivity(accessibleIntent);
break;
case R.id.AppSetting:
intent.setClass(MainActivity.this, AppSetting.class);
startActivity(intent);
break;
case R.id.Help:
intent.setClass(MainActivity.this, Help.class);
startActivity(intent);
break;
default:
break;
}
}
示例3: openSettingAccessibilityNeedTips
private void openSettingAccessibilityNeedTips(Context context) {
try{
boolean enable = InstallAccessibility.autoInstallServerEnable();
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
if(!(context instanceof Activity)){
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
}
context.startActivity(intent);
if (!enable) {
// SmartInstallerSettingFloatingWindow.getInstances().showWindow();
// SmartInstallerSettingFloatingWindow.getInstances().dismissWindowDelayed(10 * 1000);
}
}catch(Exception e){
e.printStackTrace();
}
}
示例4: onReceive
@Override
public void onReceive(Context context, Intent intent) {
SharedPreferences mSp = PreferenceManager.getDefaultSharedPreferences(context);
if (intent.getAction().equals(Config.REMOTE_CONTROL_ACTION)) {
boolean displayToast = intent.getBooleanExtra("RESPOND", true);
if (BaseMethod.isAccessibilitySettingsOn(context)) {
BaseMethod.KeyLockBroadcast(context, true, true);
} else if (mSp.getBoolean(Config.ROOT_OPEN_SERVICE, false) && mSp.getBoolean(Config.ROOT_FUNCTION, false)) {
BaseMethod.controlAccessibilityServiceWithRoot(true, false);
} else {
if (displayToast) {
Toast.makeText(context, R.string.start_service_first, Toast.LENGTH_SHORT).show();
Intent access_intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
context.startActivity(access_intent);
}
}
}
}
示例5: checkEnabledAccessibilityService
private boolean checkEnabledAccessibilityService() {
if(isAccessibilitySettingsOn(this))
return true;;
List<AccessibilityServiceInfo> accessibilityServices =
mAccessibilityManager.getEnabledAccessibilityServiceList(AccessibilityServiceInfo.FEEDBACK_ALL_MASK);
for (AccessibilityServiceInfo info : accessibilityServices) {
if (info.getId().equals(SERVICE_NAME)) {
Log.d("checkAS",info.getId()+" "+info.toString());
return true;
}
}
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivity(intent);
return false;
}
示例6: setAccissibilityService
public void setAccissibilityService(View view){
try {
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivity(intent);
}catch (Throwable e){
Toast.makeText(this,"无法打开系统设置,请手动设置",Toast.LENGTH_SHORT).show();
}
}
示例7: openAccessibility
public void openAccessibility() {
try {
Intent accessibleIntent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
accessibleIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
if (accessibleIntent == null) {
} else {
startActivity(accessibleIntent);
}
} catch (Exception e) {
e.printStackTrace();
}
}
示例8: onCreate
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivity(intent);
}
示例9: openAccessibility
public void openAccessibility(View view) {
try {
Toast.makeText(this, getString(R.string.turn_on_toast) + pluginStatusText.getText(), Toast.LENGTH_SHORT).show();
Intent accessibleIntent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivity(accessibleIntent);
} catch (Exception e) {
Toast.makeText(this, getString(R.string.turn_on_error_toast), Toast.LENGTH_LONG).show();
e.printStackTrace();
}
}
示例10: RunAccessibilityService
public static void RunAccessibilityService(Context context) {
SharedPreferences mSp = PreferenceManager.getDefaultSharedPreferences(context);
if (mSp.getBoolean(Config.ROOT_OPEN_SERVICE, false) && mSp.getBoolean(Config.ROOT_FUNCTION, false)) {
controlAccessibilityServiceWithRoot(true, false);
} else {
Toast.makeText(context, R.string.start_service_first, Toast.LENGTH_SHORT).show();
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
}
示例11: RestartAccessibilityService
public static void RestartAccessibilityService(Context context) {
if (isAccessibilitySettingsOn(context)) {
SharedPreferences mSp = PreferenceManager.getDefaultSharedPreferences(context);
if (mSp.getBoolean(Config.ROOT_OPEN_SERVICE, false) && mSp.getBoolean(Config.ROOT_FUNCTION, false)) {
controlAccessibilityServiceWithRoot(false, true);
} else {
Toast.makeText(context, R.string.restart_service, Toast.LENGTH_SHORT).show();
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
context.startActivity(intent);
}
}
}
示例12: onForwardToAccessibility
public void onForwardToAccessibility(View view)
{
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
startActivity(intent);
}
示例13: onClick
@Override
public void onClick(View v) {
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
示例14: startAccessibilitySettings
public static void startAccessibilitySettings(Context context) {
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
示例15: openAccessibilityUI
public static void openAccessibilityUI(Context context){
Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}