本文整理匯總了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);
}