Best code examples for Android DevicePolicyManager class (android.app.admin.DevicePolicyManager)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android DevicePolicyManager class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android DevicePolicyManager examples from Open Source projects
This code example shows how to use the following methods: isAdminActive, lockNow, resetPassword
39:	policyManager.resetPassword(newPass,DevicePolicyManager.RESET_PASSWORD_REQUIRE_ENTRY); 
-
41:	policyManager.lockNow(); 
-
54:	return policyManager.isAdminActive(deviceAdmin); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: setPasswordMinimumLength, setPasswordMinimumUpperCase, setPasswordQuality
144:	mDPM.setPasswordQuality(mPolicyAdmin, PASSWORD_QUALITY_VALUES[mPasswordQuality]); 
145:	mDPM.setPasswordMinimumLength(mPolicyAdmin, mPasswordLength); 
-
147:	mDPM.setPasswordMinimumUpperCase(mPolicyAdmin, mPasswordMinUpperCase); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: getPasswordExpirationTimeout, getPasswordHistoryLength, getPasswordMinimumLetters, getPasswordMinimumLowerCase, getPasswordMinimumNonLetter
62:	ei3.setStringValue(Integer.valueOf(dpm.getPasswordHistoryLength(null)) 
-
70:	ei5.setStringValue(Integer.valueOf(dpm.getPasswordMinimumLetters(null)) 
-
78:	dpm.getPasswordMinimumLowerCase(null)).toString()); 
-
85:	dpm.getPasswordMinimumNonLetter(null)).toString()); 
-
91:	ei8.setStringValue(Integer.valueOf(dpm.getPasswordMinimumNumeric(null)) 
-
98:	ei9.setStringValue(Integer.valueOf(dpm.getPasswordMinimumSymbols(null)) 
-
106:	dpm.getPasswordMinimumUpperCase(null)).toString()); 
-
112:	dpm.getPasswordExpirationTimeout(null))); 
Full Snippet Info
7
CodeRank
This code example shows how to use the following methods: isAdminActive
52:	pref.setChecked(mgr.isAdminActive(cn)); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: isAdminActive, setMaximumFailedPasswordsForWipe, setPasswordMinimumLength, setPasswordQuality
270:	boolean active = mDPM.isAdminActive(mDeviceAdminSample); 
-
272:	mDPM.setPasswordQuality(mDeviceAdminSample, pwQuality); 
273:	mDPM.setPasswordMinimumLength(mDeviceAdminSample, pwLength); 
274:	mDPM.setMaximumFailedPasswordsForWipe(mDeviceAdminSample, maxFailedPw); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: isAdminActive, setMaximumTimeToLock
420:	boolean active = mDPM.isAdminActive(mDeviceAdminSample); 
-
423:	mDPM.setMaximumTimeToLock(mDeviceAdminSample, timeMs); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: getStorageEncryptionStatus
75:	isFileSystemEncrypted = devicePolicyManager.getStorageEncryptionStatus() == DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE; 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow, resetPassword
23:	if (dpm.isAdminActive(new ComponentName(context, CustomDeviceAdminReceiver.class))) { 
-
27:	dpm.resetPassword(prefs.getString("key_password", ""), DevicePolicyManager.RESET_PASSWORD_REQUIRE_ENTRY); 
-
30:	dpm.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
57:	if (!mDPM.isAdminActive(mAdminName)) { 
-
66:	mDPM.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow, resetPassword
54:	if (!mDPM.isAdminActive(mDeviceAdmin)) { 
-
64:	mDPM.resetPassword("test", 0); 
65:	mDPM.lockNow(); 
Full Snippet Info
6
CodeRank
This code example shows how to use the following methods: isAdminActive, resetPassword
354:	boolean active = mDPM.isAdminActive(mDeviceAdminSample); 
-
356:	mDPM.resetPassword(mPassword.getText().toString(), 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
20:	boolean active = devicePolicyManager.isAdminActive(componentName); 
-
23:	devicePolicyManager.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow, resetPassword
90:	{	boolean active = mDPM.isAdminActive(mDeviceAdminSample); 
-
92:	mDPM.resetPassword(password,DevicePolicyManager.RESET_PASSWORD_REQUIRE_ENTRY); 
-
98:	mDPM.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, wipeData
406:	boolean active = mDPM.isAdminActive(mDeviceAdminSample); 
-
408:	mDPM.wipeData(v == mWipeAllDataButton 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getKeyguardDisabledFeatures
40:	int keyguard = dpm.getKeyguardDisabledFeatures(null); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getCameraDisabled
54:	ei1.setStringValue(Boolean.toString(dpm.getCameraDisabled(null))); // API 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
62:	if (policyManager.isAdminActive(componentName)) { 
-
66:	policyManager.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getKeyguardDisabledFeatures, isAdminActive
50:	if (mgr.isAdminActive(cn)) { 
-
53:	int status=mgr.getKeyguardDisabledFeatures(cn); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
95:	if (!devicePolicyManager.isAdminActive(adminComponent)) { 
-
101:	devicePolicyManager.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
78:	if(mDPM.isAdminActive(mAdminReceiver)){ 
79:	mDPM.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
81:	if (!devicePolicyManager.isAdminActive(adminComponent)) { 
-
87:	devicePolicyManager.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
62:	boolean active = mDPM.isAdminActive(mDeviceAdminSample); 
-
73:	mDPM.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
29:	if (dpm.isAdminActive(who)) {//判断who是否被激活 
30:	dpm.lockNow();//锁屏 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
40:	if (!devicePolicyManager.isAdminActive(adminComponent)) { 
-
46:	devicePolicyManager.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
44:	if (policyManager.isAdminActive(componentName)) {// ÅжÏÊÇ·ñÓÐȨÏÞ(¼¤»îÁËÉ豸¹ÜÀíÆ÷) 
45:	policyManager.lockNow();// Ö±½ÓËøÆÁ 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
57:	boolean active = policyManager.isAdminActive(componentName); 
-
59:	policyManager.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
79:	boolean active = policyManager.isAdminActive(componentName); 
-
88:	policyManager.lockNow();// ֱ������ 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
32:	boolean active = mDPM.isAdminActive(mDeviceAdminSample); 
-
34:	else mDPM.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
18:	boolean active = mDPM.isAdminActive(mDeviceAdmin); 
-
20:	mDPM.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
18:	boolean active = mDPM.isAdminActive(mDeviceAdmin); 
-
20:	mDPM.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
25:	if (dpm.isAdminActive(who)) {// 判断who是否被激活 
26:	dpm.lockNow();// 锁屏 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: getGlobalProxyAdmin
99:	final boolean userSetGlobalProxy = (dpm.getGlobalProxyAdmin() == null); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, removeActiveAdmin
60:	boolean active = policyManager.isAdminActive(componentName); 
-
62:	policyManager.removeActiveAdmin(componentName); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, wipeData
19:	boolean active = mDPM.isAdminActive(mDeviceAdmin); 
-
22:	mDPM.wipeData(0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, wipeData
98:	if (!devicePolicyManager.isAdminActive(componentName)) { 
-
103:	devicePolicyManager.wipeData(0); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: isAdminActive, wipeData
19:	boolean active = mDPM.isAdminActive(mDeviceAdmin); 
-
22:	mDPM.wipeData(0); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, lockNow
21:	System.out.println("resault:      "+localDevicePolicyManager.isAdminActive(localComponentName)); 
22:	if (localDevicePolicyManager.isAdminActive(localComponentName)) { 
23:	localDevicePolicyManager.lockNow(); 
Full Snippet Info
5
CodeRank
This code example shows how to use the following methods: isAdminActive, setMaximumTimeToLock
31:	if (!devicePolicyManager.isAdminActive(componentName)) { 
-
44:	devicePolicyManager.setMaximumTimeToLock(componentName, locktimeout); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: getStorageEncryptionStatus
530:	if (dpm.getStorageEncryptionStatus() != DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE) { 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: lockNow
50:	dpm.lockNow(); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: isAdminActive, removeActiveAdmin
275:	boolean active = mDevicePolicyManager.isAdminActive(componentName); 
-
304:	mDevicePolicyManager.removeActiveAdmin(componentName); 
Full Snippet Info
4
CodeRank
This code example shows how to use the following methods: isAdminActive, removeActiveAdmin
221:	boolean active = mDPM.isAdminActive(mDeviceAdminSample); 
-
331:	mDPM.removeActiveAdmin(mDeviceAdminSample); 
Full Snippet Info
4
CodeRank
Related Android DevicePolicyManager Questions & Answers:
Other Android DevicePolicyManager Examples
1:	DevicePolicyManager mDPM = (DevicePolicyManager)
2:	        context.getSystemService(Context.DEVICE_POLICY_SERVICE);
3:	ComponentName mPolicyAdmin = new ComponentName(context, PolicyAdmin.class);
-
1:	DevicePolicyManager mDPM = (DevicePolicyManager)
2:	        context.getSystemService(Context.DEVICE_POLICY_SERVICE);
3:	ComponentName mPolicyAdmin = new ComponentName(context, PolicyAdmin.class);

Read More

See Code Examples for Android DevicePolicyManager Methods: