Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Getting device location with Android M style permissions

So I had followed the two courses building the weather app and then extending it with recycler views.

I had planned to make this use a device's current location which in the emulator is 'kinda works' I definately returns different data than using the default hard coded lat/lon though it doesn't seem to be getting the proper data.

I wanted to test on my physical device but don't know how to navigate Android M style permissions. I was hoping someone here has done it and would be willing to share their code. I initially put all the location stuff in Main Activity but its looking cumbersome and messy, Also I would think this like an http request should happen on an off thread and not the main thread.