android各大手机系统打开权限管理页面

时间 : 17-01-03 栏目 : Android, 移动开发 作者 : meiw@z3a105.com 评论 : 0 点击 : 147 次

[java] view plain copy

  1. /** 
  2.  * 跳转到miui的权限管理页面 
  3.  */  
  4. private void gotoMiuiPermission() {  
  5.     Intent i = new Intent("miui.intent.action.APP_PERM_EDITOR");  
  6.     ComponentName componentName = new ComponentName("com.miui.securitycenter""com.miui.permcenter.permissions.AppPermissionsEditorActivity");  
  7.     i.setComponent(componentName);  
  8.     i.putExtra("extra_pkgname", getPackageName());  
  9.     try {  
  10.         startActivity(i);  
  11.     } catch (Exception e) {  
  12.         e.printStackTrace();  
  13.         gotoMeizuPermission();  
  14.     }  
  15. }  


接下来上魅族的代码

[java] view plain copy

  1. /** 
  2.  * 跳转到魅族的权限管理系统 
  3.  */  
  4. private void gotoMeizuPermission() {  
  5.     Intent intent = new Intent("com.meizu.safe.security.SHOW_APPSEC");  
  6.     intent.addCategory(Intent.CATEGORY_DEFAULT);  
  7.     intent.putExtra("packageName", BuildConfig.APPLICATION_ID);  
  8.     try {  
  9.         startActivity(intent);  
  10.     } catch (Exception e) {  
  11.         e.printStackTrace();  
  12.         gotoHuaweiPermission();  
  13.     }  
  14. }  


华为的系统由于不太一样,有些系统是华为自己的权限管理,而6.0的是用的原生的权限管理页面,目前手上只有一台6.0的华为手机,

暂时没有研究到打开的方法,如果有知道的大神麻烦告知一下

不过打不开没关系,我们可以退而求其次,打开所用应用的权限管理页面

[java] view plain copy

  1. /** 
  2.  * 华为的权限管理页面 
  3.  */  
  4. private void gotoHuaweiPermission() {  
  5.     try {  
  6.         Intent intent = new Intent();  
  7.         intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);  
  8.         ComponentName comp = new ComponentName("com.huawei.systemmanager""com.huawei.permissionmanager.ui.MainActivity");//华为权限管理  
  9.         intent.setComponent(comp);  
  10.         startActivity(intent);  
  11.     } catch (Exception e) {  
  12.         e.printStackTrace();  
  13.         startActivity(getAppDetailSettingIntent());  
  14.     }  
  15.   
  16. }  


目前也就研究了这三大系统,对于原生系统,和其他系统,如果找不到方法,也可以先把用户引导到系统设置页面

[java] view plain copy

  1. /** 
  2.  * 获取应用详情页面intent 
  3.  * 
  4.  * @return 
  5.  */  
  6. private Intent getAppDetailSettingIntent() {  
  7.     Intent localIntent = new Intent();  
  8.     localIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);  
  9.     if (Build.VERSION.SDK_INT >= 9) {  
  10.         localIntent.setAction("android.settings.APPLICATION_DETAILS_SETTINGS");  
  11.         localIntent.setData(Uri.fromParts("package", getPackageName(), null));  
  12.     } else if (Build.VERSION.SDK_INT <= 8) {  
  13.         localIntent.setAction(Intent.ACTION_VIEW);  
  14.         localIntent.setClassName("com.android.settings""com.android.settings.InstalledAppDetails");  
  15.         localIntent.putExtra("com.android.settings.ApplicationPkgName", getPackageName());  
  16.     }  
  17.     return localIntent;  
  18. }  

本文标签

除非注明,文章均为( meiw@z3a105.com )原创,转载请保留链接: http://blog.z3a105.com/?p=935

android各大手机系统打开权限管理页面:等您坐沙发呢!

发表评论





       ==QQ:122320466==

 微信    QQ群

推广

  • 104726drf320ff09r7i62f.jpg
  • 103217vn3333zbk3snwz2u.jpg

HP0-A116 VCE GB0-283-ENGLISH IT-Exam BCWAP IT-Exam 1Z0-514 IT-Exam 050-895 IT-Exam 000-218 IT-Exam HP0-M54 Certification C9510-317 Exam JN0-343 Certification E20-027 Exam-PDF 000-161 Dumps 1Y0-A05 PDF NS0-102 IT-Exam 70-630 PDF CAT-340 Exam DC0-120 Certification 000-M225 Study-Guide MOS-O2K Certification 000-712 PDF 640-875 Exam-PDF TB0-116 PDF 9A0-066 Certification P_PRO_65 Exam-PDF 1Z0-133 PDF 650-669 Dumps 000-077 Exam-PDF 1Z1-244 Exam-PDF ST0-149 PDF HC-035-750-ENU IT-Exam 1Z0-856 IT-Exam LSAT IT-Exam C2010-532 Study-Guide 1Y0-259 Study-Guide M9520-233 Exam 646-223 PDF HP2-E52 Exam-PDF 500-202 Exam-PDF 9L0-313 IT-Exam 700-505 Study-Guide 000-281 IT-Exam CHA Dumps 1Z1-052 IT-Exam 010-150 Exam-PDF C2180-318 Certification H13-629-CHS IT-Exam HP5-H05D VCE BCP-420 Study-Guide ACSO-TOOL-09 Exam 000-M233 PDF


