EGG-electric-unicycle / egg_app

GNU General Public License v3.0
6 stars 5 forks source link

Can't discover devices on Android 6 #1

Closed hyperair closed 7 years ago

hyperair commented 7 years ago

I got this message while trying to hook this up to my wheel (also named SZWGA6).

11-30 03:04:34.630   940   971 W BroadcastQueue: Permission Denial: receiving Intent { act=android.bluetooth.device.action.FOUND flg=0x10 (has extras) } to ProcessRecord{28d99e5 29979:comegg_electric_unicycle.github.eggunicycle/u0a84} (pid=29979, uid=10084) requires android.permission.ACCESS_COARSE_LOCATION due to sender com.android.bluetooth (uid 1002)

Seems like the issue is the same as this: http://stackoverflow.com/questions/33142034/android-6-bluetooth

hyperair commented 7 years ago

Okay, I managed to patch the manifest in the apk to add ACCESS_COARSE_LOCATION, and then enabled the "Location" toggle in the app permissions. It connects now.

casainho commented 7 years ago

Hi and thanks!!

Would be great if you could submit a pull request with your changes. Thanks.

liebefuroscar commented 7 years ago

Can u please upgrade it for use with Android 6 (or 7 hehe) Thank you

casainho commented 7 years ago

Hi liebefuroscar. I don't have an Android 6 or 7 so I will not be able to test it. But even to start, I don't have a clue of what changes are needed - if you have any idea, can you please help?? Thanks.

liebefuroscar commented 7 years ago

I only have Phones with A6 and A7 and I cannot discover my unicycle. I read about add ACCESS_COARSE_LOCATION or sometingh like this. Can someone build an apk with this permission? I can try it and say If is working or not and help all users with Android 6.0

casainho commented 7 years ago

Ok, so I will build and make a new test version for you to test. If it works for you then I will make a new stable version. I want to make this version for you in less than 24h!

liebefuroscar commented 7 years ago

This is awesome!! Thank you for support

casainho commented 7 years ago

I just tested the app with this changes and it keep working on my Android 5. liebefuroscar, can you please test on your Android 6/7?

I just did a beta release, you can get the APK here: https://github.com/EGG-electric-unicycle/egg_app/releases/tag/1.1.0-beta1

Thank you guys for the help!!!

liebefuroscar commented 7 years ago

I tested with my Xiaomi MI5 and my Xiaomi MI4 (both with Android 6.0.1) and It works perfectly. I hope to try this APK on Android 7 at finally of this week or next. Thank you for support!! 👍👍

hyperair commented 7 years ago

Hmm, it didn't prompt me to enable the location permission, I could enable it by going into the permissions page for the app and toggling the option there.

casainho commented 7 years ago

Well, for now I will keep the beta version and if there will be more developments then we will see how ti goes. Keeping this issue open for now.

liebefuroscar commented 7 years ago

@hyperair Yes. In my case I allow access manually in settings menu.

liebefuroscar commented 7 years ago

screenshot_20170208-024640 screenshot_20170208-024607

screenshot_20170208-025135 screenshot_20170208-024847 Working perfectly on Android 7!!! Thank you So much Guys!!