Google android developer support

Содержание
  1. Developer guide
  2. Prerequisites
  3. Work profiles
  4. Key features of a work profile
  5. Work profile benefits on Android 5.0+
  6. Considerations for work profiles
  7. Prevent intents from failing between profiles
  8. Share files across profiles
  9. Implement managed configurations
  10. Best practices for implementing managed configurations
  11. When first launching the app
  12. Listen for changes to managed configurations
  13. Dedicated devices
  14. Set up single sign-on with Chrome custom tabs
  15. Requirements
  16. How do I implement SSO with custom tabs?
  17. Test your app
  18. Use Test DPC to test your Android app
  19. Provision a work profile
  20. Provision a fully managed device
  21. End-to-end testing
  22. SDK Platform Tools release notes
  23. Downloads
  24. Revisions
  25. 31.0.3 (August 2021)
  26. 31.0.2 (April 2021)
  27. 31.0.1 (March 2021)
  28. 31.0.0 (February 2021)
  29. 30.0.5 (November 2020)
  30. 30.0.4 (July 2020)
  31. 30.0.3 (June 2020)
  32. 30.0.2 (June 2020)
  33. 30.0.1 (May 2020)
  34. 30.0.0 (April 2020)
  35. 29.0.6 (February 2020)
  36. 29.0.5 (October 2019)
  37. 29.0.4 (September 2019)
  38. 29.0.3 (September 2019)
  39. 29.0.2 (July 2019)
  40. 29.0.1 (June 2019)
  41. 29.0.0 (June 2019)
  42. 28.0.2 (March 2019)
  43. 28.0.1 (September 2018)
  44. 28.0.0 (June 2018)
  45. 27.0.1 (December 2017)
  46. 27.0.0 (December 2017)
  47. 26.0.2 (October 2017)
  48. 26.0.1 (September 2017)
  49. 26.0.0 (June 2017)
  50. 25.0.5 (April 24, 2017)
  51. 25.0.4 (March 16, 2017)
  52. 25.0.3 (December 16, 2016)
  53. 25.0.2 (December 12, 2016)
  54. 25.0.1 (November 22, 2016)
  55. 25.0.0 (October 19, 2016)
  56. 24.0.4 (October 14, 2016)
  57. Download Android SDK Platform-Tools
  58. Terms and Conditions
  59. 1. Introduction
  60. 2. Accepting this License Agreement
  61. 3. SDK License from Google
  62. 4. Use of the SDK by You
  63. 5. Your Developer Credentials
  64. 6. Privacy and Information
  65. 7. Third Party Applications
  66. 8. Using Android APIs
  67. 9. Terminating this License Agreement
  68. 10. DISCLAIMER OF WARRANTIES
  69. 11. LIMITATION OF LIABILITY
  70. 12. Indemnification
  71. 13. Changes to the License Agreement
  72. 14. General Legal Terms
  73. Download Android SDK Platform-Tools
  74. Terms and Conditions
  75. 1. Introduction
  76. 2. Accepting this License Agreement
  77. 3. SDK License from Google
  78. 4. Use of the SDK by You
  79. 5. Your Developer Credentials
  80. 6. Privacy and Information
  81. 7. Third Party Applications
  82. 8. Using Android APIs
  83. 9. Terminating this License Agreement
  84. 10. DISCLAIMER OF WARRANTIES
  85. 11. LIMITATION OF LIABILITY
  86. 12. Indemnification
  87. 13. Changes to the License Agreement
  88. 14. General Legal Terms
  89. Download Android SDK Platform-Tools

Developer guide

Android’s enterprise features provide organizations with a secure, flexible, and unified Android mobility platform—combining devices, applications, and management. Android apps are compatible with Android’s enterprise features by default. However, there are additional features you can use to make your app work best on managed Android devices:

  • Work profile compatibility—Modify your Android app so it functions best on a managed device.
  • Managed configurations—Modify your app to allow IT admins the option to specify custom settings for your apps.
  • Dedicated devices—Optimize your app so that it can be deployed on an Android device as a kiosk.
  • Single Sign-On (SSO)—Simplify the sign-on process for users signing in to different apps on their managed Android device.

