1 page.title=Android for Work 2 page.metaDescription=Android N Android for Work API 3 page.keywords="android for work", "android N", "enterprise", "QR code" 4 5 @jd:body 6 7 8 9 10 11 <div id="qv-wrapper"> 12 <div id="qv"> 13 <h2></h2> 14 <ol> 15 <li><a href="#qr">QR </a> 16 </li> 17 18 <li><a href="#sec-challenge"></a> 19 </li> 20 21 <li><a href="#suspend"></a> 22 </li> 23 24 <li><a href="#toggle-work"></a> 25 </li> 26 27 <li><a href="#always-on-vpn">Always-On VPN</a> 28 </li> 29 30 <li><a href="#contacts"></a> 31 </li> 32 33 <li><a href="#remote-reboot"></a> 34 </li> 35 36 <li><a href="#disable-roaming"></a> 37 </li> 38 39 <li><a href="#process-logging"></a> 40 </li> 41 42 <li><a href="#bug-reports"></a> 43 </li> 44 45 <li><a href="#remove-cert"></a> 46 </li> 47 48 <li><a href="#grant-cert-on-install"></a> 49 </li> 50 51 <li><a href="#ui-policy"> UI </a> 52 </li> 53 54 <li><a href="#restrictions-mgmt"></a> 55 </li> 56 57 <li><a href="#location-off"></a> 58 </li> 59 60 <li><a href="#custom-provisioning"></a> 61 </li> 62 63 <li><a href="#multi-wifi-ca"> Wi-Fi CA </a> 64 </li> 65 66 <li><a href="#custom-lock"></a> 67 </li> 68 69 <li><a href="#work-connectionservice"> ConnectionService</a> 70 </li> 71 72 <li><a href="#lock-wp"></a> 73 </li> 74 75 <li><a href="#lock-user-icon"></a> 76 </li> 77 78 <li><a href="#health-monitoring"></a> 79 </li> 80 81 </ol> 82 83 <h2></h2> 84 <ul> 85 <li><a href="{@docRoot}preview/setup-sdk.html#docs-dl">N Preview SDK </a> 86 </li> 87 </ul> 88 </div> 89 </div> 90 91 <p> Android N Android for Work 92 </p> 93 94 <h2 id="qr">QR </h2> 95 96 <p> 97 Android for Work QR 98 QR 99 100 </p> 101 102 <h2 id="sec-challenge"></h2> 103 104 <p> 105 106 107 108 109 110 </p> 111 112 <p> 113 {@link 114 android.app.admin.DevicePolicyManager#ACTION_SET_NEW_PASSWORD} Intent 115 <code>ACTION_SET_NEW_PARENT_PROFILE_PASSWORD</code> Intent 116 117 118 </p> 119 120 <p> 121 122 123 124 {@link android.app.admin.DevicePolicyManager} {@link 125 android.app.admin.DevicePolicyManager#setPasswordQuality 126 setPasswordQuality()} {@link 127 android.app.admin.DevicePolicyManager#setPasswordMinimumLength 128 setPasswordMinimumLength()} 129 130 <code>DevicePolicyManager.getParentProfileInstance()</code> {@link android.app.admin.DevicePolicyManager} 131 132 133 {@link android.app.admin.DevicePolicyManager} <code>setOrganizationColor()</code> <code>setOrganizationName()</code> 134 135 136 137 </p> 138 139 <p> 140 <a href="{@docRoot}preview/setup-sdk.html#docs-dl">N Preview SDK </a> <code>DevicePolicyManager</code> 141 142 </p> 143 144 <h2 id="suspend"></h2> 145 146 <p> 147 <code>DevicePolicyManager.setPackagesSuspended()</code> 148 149 150 </p> 151 152 <p> 153 Activity <a href="{@docRoot}guide/components/recents.html"></a> 154 155 <a href="{@docRoot}guide/components/recents.html"></a> Snackbar 156 157 158 </p> 159 160 <p> 161 UI 162 163 <code>DevicePolicyManager.getPackageSuspended()</code> 164 165 </p> 166 167 <h2 id="toggle-work"></h2> 168 169 <p> 170 171 172 173 174 175 176 177 </p> 178 179 <h2 id="always-on-vpn">Always-On VPN</h2> 180 181 <p> 182 VPN 183 VPN 184 185 </p> 186 187 <p> 188 <code>DevicePolicyManager.setAlwaysOnVpnPackage()</code> VPN 189 <code>DevicePolicyManager.GetAlwaysOnVpnPackage()</code> VPN 190 191 192 </p> 193 194 <p> 195 VPN VPN Always on VPN 196 {@link android.net.VpnService android.net.VpnService} Intent 197 198 199 </p> 200 201 <p> 202 <strong>Settings > More > VPN</strong> {@link 203 android.net.VpnService} Always on VPN 204 205 </p> 206 207 <h2 id="contacts"></h2> 208 209 <p> 210 211 212 213 214 </p> 215 216 <p> 217 API 218 219 220 </p> 221 222 <ul> 223 <li><code>ContactsContract.Contacts.ENTERPRISE_CONTENT_FILTER_URI</code> 224 </li> 225 226 <li><code>ContactsContract.Phone.ENTERPRISE_CONTENT_FILTER_URI</code> 227 </li> 228 229 <li><code>ContactsContract.Email.ENTERPRISE_CONTENT_FILTER_URI</code> 230 </li> 231 232 <li><code>ContactsContract.Callable.ENTERPRISE_CONTENT_FILTER_URI</code> 233 </li> 234 235 <li><code>ContactsContract.Directory.ENTERPRISE_CONTENT_URI</code> 236 </li> 237 238 <li><code>ContactsContract.Directory.isEntepriseDirectoryId()</code> 239 </li> 240 </ul> 241 242 <p> 243 244 245 </p> 246 247 <ul> 248 <li> 249 <code>DevicePolicyManager.setCrossProfileContactsSearchDisabled()</code> 250 </li> 251 252 <li> 253 <code>DevicePolicyManager.getCrossProfileContactsSearchDisabled()</code> 254 </li> 255 </ul> 256 257 <h2 id="remote-reboot"></h2> 258 259 <p> 260 261 <code>DevicePolicyManager.reboot()</code> 262 263 264 </p> 265 266 <h2 id="disable-roaming"></h2> 267 268 <p> 269 {@link 270 android.os.UserManager} <code>DISALLOW_DATA_ROAMING</code> 271 </p> 272 273 <h2 id="process-logging"></h2> 274 275 <p> 276 ADB Activity 277 278 <code>DevicePolicyManager.setSecurityLoggingEnabled()</code> 279 280 </p> 281 282 <p> 283 API 284 </p> 285 286 <ul> 287 288 <li> 289 <code>android.app.admin.SecurityLog</code> 290 291 </li> 292 293 <li> 294 <code>void DevicePolicyManager.setSecurityLoggingEnabled()</code> 295 </li> 296 297 <li> 298 <code>boolean DevicePolicyManager.isSecurityLoggingEnabled()</code> 299 </li> 300 301 <li> 302 <code>List<SecurityEvent> 303 DevicePolicyManager.retrieveSecurityLogs()</code> 304 </li> 305 306 <li> 307 <code>List<SecurityEvent> 308 DevicePolicyManager.retrievePreRebootSecurityLogs()</code> 309 </li> 310 311 <li> 312 <code>void DeviceAdminReceiver.onSecurityLogsAvailable()</code> 313 </li> 314 </ul> 315 316 <h2 id="bug-reports"></h2> 317 318 <p> 319 320 321 322 323 </p> 324 325 <p> 326 Android N API <a href="{@docRoot}preview/setup-sdk.html#docs-dl">N Preview SDK </a> 327 328 329 </p> 330 331 <ul> 332 <li> 333 <code>DevicePolicyManager.requestBugreport()</code> 334 </li> 335 336 <li> 337 <code>DeviceAdminReceiver.onBugreportFailed()</code> 338 </li> 339 340 <li> 341 <code>DeviceAdminReceiver.onBugreportShared()</code> 342 </li> 343 344 <li> 345 <code>DeviceAdminReceiver.onBugreportSharingDeclined()</code> 346 </li> 347 348 <li> 349 <code>DeviceAdminReceiver.BUGREPORT_FAILURE_FAILED_COMPLETING</code> 350 </li> 351 352 <li> 353 <code>DeviceAdminReceiver.BUGREPORT_FAILURE_FILE_NO_LONGER_AVAILABLE</code> 354 </li> 355 </ul> 356 357 <h2 id="remove-cert"></h2> 358 359 <p> 360 <code>DevicePolicyManager.removeKeyPair()</code> {@link android.app.admin.DevicePolicyManager#installKeyPair 361 installKeyPair()} 362 363 364 </p> 365 366 <h2 id="grant-cert-on-install"> 367 </h2> 368 369 <p> 370 371 372 373 </p> 374 375 <p> 376 API 377 </p> 378 379 <ul> 380 <li><code>DevicePolicyManager.installKeyPair()</code> 381 </li> 382 </ul> 383 384 <h2 id="ui-policy"> UI </h2> 385 386 <p> 387 IT 388 389 SettingsAction not allowedIT {@link android.app.admin.DevicePolicyManager} 390 391 392 393 </p> 394 395 <ul> 396 <li> 397 <code>DevicePolicyManager.setShortSupportMessage()</code> 398 </li> 399 400 <li> 401 <code>DevicePolicyManager.setLongSupportMessage()</code> 402 </li> 403 </ul> 404 405 <h2 id="restrictions-mgmt"></h2> 406 407 <p> 408 <code>DevicePolicyManager.setApplicationRestrictionsManagingPackage()</code> 409 410 411 <code>DevicePolicyManager.isCallerApplicationRestrictionsManagingPackage()</code> 412 413 414 </p> 415 416 <p> 417 {@link 418 android.app.admin.DevicePolicyManager#setApplicationRestrictions 419 setApplicationRestrictions()} {@link 420 android.app.admin.DevicePolicyManager#getApplicationRestrictions 421 getApplicationRestrictions()} 422 </p> 423 424 <h2 id="location-off"></h2> 425 426 <p> 427 428 Location Settings 429 430 431 </p> 432 433 <p> 434 435 436 </p> 437 438 <h2 id="custom-provisioning"></h2> 439 440 <p> 441 442 443 </p> 444 445 <dl> 446 <dt> 447 <code>DevicePolicyManager.EXTRA_PROVISIONING_MAIN_COLOR</code> 448 </dt> 449 450 <dd> 451 452 </dd> 453 454 <dt> 455 <code>DevicePolicyManager.EXTRA_PROVISIONING_LOGO_URI</code> 456 </dt> 457 458 <dd> 459 460 </dd> 461 </dl> 462 463 <h2 id="multi-wifi-ca"> Wi-Fi CA </h2> 464 465 <p> 466 Wi-Fi CA 467 Wi-Fi SSID CAIT <code>setCaCertificates()</code> CA Wi-Fi 468 469 470 471 </p> 472 473 <p> 474 API 475 </p> 476 477 <ul> 478 <li> 479 <code>WifiEnterpriseConfig.setCaCertificates()</code> 480 </li> 481 482 <li> 483 <code>WifiEnterpriseConfig.getCaCertificates()</code> 484 </li> 485 </ul> 486 487 <h2 id="custom-lock"></h2> 488 489 <p> 490 491 492 {@link android.app.admin.DevicePolicyManager} 493 </p> 494 495 <ul> 496 <li> 497 <code>setDeviceOwnerLockScreenInfo()</code> 498 </li> 499 500 <li> 501 <code>getDeviceOwnerLockScreenInfo()</code> 502 </li> 503 </ul> 504 505 <h2 id="work-connectionservice"> ConnectionService</h2> 506 507 <p> 508 {@link android.telecom.ConnectionService} 509 510 511 UI 512 513 514 515 </p> 516 517 <p> 518 <code>android.telecom.Call.PROPERTY_WORK_CALL</code> 519 520 521 522 </p> 523 524 <h2 id="lock-wp"></h2> 525 526 <p> 527 (<code>DISALLOW_SET_WALLPAPER</code>) 528 529 530 531 532 ({@link android.app.WallpaperManager#isWallpaperSupported 533 isWallpaperSupported()}) <code>WallpaperManager.isWallpaperSettingAllowed()</code> 534 535 536 537 </p> 538 539 <h2 id="lock-user-icon"></h2> 540 541 <p> 542 (<code>DISALLOW_SET_USER_ICON</code>) 543 544 545 546 </p> 547 548 <h2 id="health-monitoring"></h2> 549 550 <p> 551 <code>HardwarePropertiesManager</code> CPU GPU CPU 552 553 554 555 556 </p> 557