Is it possible make an activity, that will lock the android device?
That device would be unlocked only after entering right PIN number.
During lock, user can't call,message, and can't view notifications,contacts,call logs,storage data,...
For this you can take advantage of the Device Administration API introduced in Android 2.2. This does require the user to accept that your application wants to have control of the device but obviously you would need to disclose that information anyway. Also it should be noted that on a phone (at least in the US) you must always have access to make emergency phone calls.
Using the API you can enforce a pin lock be set and also invoke the lock screen at will in addition to many other administration features.
Related
While applying lock command through android-management-api in the device, the device will be locked. But if users know the password, they can able to unlock the device and use the applications in the device.
My requirement is to disable all applications for a specific amount of time. Is there any possibility to achieve this functionality through android-management-api?
If you want to lock the device and prevent user access entirely, you can reset the device’s password and then lock the device using issueCommand: RESET_PASSWORD and LOCK.
You can also use Devices.patch() and set state to “DISABLED” to disable all the applications (for fully managed devices) or work apps (when enrolled in work profile) from the device.
If perhaps you want to achieve this because of compliance issues, then the IT admin can wipe the device (for fully managed), remove any corporate apps from the device, or remove the work profile. This can also be automated by using compliance rules.
use disable key word and set as true in application policy to disable the app.
Try this link.
And also vote me if it works fine.
https://developers.google.com/android/management/reference/rest/v1/enterprises.policies#applicationpolicy
I have a Philips Android TV and I'm looking to power on / power off (standby) the TV screen from the code of an Android application.
Is it possible?
Which API allow to activate the screen?
Which API to set the TV back in standby?
I've searched Android API documentation and on internet but I've not found an API for that.
According to Declaring permissions that imply hardware features there is no permission that would enable such a function, and I think it makese sense since a user application should not be able to control an external device screen, that runs in an protected context, different from connected devices such as gamepad, camera, etc.
That said, this does not mean that it's not possibile in any case
What an app can do is to keep the screen device on i.e. not lock the screen while the app is being used that is Keeping the Device Awake.
This is all related to the device policies handled by the DevicePolicyManager i.e. the interface for managing policies enforced on a device.
My app uses sensitive data of patients . I will have to allow the user
to open the app one and only if he uses android's any default security lock(pattern or pin or any) . How will I get the phone security status. if it does not use any locking mechanism to lock the phone i will have to enforce him to lock and exit the app.
The device management APIs allow you to determine the general security status of the device, such as getPasswordQuality() on DevicePolicyManager.
I have recently been reviewing Android's Device Administration API in order to find a way to protect a device from having certain apps forcefully stopped or uninstalled. I came across wipeData() as follows:
http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#wipeData(int)
What is the point of this if a user can simply wipe the data from the device's "Settings" menu? When I originally posted this question, I didn't realize that one effective use could be to remotely wipe a device. I get that, but what I'm specifically after is protecting certain features so that a user cannot access them outside of an app that has been granted policies that manager those features.
For example, on my particular device, I can choose System Settings->Backup & reset->Factory data reset and clear everything. A similar case can be made for many of the other options exposed by DevicePolicyManager.
When using the Device Administration API, is there a way to disable these built-in features so that only the app registered for the Device Administration API can perform them?
what I'm specifically after is protecting certain features so that a user cannot access them outside of an app that has been granted policies that manager those features
There is no meta device administration (i.e., the administration of device admins).
A similar case can be made for many of the other options exposed by DevicePolicyManager
The user has the ability to do nearly nothing offered by DevicePolicyManager.
For example, the user cannot block the camera from the lockscreen, nor can the user block app widgets from the lockscreen, which is why I had to write a utility to do that (as I didn't want to install a closed-source device admin from the Play Store).
Most of the methods on DevicePolicyManager revolve around password quality, and the user cannot set policies for his/her own passwords and have them be enforced.
And so on.
When using the Device Administration API, is there a way to disable these built-in features so that only the app registered for the Device Administration API can perform them?
By definition, only device admins can do device admin things. However, there is no way for one device admin to block another device admin. The only sort-of exception to this is in terms of the various password quality settings, where the strongest setting is applied.
What I would like to do is create an app on the Android that allows the following:
Allows the phone to have two unlock pin codes. One unlock code will the the master "normal" code. The second unlock code will allow the user to receive and send texts, make and receive phone calls, store pictures, and contacts that will not show up in the "normal" screen.
You cannot do this with an app. Apps cannot change system behaviour unless they are 'system administrator' apps. Even those cannot do such fine grained control, only impose restrictions on unlock code strength, camera use and device encryption. As others have noted, Android 4.2 supports multiple users (on tablets only), which gives you a separate unlock code for each user. Additionally, some operations that affect the whole device, such as adding new users, adding or removing trusted certificates, accessing the secure element, etc. are reserved for the first/primary user. You can't place calls with a tablet though, so multiple users doesn't really apply to calling/SMS.