Giter Site home page Giter Site logo

Comments (3)

yewei02538 avatar yewei02538 commented on August 24, 2024

这个权限我刚才用小米手机测了下,在AndroidManifest填写该权限后,使用HiPermission直接申请成功了(没有弹出HiPermission界面),而且调用这段代码并没有报错,并且正常打印出IMEI

TelephonyManager tm = (TelephonyManager) this.getSystemService(TELEPHONY_SERVICE);
String deviceId = tm.getDeviceId();
Log.i("TAG",deviceId);

也许小米系统认为这个不算是危险权限吧,所以就算我们动态申请了也会默认申请成功。但是别的厂商手机会认为是危险权限,所以申请权限代码还是要写。正如我在Issues6所说,并不是一定要弹出框才算正确,只要在我们使用权限的时候不会因为权限问题而Crash,那么我们的目的就达到了。国内Android手机碎片化。。所以并不能保证每个手机都出弹出申请界面。。

from hipermission.

niray avatar niray commented on August 24, 2024

我在启动的时候申请了,但是系统没弹出来,我以为不是危险权限
但是,我在使用支付宝的时候,系统自动弹出了一个申请 Imei…… 什么的 权限申请
不过拒绝了也可以继续支付,不知道什么原因

还有,今天早上看bug反馈

java.lang.RuntimeException:Failure delivering result ResultInfo

{who=@android:requestPermissions:, request=3, result=0, data=null}
 to activity {me.weyye.hipermission.PermissionActivity}: 
java.lang.ArrayIndexOutOfBoundsException: length=0; index=0
 at 
 me.weyye.hipermission.PermissionActivity.onRequestPermissionsResult(PermissionActivity.java:230)

出了一个这个,我就不新开issues了 ,你加一个下标判断吧
祝好 :)

from hipermission.

yewei02538 avatar yewei02538 commented on August 24, 2024

自动弹出申请是正常的。。就跟以前6.0以下版本使用到权限才会申请,而且拒绝也不报错。。谢谢你提交的bug,我try-catch下。加个qq吧 505141450

from hipermission.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.