4

I'm working on an Android app that uses SEEK for Android to access the SIM card. I need the following permission :

<uses-permission android:name="org.simalliance.openmobileapi.SMARTCARD"/>

The protection level of this permission is "dangerous", so i have to ask the user to grant the app this permission at run time (otherwise it throws a SecurityException). But the message in the dialog says that the app wants to perform an unknown action (see image below).

enter image description here

How can i custom this dialog so the user knows the app needs the Smartcard permission ?

arminb
  • 2,036
  • 3
  • 24
  • 43
Jorah
  • 41
  • 3
  • You will need to add some attribute in the manifest: https://developer.android.com/guide/topics/manifest/permission-element.html , try with the description to see if it is working – Chol Mar 28 '17 at 09:34
  • @Chol I don't think i can do this because the library is bundled with the Android ROM in my phone. – Jorah Mar 28 '17 at 12:54
  • 2
    Ok, I don't know if you will be able to do something, but you can warn the user as it is explain here : http://stackoverflow.com/questions/32942909/provide-custom-text-for-android-m-permission-dialog – Chol Mar 29 '17 at 07:48
  • 1
    can you please tell me what exactly did you write (code) to ask for that permission, for me it's crashing on oneplus devices, and I think that could be the reason for that. – cV2 Jul 30 '18 at 13:50
  • @cV2 I own a oneplus device and I believe the Smartcard API is not bundled with the OxygenOs rom which might explain the crashes. I think you can still add manually the missing library but you will need to root the device tho. I did it with a Nexus 6P, which was also missing the Smartcard API just like all Google devices, and it worked just fine. Here is some more information about this : https://forum.xda-developers.com/xposed/modules/mod-override-sim-secure-element-access-t3287184 – Jorah Jul 31 '18 at 14:40
  • thanks for your reply, in my case it would be an customer solution, so rooting is not an option. Really strange that it's there, but somehow not working. – cV2 Aug 02 '18 at 19:49

0 Answers0