gameone Member Licensed User Jan 21, 2016 #1 Hi i'm using administrator library here: https://www.b4x.com/android/forum/threads/device-administrator-library.19208/ So i put xml file (device_admin.xml) into Objects/res/xml of my project with this content: <device-admin xmlns:android="http://schemas.android.com/apk/res/android"> <uses-policies> <limit-password /> <watch-login /> <reset-password /> <force-lock /> <wipe-data /> <expire-password /> <encrypted-storage /> <disable-camera /> <disable-keyguard-features /> </uses-policies> </device-admin> And in my manifest i have: AddManifestText( <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="8"/> <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:anyDensity="true"/>) AddApplicationText(<receiver android:name="anywheresoftware.b4a.objects.AdminManager$AdminReceiver" androidermission="android.permission.BIND_DEVICE_ADMIN"> <meta-data android:name="android.app.device_admin" android:resource="@xml/device_admin" /> <intent-filter> <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" /> </intent-filter> </receiver>) SetActivityAttribute(blackscreen,android:theme, @android:style/Theme.NoTitleBar.Fullscreen) SetApplicationAttribute(android:icon, "@drawable/icon") SetApplicationAttribute(android:label, "$LABEL$") Under my main activity i put into process globals this: Public manager As AdminManager But nothing !!! Under emulator or real phone they don't ask for admin right ? What i'm doing wrong ? Thanks u
Hi i'm using administrator library here: https://www.b4x.com/android/forum/threads/device-administrator-library.19208/ So i put xml file (device_admin.xml) into Objects/res/xml of my project with this content: <device-admin xmlns:android="http://schemas.android.com/apk/res/android"> <uses-policies> <limit-password /> <watch-login /> <reset-password /> <force-lock /> <wipe-data /> <expire-password /> <encrypted-storage /> <disable-camera /> <disable-keyguard-features /> </uses-policies> </device-admin> And in my manifest i have: AddManifestText( <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="8"/> <supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:anyDensity="true"/>) AddApplicationText(<receiver android:name="anywheresoftware.b4a.objects.AdminManager$AdminReceiver" androidermission="android.permission.BIND_DEVICE_ADMIN"> <meta-data android:name="android.app.device_admin" android:resource="@xml/device_admin" /> <intent-filter> <action android:name="android.app.action.DEVICE_ADMIN_ENABLED" /> </intent-filter> </receiver>) SetActivityAttribute(blackscreen,android:theme, @android:style/Theme.NoTitleBar.Fullscreen) SetApplicationAttribute(android:icon, "@drawable/icon") SetApplicationAttribute(android:label, "$LABEL$") Under my main activity i put into process globals this: Public manager As AdminManager But nothing !!! Under emulator or real phone they don't ask for admin right ? What i'm doing wrong ? Thanks u
KMatle Expert Licensed User Longtime User Jan 21, 2016 #3 gameone said: Nevermind i'm just kind stupid Click to expand... It would be nice to post the solution (even if it was a "stupid" thing) Upvote 0
gameone said: Nevermind i'm just kind stupid Click to expand... It would be nice to post the solution (even if it was a "stupid" thing)
gameone Member Licensed User Jan 21, 2016 #4 Sure i forgot to call Manage.enable("ask admin") So apk wasnt asking for admin right. Upvote 0
killiak Member Licensed User Longtime User Jan 21, 2016 #5 gameone said: Sure i forgot to call Manage.enable("ask admin") So apk wasnt asking for admin right. Click to expand... A good old "[SOLVED] Will be awesome Upvote 0
gameone said: Sure i forgot to call Manage.enable("ask admin") So apk wasnt asking for admin right. Click to expand... A good old "[SOLVED] Will be awesome