If your app performs performs Bluetooth Low Energy scans, use the new setCallbackType method to specify that you want the system to notify callbacks when it first finds, or sees after a long time, an advertisement packet matching the set ScanFilter. This release adds support for the Hotspot 2. To provision Hotspot 2. The new isPasspointNetwork method indicates if a detected network represents a Hotspot 2.
The platform now allows apps to request that the display resolution be upgraded to 4K rendering on compatible hardware. To query the current physical resolution, use the new Display. Mode APIs. If the UI is drawn at a lower logical resolution and is upscaled to a larger physical resolution, be aware that the physical resolution the getPhysicalWidth method returns may differ from the logical resolution reported by getSize. This feature is useful if you want to switch to 4K display resolution.
While in 4K display mode, the UI continues to be rendered at the original resolution such as p and is upscaled to 4K, but SurfaceView objects may show content at the native resolution. Theme attributes are now supported in ColorStateList for devices running on Android 6. The Resources. If you are calling these APIs, call the new Context. These methods are also available in the v4 appcompat library via ContextCompat.
The app does not have exclusive ownership of the flash unit or the camera device. The torch mode is turned off and becomes unavailable whenever the camera device becomes unavailable, or when other camera resources keeping the torch on become unavailable. Other apps can also call setTorchMode to turn off the torch mode. When the last app that turned on the torch mode is closed, the torch mode is turned off.
You can register a callback to be notified about torch mode status by calling the registerTorchCallback method. The first time the callback is registered, it is immediately called with the torch mode status of all currently known camera devices with a flash unit. If the torch mode is turned on or off successfully, the onTorchModeChanged method is invoked.
If a device supports reprocessing, you can create a reprocessable camera capture session by calling , android. StateCallback, android. Use the ImageWriter class to connect the input buffer flow to the camera reprocessing input. To get an empty buffer, follow this programming model:. This support allows your app to maintain a circular image queue of ImageReader output images, select one or more images, and send them to the ImageWriter for camera reprocessing. A Profile or Device Owner can set a permission policy for all runtime requests of all applications using setPermissionPolicy , to either prompt the user to grant the permission or automatically grant or deny the permission silently.
Content and code samples on this page are subject to the licenses described in the Content License. All Android releases Android Marshmallow. Features and APIs. Behavior changes. Android Developers. Start developing To start building apps for Android 6. Update your target API level To better optimize your app for devices running Android , set your targetSdkVersion to "23" , install your app on an Android system image, test it, then publish the updated app with this change.
Fingerprint Authentication This release offers new APIs to let you authenticate users by using their fingerprint scans on supported devices, Use these APIs in conjunction with the Android Keystore system. Use an emulator to emulate fingerprint touch events with the following command. Use the same command to emulate fingerprint touch events on the lockscreen or in your app.
Confirm Credential Your app can authenticate users based on how recently they last unlocked their device. Assist API This release offers a new way for users to engage with your apps through an assistant.
To provide the assistant with additional context from your app, follow these steps: Implement the Application. OnProvideAssistDataListener interface. In order to provide activity-specific contextual information, override the onProvideAssistData callback and, optionally, the new onProvideAssistContent callback. Adoptable Storage Devices With this release, users can adopt external storage devices such as SD cards.
New Icon class that you can attach to your notifications via the setSmallIcon and setLargeIcon methods. Similarly, the addAction method now accepts an Icon object instead of a drawable resource ID. New getActiveNotifications method that allows your apps to find out which of their notifications are currently alive. Bluetooth Stylus Support This release provides improved support for user input using a Bluetooth stylus. Active Oldest Votes.
Yes, the app will be available to M users and every permission is granted at install time. A small note, if you use the support libraries v23 you need to set the compileSdkVersion to 23 otherwise you get this error: This support library should not use a different version 23 than the compileSdkVersion Mattia Maestrini Mattia Maestrini 31k 15 15 gold badges 83 83 silver badges 90 90 bronze badges. Sign up or log in Sign up using Google.
Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast Who is building clouds for the independent developer? Exploding turkeys and how not to thaw your frozen bird: Top turkey questions Revision 2 November Fixed bugs in the layout rendering library used by Android Studio.
Revision 1 August Initial release for Android 6. Android 5. Revision 1 March Initial release for Android 5. Revision 2 December Updated layouts in the Support Library and fixed various issues. Revision 1 October Initial release for Android 5. Android 4. Revision 2 October Updated the rendering library. Revision 1 June Initial release for Android Wear. Revision 2 December Maintenance release. Revision 1 October Initial release. Revision 2 August Maintenance update.
Revision 1 July Initial release. Revision 2 February Maintenance update. Dependencies: SDK Tools r21 or higher is required. Revision 1 November Initial release. Dependencies: SDK Tools r20 or higher is required. Revision 3 October Maintenance update. Revision 2 July Maintenance update. Revision 1 June Initial release.
Revision 2 January Maintenance update. Dependencies: SDK Tools r14 or higher is required. Revision 1 December Initial release. Android 3. SDK Tools r12 or higher is recommended. Notes: Improvements to the platform's rendering library to support the visual layout editor in the ADT Eclipse plugin.
0コメント