on devices, app correctly asks permissions while sidloading. on others (android 6.0), not ask permissions while sideloading @ all. permissions listed in manifest.xml (below) , work devices (android 5.0). on other devices (android 4.0, 6.0.1), asks permissions should not seem incorporate of them. popup below example of happens when button send sms clicked.
i have had limited testing , problems seems little different depending on android version device running. being said, stemming different, wouldn't know.
does know why happening?
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.catalizeapp.catalize_ss25"> <uses-permission android:name="android.permission.get_accounts" /> <uses-permission android:name="android.permission.read_profile" /> <uses-permission android:name="android.permission.send_sms" /> <uses-permission android:name="android.permission.read_contacts" /> <application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="catalize" android:supportsrtl="true" android:theme="@style/apptheme"> <activity android:name=".loginactivity" android:label="catalize"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.search" /> </intent-filter> <meta-data android:name="android.app.default_searchable" android:value="contacts" /> <meta-data android:name="android.app.searchable" android:resource="@xml/searchable" /> </activity> <activity android:name=".contacts" /> <activity android:name=".account" android:theme="@style/supercoolappbaractivity"/> <meta-data android:name = "android.support.parent_activity" android:value= ".contacts"/> <activity android:name=".reportbug"> <meta-data android:name = "android.support.parent_activity" android:value=".contacts"/> </activity> </application></manifest>
(image) when button should send text message clicked, pops instead of executing action of button
according documentation:
if device running android 6.0 or higher, , app's target sdk 23 or higher: app has list permissions in manifest, , must request each dangerous permission needs while app running. user can grant or deny each permission, , app can continue run limited capabilities if user denies permission request. that's reason why althought have declared permissions in manifest file still need ask them @ runtime.
as workaround can set minsdkversion < 23, documentation says:
note: beginning android 6.0 (api level 23), users can revoke permissions app @ time, if app targets lower api level. should test app verify behaves when it's missing needed permission, regardless of api level app targets. also, according permissions best practices should test against both permission models provide better user experience.
Comments
Post a Comment