Android: fix broken permissions

In trying to avoid the wrath of the Google Play police I ended up giving
up too many permissions. And while in my test installs things continued
to work, in new installs on Android 10 or newer the lack of
FINE_LOCATION permission resulted in BLE scans no longer working.

The frustrating thing is that apparently installing an update with a
different set of permissions isn't enough to trigger either the bug or
the fix (at least not reliably). What appears to work is to uninstall
the existing app and then do a fresh install of a new app with the
correct permissions.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2021-10-18 20:01:25 +00:00
parent c2a9da89cc
commit ef5c94bb81

View file

@ -92,17 +92,8 @@
<!--
The following comment will be replaced upon deployment with default permissions based on the dependencies of the application.
Remove the comment if you do not require these default permissions.
%% no space here INSERT_PERMISSIONS
this always requests FINE_LOCATION which I no longer want to deal with - so instead manually request what we know we need.
stupidly COARSE LOCATION appears to be necessary for BLE
-->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<!-- %%INSERT_PERMISSIONS -->
<!--
The following comment will be replaced upon deployment with default features based on the dependencies of the application.