Compatible with the Enable floating window setting interface of MIUI5 and MIUI6, miui5miui6
Some time ago, the project needed to boot and jump to the MIUI floating window enable setting interface. In MIUI6, the position of enabling the floating window setting was changed, find the solution and paste it for your reference and use.
@ Overridepublic void onClick (View view) {// close the prompt box MIUIFloatWindowHelpDialog. this. dismiss (); // jump to the settings page. try {Intent localIntent = new Intent ("miui. intent. action. APP_PERM_EDITOR "); localIntent. setClassName ("com. miui. securitycenter "," com. miui. permcenter. permissions. apppermissionseditequaltient "); localIntent. putExtra ("extra_pkgname", view. getContext (). getPackageName (); view. getContext (). startActivity (localIntent);} catch (ActivityNotFoundException localActivityNotFoundException) {Intent intent = new Intent (Settings. ACTION_APPLICATION_DETAILS_SETTINGS); Uri uri = Uri. fromParts ("package", view. getContext (). getPackageName (), null); intent. setData (uri); view. getContext (). startActivity (intent );}}Xiaomi is a nightmare for developers ~~