Prerequisites

  1. You’ve created an Android app.
  2. You’re ready to modify your app so that it works best for organizations.
  3. Minimum version: Android 5.0 Lollipop recommended version: Android 6.0 Marshmallow and later.

Note: Android’s enterprise features are built into most Android 5.0 devices; however, Android 6.0 and later offers additional features, especially with regard to dedicated devices.

Work profiles

You can manage a user’s business data and applications through a work profile. A work profile is a managed corporate profile associated with the primary user account on an Android device. A work profile securely isolates work apps and data from personal apps and data. This work profile is in a separate container from the personal profile, which your user controls. These separate profiles allow organizations to manage the business data they care about, but leave everything else on a user’s device under the user’s control. For a deep dive into best practices, see the Work profiles guide. For an overview of those best practices, see below.

Key features of a work profile

  • Separate and secure profile
  • Managed Google Play for application distribution
  • Separate badged work applications
  • Profile-only management capabilities controlled by an admin

Work profile benefits on Android 5.0+

  • Full device encryption
  • One Android application package (APK) for both profiles when there’s a personal profile and a work profile present on the device
  • Device policy controller (DPC) is limited to the work profile
  • Device administration via the DevicePolicyManager class

Considerations for work profiles

  • The Android system prevents intents from crossing profiles and IT admins can enable or disable system apps.
  • A file path (Uniform Resource Identifier [URI]) that’s valid on one profile may not be valid on the other.

Prevent intents from failing between profiles

It’s difficult to know which intents can cross between profiles, and which ones are blocked. The only way to know for sure is by testing. Before your app starts an activity, you should verify that the request is resolved by calling Intent.resolveActivity() .

  • If it returns null , the request doesn’t resolve.
  • If it returns something, it shows that the intent resolves, and it’s safe to send the intent.

Note: For detailed testing instructions, see Prevent Failed Intents.

Share files across profiles

Some developers use URIs to mark file paths in Android. However, because there are separate file systems when a work profile is present, we recommend:

Use:
Content URIs
  • The content URIs contain the authority, path, and ID for a specific file. You can generate this using FileProvider subclass. Learn more
  • Share and grant permissions to access the content URI using an Intent. Permissions can only be passed across the profile boundary using Intents. If you grant another app access rights to your file using Context.grantUriPermission() , it only is granted for that app in the same profile.
Don’t use:
File URI
  • Contains the absolute path of the file on the device’s storage.
  • A file path URI that’s valid on one profile isn’t valid on the other.
  • If you attach a file URI to an intent, a handler is unable to access the file in another profile.

Next steps: Once your app supports managed profiles, test it in a work profile. See Test your app.

Читайте также:  Как отменить подписку wink андроид

Implement managed configurations

Managed configurations are a set of instructions that IT admins can use to manage their users’ mobile devices in a specific way. These instructions are universal and work across any EMM, allowing admins to remotely configure applications on their users’ phones.

If you’re developing apps for business or government, you may need to satisfy your industry’s specific set of requirements. Using managed configurations, the IT admin can remotely specify settings and enforce policies for their users’ Android apps; for example:

  • Configure if an app can sync data via cellular/3G, or only Wi-Fi
  • Allow or block URLs on a web browser
  • Configure an app’s email settings
  • Enable or disable printing
  • Manage bookmarks

Best practices for implementing managed configurations

The Set up Managed Configurations guide is the key source for information on how to build and deploy managed configurations. After you’ve reviewed this documentation, see recommendations below for additional guidance.

When first launching the app

As soon as you launch an application, you can see if managed configurations are already set for this app in onStart() or onResume() . Additionally, you can find out if your application is managed or unmanaged. For example, if getApplicationRestrictions() returns:

  • A set of application-specific restrictions—You can configure the managed configurations silently (without requiring user input).
  • An empty bundle—Your application acts like it’s unmanaged (for example, how the app behaves in a personal profile).
  • A bundle with a single key value pair with KEY_RESTRICTIONS_PENDING set to true—your application is being managed, but the DPC isn’t configured correctly. You should block this user from your app, and direct them to their IT admin.

