fonts as resources by adding the font file in the res/font/ folder • compiled in your R file and automatically available in Android Studio • access the font resources with the help of a new resource type, font. For example, to access a font resource, use @font/myfont, or R.font.myfont.
result in a poor user experience To lower the chance of these problems, Android O places limitations on what apps can do while users aren't directly interacting with them. If an app targets Android O, it is restricted in two ways: 1. Background Service Limitations: 2. Broadcast Limitations: Note: These limitations apply only to apps that target Android O. Apps that target API level 25 or lower are not affected.
must implement one or more notification channels to display notifications to your users. If you don’t target Android O, your apps behave the same as they do on Android 7.0 when running on Android O devices. • Android O deprecates the ability to set the priority levels of individual notifications. :( • What You can Do : ◦ Notification Priority and Importance ◦ Creating, Reading, Updating, Deleting a Notification Channel ◦ Creating a Notification Channel Group ◦ Creating a Notification
users, but also making it safer. • So copy/pasting that password won’t be susceptible to being hacked or available for others Benefits: ◦ Less time spent in filling fields ◦ Minimize user input errors • Users can enable or disable autofill as well as change the autofill service in Settings > Apps & Notifications > Default apps > Autofill app.
(PIP) mode • PIP is a special type of multi-window mode mostly used for video playback. • PIP mode is already available for Android TV; Android O makes the feature available on other Android devices. • To specify that your activity can use PIP mode, set android:supportsPictureInPicture to true in the manifest
several APIs to help you manage the WebView objects that display web content in your app. • APIs for managing WebView: ◦ Version API ◦ Google Safe Browsing API ◦ Termination Handle API ◦ Renderer Importance API
different device models • For example, a launcher icon can display using a circular shape on one OEM device, and display a squircle on another device. • create alternative drawable resources in your app for use with Android O in res/mipmap-anydpi/ic_launcher.xml using <maskable-icon> attribute. <maskable-icon> <background android:drawable="@color/ic_background"/> <foreground android:drawable="@mipmap/ic_foreground"/> </maskable-icon>
let the size of the text expand or contract automatically to fill its layout based on the TextView's characteristics and boundaries. • Setting up TextView autosize: ◦ Granularity : By using granularity, you can specify a range of minimum and maximum text sizes and a dimension that specifies the size of each step ◦ Preset Sizes : By using preset sizes, you can autosize the TextView from a list of predefined sizes. Granularity : <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:autoSizeText="uniform" android:autoSizeMinTextSize="12sp" android:autoSizeMaxTextSize="100sp" android:autoSizeStepGranularity="2sp"/> Preset Sizes: <TextView android:layout_width="wrap_content android:layout_height="wrap_content" android:autoSizeText="uniform" android:autoSizePresetSizes=" @array/autosize_text_sizes" /> <resources> <array name="autosize_text_sizes"> <item>10sp</item> <item>12sp</item> <item>20sp</item> <item>40sp</item> <item>100sp</item> </array> </resources>
pin shortcuts and widgets onto the launcher • Pinned shortcuts, similar to app shortcuts, allow users to quickly start a specific task in your app • Unlike app shortcuts, however, pinned shortcuts appear in the launcher as separate icons. • Similar to pinned shortcuts, these pinned widgets give users access to specific tasks in your app.
Awareness Networking or NAN • provides devices the appropriate hardware to discover and connect directly to each other via Wi-Fi Aware without any other type of connectivity between them, such as Wi-Fi Access Point or Cellular. • Using the Wi-Fi Aware APIs: ◦ Discover other devices ◦ Create a network connection