Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement single application mode (COSU) in Android?

Tags:

android

cosu

Looking for solution to integrate COSU mode in Android.I have already gone through below links,

https://developer.android.com/work/cosu.html

Has anyone implemented it successfully?

like image 576
cjd Avatar asked Jun 29 '17 15:06

cjd


People also ask

What is COSU in Android?

Dedicated devices (formerly called corporate-owned single-use, or COSU) are fully managed devices that serve a specific purpose.

What are COSU devices?

COSU devices fulfill a single use case, such as digital signage, ticket printing, or inventory management. Administrators restrict these devices to one app or small set of apps. Administrators also prevent users from enabling other apps or performing other actions on the device.

What is Android dedicated device?

The dedicated device solution set is designed for company-owned devices that fulfill a single use case such as digital signage, ticket printing, or inventory management. This solution set allows IT admins to further lock down the usage of a device to a single app or small set of apps.


2 Answers

Take a look at this tutorial and that repository with example.

...
if (mDevicePolicyManager.isLockTaskPermitted(
        getApplicationContext().getPackageName())) {
    Intent lockIntent = new Intent(getApplicationContext(),
            LockedActivity.class);
    lockIntent.putExtra(EXTRA_FILEPATH, mCurrentPhotoPath);
    startActivity(lockIntent);
    finish();
} else {
    Toast.makeText(getApplicationContext(),
            R.string.not_lock_whitelisted,Toast.LENGTH_SHORT)
            .show();
}
...
like image 86
Andrii Omelchenko Avatar answered Oct 23 '22 22:10

Andrii Omelchenko


You might want to try Google's new Android Management API, it allows to manage COSU devices without having to build an on-device agent (a device policy controller).

like image 34
Fred Avatar answered Oct 23 '22 22:10

Fred