Android M Developer Preview are here, Whats new in Android M for developer?

Obviously Android M Developer Previewcomes with more improvement to Android L. Along with new features and capabilities, the M Developer Preview includes a variety of system changes and API behavior changes.

^(https://www.appmarsh.com/null)Runtime Permissions

This preview introduces a new runtime permissions model, where users can now directly manage their app permissions at runtime. To determine if your app has been granted a permission, call the new Context.checkSelfPermission()method. To request for a permission, call the new Activity.requestPermission()method.

Power-Saving Optimizations


Doze

^(https://www.appmarsh.com/null)

If a device is unplugged and left stationary with the screen off for a period of time, it goes into Dozemode where it attempts to keep the system in a sleep state. In this mode, devices periodically resume normal operations for brief periods of time so that app syncing can occur and the system can perform any pending operations.


^(https://www.appmarsh.com/null)App standby

With this preview, the system may determine that apps are idle when they are not in active use. Your app is considered idle after a period of time, unless the system detects any of these signals:
The app is explicitly launched by the user.

  • The app has a process currently in the foreground (either as an activity or foreground service, or in use by another activity or foreground service).
  • The app generates a notification that users see on the lock screen or in the notification tray.
  • The user explicitly asks for the app to be exempt from optimizations, via Settings.


Adoptable Storage Devices

^(https://www.appmarsh.com/null)

With this preview, users can adoptexternal storage devices such as SD cards.


Apache HTTP Client Removal

^(https://www.appmarsh.com/null)

This preview removes support for the Apache HTTP client. If your app is using this client and targets Android 2.3 (API level 9) or higher, use the HttpURLConnection ^(http://developer.android.com/reference/java/net/HttpURLConnection.html)class instead.


AudioManager Changes

^(https://www.appmarsh.com/null)

Setting the volume directly or muting specific streams via the AudioManager ^(http://developer.android.com/reference/android/media/AudioManager.html)class is no longer supported. The setStreamSolo() ^(http://developer.android.com/reference/android/media/AudioManager.html#setStreamSolo%28int,%20boolean%29)method is deprecated, and you should call the AudioManager.requestAudioFocus()method instead.

Text Selection

text-selection Android M Developer Preview are here, Whats new in Android M for developer? Apps

Text Selection


Android Keystore Changes

^(https://www.appmarsh.com/null)

^(https://www.appmarsh.com/null)

With this preview, the Android Keystore provider ^(http://developer.android.com/training/articles/keystore.html) no longer supports DSA. ECDSA is still supported.


Wi-Fi and Networking Changes

^(https://www.appmarsh.com/null)

  • Your apps can now change the state of WifiConfiguration ^(http://developer.android.com/reference/android/net/wifi/WifiConfiguration.html) objects only if you created these objects. You are not permitted to modify or delete WifiConfiguration ^(http://developer.android.com/reference/android/net/wifi/WifiConfiguration.html) objects created by the user or by other apps.
  • Previously, if an app forced the device to connect to a specific Wi-Fi network by using enableNetwork() ^(http://developer.android.com/reference/android/net/wifi/WifiManager.html#enableNetwork%28int,%20boolean%29) with the disableAllOthers=true setting, the device disconnected from other networks such as cellular data. In this preview, the device no longer disconnects from such other networks. If your app’s targetSdkVersion is “20” or lower, it is pinned to the selected Wi-Fi network. If your app’s targetSdkVersion is “21” or higher, use the multinetwork APIs (such as openConnection() ^(http://developer.android.com/reference/android/net/Network.html#openConnection%28java.net.URL%29), bindSocket() ^(http://developer.android.com/reference/android/net/Network.html#bindSocket%28java.net.Socket%29), and the new ConnectivityManager.bindProcessToNetwork() method) to ensure that its network traffic is sent on the selected network.


Camera Service Changes

^(https://www.appmarsh.com/null)


ART Runtime

^(https://www.appmarsh.com/null)

The ART runtime now properly implements access rules for the newInstance() ^(http://developer.android.com/reference/java/lang/reflect/Constructor.html#newInstance%28java.lang.Object...%29)method. This change fixes a problem where Dalvik was checking access rules incorrectly in previous versions.

APK Validation

^(https://www.appmarsh.com/null)

The platform now performs stricter validation of APKs. An APK is considered corrupt if a file is declared in the manifest but not present in the APK itself. An APK must be re-signed if any of the contents are removed.





YRtXT84fhRk Android M Developer Preview are here, Whats new in Android M for developer? Apps