Listen for changes to managed configurations

IT admins can change managed configurations and what policies they want to enforce on their users at any time. Because of this, we recommend you ensure that your app can accept new restrictions for your managed configuration as follows:

  • Fetch restrictions on launch—Your app should call getApplicationRestrictions() in onStart() and onResume() , and compare against old restrictions to see if changes are required.
  • Listen while running—Dynamically register ACTION_APPLICATION_RESTRICTIONS_CHANGED in your running activities or services, after you’ve checked for new restrictions. This intent is sent only to listeners that are dynamically registered, and not to listeners declared in the app manifest.
  • Unregister while not running—In onPause() , you should unregister for the broadcast of ACTION_APPLICATION_RESTRICTIONS_CHANGED .

Dedicated devices

Dedicated devices are kiosk devices used for a single purpose, such as digital signage displays, ticket printing kiosks, or checkout registers.

When an Android device is configured as a dedicated device, the user sees an application locked to the screen with no Home or Recent Apps buttons to escape the app. Dedicated devices can also be configured to show a set of applications, such as a library kiosk with an app for the library catalog and a web browser.

Set up single sign-on with Chrome custom tabs

Enterprise users often have multiple apps on their device, and they prefer to sign in once to access all of their work applications. Typically, users sign in through a WebView; however, there are a couple reasons why this isn’t ideal:

  1. Users often need to sign in multiple times with the same credentials. The WebView solution often isn’t a true Single Sign-On (SSO) experience.
  2. There can be security risks, including malicious applications inspecting cookies or injecting JavaScript® to access a user’s credentials. Even trusted developers are at risk if they rely on potentially malicious third-party SDKs.

A solution to both problems is to authenticate users using browser Custom Tabs, instead of WebView. This ensures that authentication:

  • Occurs in a secure context (the system browser) where the host app cannot inspect contents.
  • Has a shared cookie state, ensuring the user has to sign in only once.

Requirements

Custom Tabs are supported back to API level 15 (Android 4.0.3). To use Custom Tabs you need a supported browser, such as Chrome. Chrome 45 and later implement this feature as Chrome Custom Tabs.

How do I implement SSO with custom tabs?

Google has open sourced an OAuth client library that uses Custom Tabs, contributing it to the OpenID Connect working group of the OpenID Foundation. To set up Custom Tabs for SSO with the AppAuth library, see the documentation and sample code on GitHub.

Test your app

After you’ve developed your app, you’ll want to test it—both in a work profile and on a fully managed device. See the instructions below.

Use Test DPC to test your Android app

We provide the Test DPC app to help Android developers test their apps in an enterprise environment. Using Test DPC, you can set EMM policies or managed configuration values on a device—as if an organization managed the device using an EMM. To install Test DPC on a device, choose one of the following methods:

  • Install Test DPC from GooglePlay.
  • Build from the source on GitHub.

For more information on how to configure Test DPC, see the instructions below and the Test DPC User Guide.

Provision a work profile

To test your app in a work profile, you need to first provision a work profile on device using the Test DPC app, as follows:

  1. Install Test DPC on the device.
  2. In the Android launcher, tap the Set up Test DPC app icon.
  3. Follow the onscreen instructions.
  4. Install your app on the device and test to see how it runs in the work profile.

Android creates a work profile and installs a copy of Test DPC in the work profile. You use this work-badged instance of Test DPC to set policies and managed configurations in the work profile. To learn more about setting up a work profile for development, read the developer’s guide Work profiles.

Provision a fully managed device

Organizations use fully managed devices because they can enforce a full range of management policies on the device. To provision a fully managed device, follow these steps:

  1. Install Test DPC on the device.
  2. Confirm that there are no other users or a work profile on the device.
  3. Confirm that there are no accounts on the device.
  4. Run the following Android Debug Bridge (adb) command in your terminal:
  5. Once you’ve completed provisioning the device owner, you can test your app on that device. You should specifically test how managed configurations and intents work on that device.
