Search code examples
androidandroid-permissionsaidl

AIDL Server ask permission?


I am using AIDL in my porject, I have two apk : AIDLServer and AIDLClient.

So far there is not Activity in AIDLServer(only has service), however, there are some operations need users' permission(just like Bluetooth, Location).

Under this situation, in Android 6 and above how can I get permission?(Adding a activity in AIDLServer is the only option?)


Solution

  • So far there is not Activity

    AFAIK So it wont run.You should need an activity

    Android 6 and above how can I get permission?(Adding a activity in AIDLServer is the only option?)

    Yes you have to add activity

    Check this for reference answer service asking permission.Same you can use this AIDL

    https://stackoverflow.com/a/34817905/3505534