Kiwix-android: ZimHostFragment/Activity is not requesting ACCESS_COARSE_LOCATION on Android 10

Created on 18 Aug 2020  路  7Comments  路  Source: kiwix/kiwix-android

Describe the bug

ZimHostFragment/Activity requires the coarse location permission to access wifi information. This permission is never requested on zim host starting.

Expected behavior

I think the permission should be requested if the user is connected to wifi (wifiManager.isWifiEnabled) and the user clicks the "Start Server" button in ZimHost*. Similarly to how the permission is requested if the user searches for devices in the LocalFileTransferActivity.

Steps to reproduce the behavior:

  1. Make sure the location permission for Kiwix is denied.
  2. Open ZimHost.
  3. Make sure you are connected to wifi.
  4. Click "Start Server".
  5. Notice that a dialog opens requesting the user to enable wifi, or hotspot instead of requesting permissions.

Screenshots

image
image (1)
118095866_329523881511613_7800025852129703092_n

bug good first issue

All 7 comments

As a note: I cannot replicate this issue. Issue discovered on the zimHost to fragment ticket. Currently on oneActivity branch.

@Frans-Lukas can you verify this behaviour on develop, when you have the time

Same issue on develop-branch.

Edit: Will try on some emulators, if possible.
Edit2: Yup, same issue on one emulator, on develop.

image

Seems to depend on the OS version?

Permission is not required for:

  • Android Version 9 (API 28), Pixel 2 Emulated

Permission is required for:

  • Android Version 10. One Plus Nord
  • Android Version 10 (API 29). Nexus 4 Emulated

Excellent issue identified

@Frans-Lukas Hi, Can I work on this?

Yes! Assigning you.

@macgills Should we add 3.4 milestones here?

It seems @NullByte08 is offline for this project for a while.so I am taking this issue.

Was this page helpful?
0 / 5 - 0 ratings