Читайте также:  Android hide keyboard programmatically

You can also use other provisioning methods—see the Test DPC User Guide. To learn how IT admins typically enroll and provision Android-powered devices, read Provision devices.

End-to-end testing

After you’ve finished testing your app in the environments above, you’ll likely want to test your app in an end-to-end production environment. This process includes the steps a customer needs to take to deploy your app in their organization, including:

  • App distribution through Play
  • Server-side managed configuration
  • Server-side profile policy control

You need to access an EMM console to complete the end-to-end testing. The easiest way to get one is to request a testing console from your EMM. Once you have access, complete these tasks:

  1. Create a test version of your application with a new ApplicationId.
  2. Claim a managed Google domain and bind it to your EMM. If you already have a testing domain that’s bound to an EMM, you may need to unbind it to test it with your preferred EMM. Please consult your EMM for the specific unbinding steps.
  3. Publish your application to the private channel for their managed Google domain.
  4. Use the EMM console and EMM application to:
    1. Set up work devices.
    2. Distribute your application.
    3. Set managed configuration.
    4. Set device policies.

This process will differ based on your EMM. Please consult your EMM’s documentation for further details. Congrats! You’ve completed these steps and verified that your app works well for enterprise users.

Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.

Источник

SDK Platform Tools release notes

Android SDK Platform-Tools is a component for the Android SDK. It includes tools that interface with the Android platform, such as adb , fastboot , and systrace . These tools are required for Android app development. They’re also needed if you want to unlock your device bootloader and flash it with a new system image.

Although some new features in these tools are available only for recent versions of Android, the tools are backward compatible, so you need only one version of the SDK Platform-Tools.

Downloads

If you’re an Android developer, you should get the latest SDK Platform-Tools from Android Studio’s SDK Manager or from the sdkmanager command-line tool. This ensures the tools are saved to the right place with the rest of your Android SDK tools and easily updated.

But if you want just these command-line tools, use the following links:

  • Download SDK Platform-Tools for Windows
  • Download SDK Platform-Tools for Mac
  • Download SDK Platform-Tools for Linux

Although these links do not change, they always point to the most recent version of the tools.

Revisions

31.0.3 (August 2021)

  • fastboot
    • Support flashing vbmeta_vendor.img for fastboot flashall / update.

31.0.2 (April 2021)

  • adb
    • Support forwarding to vsock on linux.
    • Fix bug in adb track-devices where devices over wireless debugging wouldn’t immediately receive updates.
    • Implement preliminary support for mDNS device discovery without a separately installed mDNS service. This is currently disabled by default, and can be enabled by setting the environment variable ADB_MDNS_OPENSCREEN to 1 when starting the adb server.
  • fastboot
    • Don’t fail when unable to get boot partition size.
    • Derive device locked state from property instead of parsing the kernel command line.

31.0.1 (March 2021)

  • adb
    • Reduce TCP keepalive interval.
    • Improve incremental installation performance.
  • fastboot
    • Add support for compressed snapshot merges.
    • Restore legacy A/B support.

31.0.0 (February 2021)

  • adb
    • Disable compression on pull by default.

30.0.5 (November 2020)

  • adb
    • Improve performance of adb push when pushing many files over a high-latency connection.
    • Improve adb push/pull performance on Windows.
    • Fix adb push —sync with multiple inputs.
    • Improve performance of incremental apk installation.
    • Improve error handling for incremental apk installation.

30.0.4 (July 2020)

  • adb
    • Fix fallback to non-incremental apk installation on pre-Android 11 devices.
    • Fix adb install-multi-package .
    • Fix some more crashes related to adb wireless pairing.
    • Improve some error messages.
  • fastboot
    • Improve console output on fastboot oem commands.
    • Fix fastboot flashall on older devices such as Nexus 7.

