简体   繁体   中英

can one give an android app permission it didn't ask for?

I believe this would make my old widget work on the new versions of the OS. Google has in its great wisdom changed the way permissions are dealt with, and the widget I'm fond of has stopped working...

This is about location permission to a widget that displays the SSID.

Possible?

It depends to your permission. For some permissions you don't need to ask user to grant that permission to app. But for some of them you should get permission of user, otherwise you can't use that. Finding current location needs user to have permission to app. For example for location access you should add permission to your manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest ...>

    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

    <application
       ...
    </application>

</manifest>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM