moseoridev / WarpShare

An Open-source AirDrop Alternative
Apache License 2.0
615 stars 40 forks source link

[BUG] Use location permission instead of nearby devices on older android versions #9

Open gege-d opened 1 year ago

gege-d commented 1 year ago

Describe the bug On older android versions where nearby devices permission is included in location permission setup gets stuck.

To Reproduce Steps to reproduce the behavior:

  1. Install app on e.g. android 8.1
  2. Click on grant permissions
  3. Will only ask for file access
  4. Still on setup screen

Expected behavior Ask for location permission.

Smartphone (please complete the following information):

Additional context I think nearby devices permission was invented in android 11 or 12.

moseoridev commented 1 year ago

I know there is a bug in permission handling in older android versions. Let me investigate this a little further.

gege-d commented 1 year ago

I was able to fix this, I forked your repository. I don't really want to open a PR because my code is quite messy and it does not ask for enabling GPS (which is required on those Android versions). You can take a look at it, this would also solve #16 and the comments in #7 with Android 11 or older.