1

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?)

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
user3239558
  • 1,757
  • 4
  • 18
  • 31
  • off-topic comment: Are you sure that you can run service from service only apk(apk without any Activity)? I'm pretty sure that it is not possible starting from some API number – Selvin Jan 24 '18 at 16:30

1 Answers1

1

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

Ramesh sambu
  • 3,577
  • 2
  • 24
  • 39
  • Thanks for your response. I added a transparent activity. So for user, they can only see the permission ask Dialog – user3239558 Jan 24 '18 at 21:05