Android, GetNoticed2017!, Long, Versions

Android O – what new?

In this article, I try show brief review new features which were introduced in Android O. Google focused their attention mainly on power and performance optimization. News regarding this version could be divided into two categories:

Features and API:

  • Notifications – Android O introduced a new feature that is called “Notifications channels” that mean your notification should have a notification category. A user can snooze notification and it will reappear in the later time. You can set also a timeout. The news is a message color style and shows more content that is distinguished if notification is dismissed by user or system.
  • Autofill Framework – allow remembering your data that you may use in repetitive actions or account creation, login or credit card transactions.
  • Picture-in-picture mode – use activity in PiP mode, for example, showing video, this activity works in the paused state, to do it set android:supportsPictureInPicture to true in your manifest
  • Workings with fonts – now you could use fonts as resources
  • Adaptive icons – these icons support visual effects and can display a variety of shapes depended on a device model
  • Color management – support for a wide-gamut color
  • Wi-Fi Aware – support for standard based on Neighbour Awareness Networking (NAN) specification that allows discover and communicate with devices over Wi-Fi without Internet access point
  • Companion device pairing – API that allows customizing the pairing dialog during pairing with companion devices over Bluetooth, BLE or Wi-Fi.
  • WebView API – new APIs for managing WebView objects: Version API, Google SafeBrowsing API, Termination Handle API, Renderer Importance API
  • Pinning shortcuts and widgets – you can create pinned shortcuts and widgets for supported launchers, subject to user permission
  • Accessibility – language detection in Text-to-speech (TTS), accessibility button, fingerprint gestures, word-level highlighting, hint text, continued gesture dispatch
  • Permissions – now ANSWER_PHONE_CALLS is PHONE group that allow you answer to incoming phone calls
  • Content provider paging – support for loading a large dataset on page at a time
  • Media enhancement – media metrics by getMetrics(), new several methods in the MediaPlayer class, news in MediaRecorder
  • Multi-Display support – enhanced support for multiple displays
  • Account access – now you can listen to a specific accounts which changes should be handled in your app
  • AnimatorSet – seeking (set position of the animation to a specific point in time) and playing in reverse (animations that could be undone)
  • Autosizing TextView – now you can allow setting the size of text automatically based on the size of the TextView
  • Smart sharing – this feature allow increase chance a choice properly apps to share content
  • App categories – added appCategory attribute in manifest tag
  • Strict Mode – new detectors that help you identify potential bugs in your app: detectUnbufferedIo(), detectContentUriWithoutPermission(), detectUntaggedSockets()
  • Cached data – now each app has a disk space quota for cached data, firstly is removed cache from apps that data allocated over their quota is the biggest
  • Media file access – Storage Access Framework (SAF) allows custom document providers to create seekable file descriptors for files that are stored in a remote source
  • Java updates – added OpenJDK Java language features (java.time, java.nio.file, java.lang.invoke)

Behavior changes:

Apps targeting all API levels
  • Background execution limits – if app achieved a cache state and there are no active components (activities, broadcasts receivers, content providers, services) a system release any wake locks
  • Android background location limits – now apps receive location less frequency, this rarer update affects following APIs: Fused Location Provider (FLP), Geofencing, GNSS Measurement, LocationManager
  • Bluetooth – mark changes regard length of the data that the ScanRecord.getBytes() return, now number of bytes are not limited but must be evaluated and Bluetooth 5-compatible devices may return data with more length (more than 60 bytes)
  • Input and navigation – your app can support keyboard navigation
  • AccessibilityClickableSpan are now included
  • Security – no longer support SSLv3, if server incorrectly implements TLS protocol version negotiation HttpURLConnection no longer retrying, WebView is now process, SECCOMP filter for all apps, app should use sourceDir to get directory
  • Privacy – changes with ANDROID_ID (per user, not per app, doesn’t change on package uninstall or reinstall)
  • Networking and HTTP(S) connectivity – OPTIONS request with no body have a Content:length:0 header, previously had no Content:length header, normalized URL by adding slash after the host or authority, URIs can’t contain empty labels
  • Logging of uncaught exceptions – no default Thread.UncaughtExceptionHandler
  • Collection handlingAbstractCollection.removeAll() and AbstractCollection.retainAll() now always throw a NullPointerException even collection is empty
  • Locales and internationalizationLocale.getDefault() is now Locale.getDefault(Category.DISPLAY)
  • Contacts provider usage stats change – queries for usage data return approximations rather than exacts values
  • App shortcuts – create by requestPinShortcut() from ShortcutManager
  • Alert windows – if app uses the SYSTEM_ALERT_WINDOW permission you should use TYPE_APPLICATION_OVERLAY window type
Apps targeting Android O
  • Background execution limits – apps running in background have limits in access background services and apps can’t use their manifest to register for most implicit broadcasts
  • Security – WebView have to access websites over HTTPs instead HTTP
  • Privacy – the system properties (net.dnsX) are no longer available, change with registering obtain networking information, Build.getSerial() than Build.SERIAL, changes with LauncherApps API
  • Permissions – now if the system grants one permission with group (for example READ_EXTERNAL_STORAGE from STORAGE group) others in this group (WRITE_EXTERNAL_STORAGE) are granted only in the moment if apps request it, it is automatically without dialog
  • Media – audio ducking, AudioAttributes and others
  • Native libraries – writable and executable segments
  • Collection handlingCollection.sort() over List.sort()
  • Account access and discoverability – use AccountManager.newChooseAccountIntent() and after that AccountManager.getAccounts()
  • Alert windows – if app use SYSTEM_ALERT_WINDOW use window TYPE_APPLICATION_OVERLAY
  • Content change notifications – define a valid ContentProvider with relevant permissions
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s