0

Aujourd’hui, une partie avec le développement du e-commerce, achats en ligne est devenu une partie de la vie pour beaucoup de gens. La mariage a commencé achats en ligne. Si vous choisissez achats les mariages en ligne, il peut être beaucoup moins cher que le salon de la Robe de mariée pas chermariée local, réduisant le budget de mariage. vous pouvez avoir beaucoup de choix si acheter de mariage en ligne. vous pouvez ramasser une robe de mariée bon marché sur Internet.
Piercing fascinerande figur, och nu tittar vi på 2016 senast brudklänning, kan du vara den vackraste bruden det!2016 senaste Bra brudklänning, söt temperament Bra design, romantiska spetsar blomma kjol, som du lägger till en elegant och charmig temperament.Kvinnan tillbaka mjuka linjer, människor brudklänningofta få en känsla av oändlig frestelse. Fall 2016 mässan, lämnar uppgifter om ditt bröllop charmig.
Yesterday afternoon, the Chinese team was training in the Guangzhou Gymnasium, when the reporter asked Zhao Yunlei the feeling of wearing the new cheap jersey , cheap jerseys online shopshe readily took a shirt from the bag crumpled ball to reporters, and she said with a smile: ” This shirt is light. ”Zhao Yunlei said: “Our material is very light like with the clothes of the tennis King Nadal, Federer, after the sweat, sweat does not drip down to the ground, when we do move, it is easy pace slipping if the sweat drip on the floor.”Tennis players Zhang Yawen, told reporters: “You might think the clothes attached to the body, fearing we swing will be affected, in fact, we do not feel anything, because the clothes are very light, very soft, put on quite comfortable. And it’s particularly good clothes to dry, washing and will dry in 15 minutes. ”
China’s sports enthusiasts NFL sweatshirt with mad love and the pursuit of, and therefore, NFL jerseys have a good market in China and development. China is a populous country, is the consumer, the economic momentum is so good, the sales prospects sportswear is immeasurable. With hot sales sweatshirt, but also to promote the importance of sports fans, on health, on the other hand is a matter of concern for the World Cup, fans wearing NFL jerseys and also can express themselves more fully love and obsession Therefore, NFL jerseys Wholesale jerseys online shopwholesale has good prospects and development in China.
ANTA-ANTA Sports Products Limited, referred to as ANTA Sports, Anta, is China’s leading sporting goods companies, mainly engaged in the design, development, manufacture and marketing of ANTA brand sporting goods, including sports footwear, apparel and accessories. Anta sweatshirt design advantages, warm stretch knit fabric, using Slim version of model, more personal fit, bid farewell to bloated, so wearing more stylish.GUIRENNIAO-This logo is a spiritual totem, smooth graphics implication unstoppable force; flexible deliver an elegant arc Wholesale jerseys china shop movement, strength and speed of the United States, a symbol of passion and rationality publicity “Heart” and “meaning”, “concept” unity; pass the fearless and enterprising mind, showing beyond the realm of self, to unstoppable force to create the future.XTEP-Xtep (China) Co., Ltd. is a comprehensive development wholesale jerseys china shop, production and marketing of Xtep brand (XTEP) sports shoes, clothing, bags, caps, balls, socks mainly large sporting goods industry enterprises.
There are a lot of fans in identifying the authenticity of the above cheap jerseys have great distress, so here to i will show you some methods to definitely affordable inexpensive cheap jerseys : Firstly, we should look at if it is working fine. China has been called the world’s factory, a lot cheap jerseys factories in China have foundries, but our cheap jerseys are all from here! Secondly, should to see whether it is the , we all know that it is difficult to get out of print once a genuine cheap cheap jerseys free shipping jersey was print. and we have all kind of stocka on the whole website, in other words, we have all you want ! Finally, look at the price, our price is not necessarily the lowest in the whole website but it must be most fair on the whole website, we certainly you will not regret later when you buy it. Of course, except that cheap jerseys, we also have the other products, such as socks, leggings and some other related products, everyone can enjoy the best services of here!