HeadFirstAndroid icon indicating copy to clipboard operation
HeadFirstAndroid copied to clipboard

Chapter13 Odometer Service Requires Permissions

Open DuaneQ opened this issue 8 years ago • 1 comments

It appears as if the code isn't working in Chapter 13 because when using a dangerous service you explicitly need to ask for permissions from the user.

https://developer.android.com/training/permissions/requesting.html

I'm not sure where the code suggesting on the Android should go?

Could you possibly provide an example on how to resolve this issue?

Thanks

DuaneQ avatar Apr 05 '17 21:04 DuaneQ

I am having the same problem if I had API 23 of more then you can ask for permissions, but I working on API 22 on my device and the app crashes. I tried putting a try catch on the line where the problem was, this was enough for the Android Studio editor, but still the app crashes. I don't understand this because in the book your supposed to use API 16, so how com it doesn't work on API 22? If someone has a solution that doesn't require that I get a new device, please share it with me.

arieleden avatar Sep 06 '17 02:09 arieleden