device-admin

How do disable lockscreen in android?

故事扮演 提交于 2019-12-18 06:31:10
问题 I have my app registered as device administrator, with the appropriate lock screen permissions. I can access the method to lock the device, but cannot disable lockscreen. Is there an API method available that will disable lock? 回答1: Is there an API method available that will disable lock? NO this is not supported, for security reasons. all of that stuff was deprecated Disable/Delay Android Lock Screen Programmatically Android: remove or disable programmatically the Lock Screen on Samsung

Android: Programmatically remove my app from Device Administrator?

余生颓废 提交于 2019-12-12 08:24:30
问题 I'm trying to add a button to my app to remove it from Device Administrator and am using the code below but my app just crashes. Code:- On Button Click:- { ComponentName devAdminReceiver = new ComponentName(this, DemoDeviceAdminReceiver.class); DevicePolicyManager dpm = (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE); dpm.removeActiveAdmin(devAdminReceiver); } In the code above, DemoDeviceAdminReceiver is a class that extends DeviceAdminReceiver. Error log:- 10-28 15:26

How to Display Toast on Lock Screen after Failed Password Attempt

Deadly 提交于 2019-12-12 05:14:32
问题 I am trying to show a Toast on the lock screen after a user enters the wrong password 3 times. I am able to verify that the user has failed 3 times through the log console, but would like some message to show on the lock screen so the user knows. I am doing this in a DeviceAdminReceiver. I am able to Toast on a successful password submission, just not a failed one. import android.app.admin.DeviceAdminReceiver; import android.app.admin.DevicePolicyManager; import android.content.ComponentName;

Android - customize “your recent screens appear here” / “your recent apps” screen

[亡魂溺海] 提交于 2019-12-12 02:18:29
问题 I realy dint know how this screen is named :/ i called it after the message it shows when no app is running "your recent screens appear here". It basicly shows all apps currently runnning on the device. So you know what im talking about here screens (sry big and spammy) with and without running apps. The second screen also shows the google widget i want to get rid off. Is there a way to adjust the "your recent screens appear here" screen on Android phones and Tablets? Is there a solution

Xamarin MonoAndroid DeviceAdmin

混江龙づ霸主 提交于 2019-12-11 09:14:21
问题 I am using Visual Studio 2017, to develop an Android Single-View application. The application should be a kiosk app. I am targeting API 21, on an Emulator provided by Visual Studio (AVD Device). The issue I am having is that I cannot seem to make a valid DeviceAdminReceiver. I used this link as my guide: Android Kiosk Mode The sample works, but my code does not. The sample is for java. This is how my DeviceAdmiReceiver.cs: [BroadcastReceiver(Permission = "android.permission.BIND_DEVICE_ADMIN"

App removed in playstore cause using Device Administration in android Malformed AndroidManifest (android.app.action.DEVICE_ADMIN_ENABLED)

被刻印的时光 ゝ 提交于 2019-12-11 06:45:46
问题 my app had been removed on play store cause REASON FOR SUSPENSION: Violation of the dangerous products provision of the Content Policy: We don't allow content that harms, interferes with the operation of, or accesses in an unauthorized manner, networks, servers, or other infrastructure. After a regular review, we have determined that your app has a malformed AndroidManifest.xml file which may make it difficult for users to uninstall the app. In particular, the app’s AndroidManifest.xml

Wiping data on Android: Device Admin versus Profile Owner

十年热恋 提交于 2019-12-07 19:21:27
问题 Android 5.0 introduces a new concept of Profile Owner. In my understanding Profile Owner is an advanced version of Device Admin (exists in Android since 2.2). Both Device Admin and Profile Owner can wipe data via DevicePolicyManager.wipeData(0) . I would like to know if there is a difference in behaviour of such a call for Device Admin and Profile Owner. I guess for a pure Device Admin it should wipe entire device (factory reset), and for a Profile Owner it should only wipe data for the

Android Device Admin not working

让人想犯罪 __ 提交于 2019-12-06 16:47:07
I am new in android and i would like to lock the phone. So I Read through Device Admin documentation. and have my code looking like this. But it doesnt seem to notice it on my manifest suggests if i have it defined in it which i do my manifest.xml <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".MainLauncher"android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".Controller"android

Device Policy Manager - Reset Password - Android 3.0 Problems

早过忘川 提交于 2019-12-06 16:03:28
I am using Device Policy Manager in my Android App and I have a problem with Honeycomb devices. When attempting to call resetPassword I get an exception thrown. This is not the case in Froyo or Gingerbread, as both of those work fine. The error is: java.lang.RuntimeException: Unable to start receiver Package.Name.Test: java.lang.SecurityException: Permission Denial: writing com.android.providers.settings.SettingsProvider uri content://settings/secure from pid=x, uid=y requires android.permission.WRITE_SETTINGS My Android Code is as follows: DevicePolicyManager mDPM = (DevicePolicyManager)

Work around for Device admin api does not own profile

谁都会走 提交于 2019-12-06 11:15:30
问题 I was working my way through the device admin api, and while invoking the setPermissionGrantState function on the DevicePolicyManager I got Unable to start receiver com.xx.admin.receivers.AdminReceiver: java.lang.SecurityException: Admin ComponentInfo{com.xx/com.xx.admin.receivers.AdminReceiver} does not own the profile. I understand that there are certain functions that can be only run by device/profile owners. Further more that NFC provisioning and dpm command is the way through it. But