30.0.3 (June 2020)

  • adb
    • Fix installation of APKs signed with v4 signature scheme on pre-Android 11 devices.
    • Fix crash when authenticating without ADB_VENDOR_KEYS .
    • Fix crash when using adb -H .

30.0.2 (June 2020)

  • adb
    • Improve adb wireless pairing.
    • Fix hang in adb logcat when run before a device is connected.
    • Add adb transport-id to allow scripts to safely wait for a device to go away after root/unroot/reboot.

30.0.1 (May 2020)

  • adb
    • Disable adb mdns auto-connection by default. This can be reenabled with the ADB_MDNS_AUTO_CONNECT environment variable.
    • Improve performance of adb install-multi on Android 10 or newer devices.
    • Fix timeout when using adb root/unroot on a device connected over TCP.
    • Update support for wireless pairing.

30.0.0 (April 2020)

  • adb
    • Add initial support for wireless pairing.
    • Add support for incremental APK installation.
    • Implement client-side support for compression of adb when used with an Android 11 device.
    • Improve performance of adb push on high-latency connections.
    • Improve push/pull performance on Windows.

29.0.6 (February 2020)

  • adb
    • 64-bit size/time support for adb ls when used with an Android 11 device.
    • Support listening on ::1 on POSIX.
    • Client support for WinUSB devices that publish a WinUSB descriptor (required for Android 11) should no longer require a USB driver to be installed.
    • Fix hang when using adb install on something that isn’t actually a file.

29.0.5 (October 2019)

  • adb
    • Slight performance improvement on Linux when using many simultaneous connections.
    • Add —fastdeploy option to adb install , for incremental updates to APKs while developing.

29.0.4 (September 2019)

  • adb
    • Hotfix for native debugging timeout with LLDB (see issue #134613180). This also fixes a related bug in the Android Studio Profilers that causes an AdbCommandRejectedException , which you can see in the idea.log file.

29.0.3 (September 2019)

  • adb
    • adb forward —list works with multiple devices connected.
    • Fix devices going offline on Windows.
    • Improve adb install output and help text.
    • Restore previous behavior of adb connect without specifying port.

29.0.2 (July 2019)

  • adb
    • Fixes a Windows heap integrity crash.
  • fastboot
    • Adds support for partition layout of upcoming devices.

29.0.1 (June 2019)

  • adb
    • Hotfix for Windows crashes (https://issuetracker.google.com/134613180)

29.0.0 (June 2019)

  • adb
    • adb reconnect performs a USB reset on Linux.
    • On Linux, when connecting to a newer adb server, instead of killing the server and starting an older one, adb attempts to launch the newer version transparently.
    • adb root waits for the device to reconnect after disconnecting. Previously, adb root; adb wait-for-device could mistakenly return immediately if adb wait-for-device started before adb noticed that the device had disconnected.
  • fastboot
    • Disables an error message that occurred when fastboot attempted to open the touch bar or keyboard on macOS.

28.0.2 (March 2019)

  • adb
    • Fixes flakiness of adb shell port forwarding that leads to «Connection reset by peer» error message.
    • Fixes authentication via ADB_VENDOR_KEYS when reconnecting devices.
    • Fixes authentication—when the private key used for authentication does not match the public key—by calculating the public key from the private key, instead of assuming that they match.
  • fastboot
    • Adds support for dynamic partitions.
  • Updated Windows requirements
    • The platform tools now depend on the Windows Universal C Runtime, which is usually installed by default via Windows Update. If you see errors mentioning missing DLLs, you may need to manually fetch and install the runtime package.

28.0.1 (September 2018)

  • adb
    • Add support for reconnection of TCP connections. Upon disconnection, adb will attempt to reconnect for up to 60 seconds before abandoning a connection.
    • Fix Unicode console output on Windows. (Thanks to external contributor Spencer Low!)
    • Fix a file descriptor double-close that can occur, resulting in connections being closed when an adb connect happens simultaneously.
    • Fix adb forward —list when used with more than one device connected.
  • fastboot
    • Increase command timeout to 30 seconds, to better support some slow bootloader commands.

28.0.0 (June 2018)

  • adb:
    • Add support for checksum-less operation with devices running Android P, which improves throughput by up to 40%.
    • Sort output of adb devices by connection type and device serial.
    • Increase the socket listen backlog to allow for more simulataneous adb commands.
    • Improve error output for adb connect .
  • fastboot:
    • Improve output format, add a verbose output mode ( -v ).
    • Clean up help output.
    • Add product.img and odm.img to the list of partitions flashed by fastboot flashall .
    • Avoid bricking new devices when using a too-old version of fastboot by allowing factory image packages to require support for specific partitions.

27.0.1 (December 2017)

  • adb: fixes an assertion failure on MacOS that occurred when connecting devices using USB 3.0.
  • Fastboot: On Windows, adds support for wiping devices that use F2FS (Flash-Friendly File System).

27.0.0 (December 2017)

  • Re-fixes the macOS 10.13 fastboot bug first fixed in 26.0.1, but re-introduced in 26.0.2.

26.0.2 (October 2017)

  • Add fastboot support for Pixel 2 devices.

26.0.1 (September 2017)

  • Fixed fastboot problems on macOS 10.13 High Sierra (bug 64292422).

26.0.0 (June 2017)

  • Updated with the release of Android O final SDK (API level 26).

25.0.5 (April 24, 2017)

Fixed adb sideload of large updates on Windows, manifesting as «std::bad_alloc» (bug 37139736).

Fixed adb problems with some Windows firewalls, manifesting as «cannot open transport registration socketpair» (bug 37139725).

Both adb —version and fastboot —version now include the install path.

Changed adb to not resolve localhost to work around misconfigured VPN.

Changed adb to no longer reset USB devices on Linux, which could affect other attached USB devices.

25.0.4 (March 16, 2017)

  • Added experimental libusb support to Linux and Mac adb

To use the libusb backend, set the environment variable ADB_LIBUSB=true before launching a new adb server. The new adb host-features command will tell you whether or not you’re using libusb.

To restart adb with libusb and check that it worked, use adb kill-server; ADB_LIBUSB=1 adb start-server; adb host-features . The output should include «libusb».

In this release, the old non-libusb implementation remains the default.

fastboot doesn’t hang 2016 MacBook Pros anymore (bug 231129)

Fixed Systrace command line capture on Mac

25.0.3 (December 16, 2016)

  • Fixed fastboot bug causing Android Things devices to fail to flash

25.0.2 (December 12, 2016)

  • Updated with the Android N MR1 Stable release (API 25)

25.0.1 (November 22, 2016)

  • Updated with the release of Android N MR1 Developer Preview 2 release (API 25)

25.0.0 (October 19, 2016)

  • Updated with the release of Android N MR1 Developer Preview 1 release (API 25)

24.0.4 (October 14, 2016)

  • Updated to address issues in ADB and Mac OS Sierra

Download Android SDK Platform-Tools

Before downloading, you must agree to the following terms and conditions.

Terms and Conditions

1. Introduction

2. Accepting this License Agreement

3. SDK License from Google

4. Use of the SDK by You

5. Your Developer Credentials

6. Privacy and Information

7. Third Party Applications

8. Using Android APIs

9. Terminating this License Agreement

10. DISCLAIMER OF WARRANTIES

11. LIMITATION OF LIABILITY

12. Indemnification

13. Changes to the License Agreement

Download Android SDK Platform-Tools

Before downloading, you must agree to the following terms and conditions.

Terms and Conditions

1. Introduction

2. Accepting this License Agreement

3. SDK License from Google

4. Use of the SDK by You

5. Your Developer Credentials

6. Privacy and Information

7. Third Party Applications

8. Using Android APIs

9. Terminating this License Agreement

10. DISCLAIMER OF WARRANTIES

11. LIMITATION OF LIABILITY

12. Indemnification

13. Changes to the License Agreement

Download Android SDK Platform-Tools

Before downloading, you must agree to the following terms and conditions.

Источник

Читайте также:  Даэдрическая клавиатура для андроид
Оцените статью