What's New in Android O for Developers

By: Android Developers

1352   115   117272

Uploaded on 03/27/2017

Android O Developer Preview site: https://developer.android.com/preview/index.html

Android Developers preview of the upcoming O release - Learn how to use the new behavior changes like the new Background restrictions and new features like Notification channels, Autofill framework, XML resources and many more!

Checkout the preview site to see how you can be compatible with Android O even before you start targeting O.

#androido #featured

Comments (6):

By anonymous    2017-09-20

1.)Can this work in android lollipop or marshmallow

Ans : It's work for lower Version also(Based on my research).

2.)Is any support library needed for implementing the features

Ans : No need support Lib only you need to update your sdk(Android O)

3.)What type of font extension will this support like .ttf .otf

Ans: Yes, Its support .ttf, .otf font Files.

For more info you can see below links :

Android Doc for Font Family Api , Android-O Preview Video

Original Thread

By anonymous    2017-09-20

In Android O it's a must to use a channel with your Notification Builder

below is a sample code :

mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
// Sets an ID for the notification, so it can be updated.
int notifyID = 1;
// The id of the channel.
String CHANNEL_ID = "my_channel_01";
// Create a notification and set the notification channel.
Notification notification = new Notification.Builder(MainActivity.this)
        .setContentTitle("New Message")
        .setContentText("You've received new messages.")
        .setSmallIcon(R.drawable.ic_notify_status)
        .setChannelId(CHANNEL_ID)
        .build();

// Issue the notification.

mNotificationManager.notify(id, notification);

Source from Android Developers Channel on Youtube

Also check official Android Docs

Original Thread

By anonymous    2017-09-20

Let's say I create a BroadcastReceiver for BOOT_COMPLETED and call context.registerReceiver from it and never call unregisterReceiver does this receiver also lives forever (until the phone is rebooted)?

First, BOOT_COMPLETED is one of those actions, that still will behave like they were before, meaning restriction introduced in "O" do not concern to that action.

As soon as the process of your app is killed by the system or as soon as system clears your app's memory (as a result of low-memory of device), your broadcast registration will be lost. Otherwise I cannot see how this limitation will result in a better battery experience.

So does a BroadcastReceiver which is registered after a BOOT_COMPLETED broadcast have the same lifetime (stays until the next reboot) as a BroadcastReceiver which is automatically registered via the manifest?

If above mentioned cases are not met, i.e. the process of your app stays alive and app is not cleared from memory because of memory shortage - then yes. Once entered into cached state (the state with no active Android component) the registration will be lost again.

This short video by Nasir Khan will be helpful.

Original Thread

Popular Videos 51

Submit Your Video

If you have some great dev videos to share, please fill out this form.