Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Android 11 and the future

Android 11 and the future

Talk from GDG DevFest Yangon 2020

Aung Kyaw Paing

October 17, 2020
Tweet

More Decks by Aung Kyaw Paing

Other Decks in Programming

Transcript

  1. 1. Built-in screen recording 2. New Media Control 3. Smart

    Reply 4. Conversations User-sided features
  2. </ Create bubble intent val target = Intent(context, BubbleActivity<:class.java) val

    bubbleIntent = PendingIntent.getActivity(context, 0, target, 0 <* flags </) </ Create bubble metadata val bubbleData = Notification.BubbleMetadata.Builder(bubbleIntent, Icon.createWithResource(context, R.drawable.icon)) .setDesiredHeight(600) .build()
  3. </ Create bubble intent val target = Intent(context, BubbleActivity<:class.java) val

    bubbleIntent = PendingIntent.getActivity(context, 0, target, 0 <* flags </) </ Create bubble metadata val bubbleData = Notification.BubbleMetadata.Builder(bubbleIntent, Icon.createWithResource(context, R.drawable.icon)) .setDesiredHeight(600) .build() </ Create notification val chatPartner = Person.Builder() .setName("Chat partner") .setImportant(true) .build()
  4. </ Create bubble intent val target = <<. val bubbleIntent

    = <<. </ Create bubble metadata val bubbleData = <<. </ Create notification val chatPartner = <<. val builder = Notification.Builder(context, CHANNEL_ID) .setContentIntent(contentIntent) .setSmallIcon(smallIcon) .setBubbleMetadata(bubbleData) .addPerson(chatPartner)
  5. Conversations - Show at the top under seperate section -

    Can promote to bubble - Conversation-specific actions - Mark as priority - Promote to bubble - Silence notification - Custom sounds/vibrations
  6. </ Create notification val chatPartner = Person.Builder() .setName("Chat partner") .setImportant(true)

    .build() </ Use Person in MessageStyle val notification = Notification.Builder(context, channelId) .setStyle( Notification.MessagingStyle.Builder(person) .addMessage(<<.) <<. build() ) .build()
  7. WindowInsets - Can listen to WindowInsets animations - Can show

    keyboard easily - Will be added to appcompat later
  8. val animationCallback = object : WindowInsetsAnimation.Callback(DISPATCH_MODE_STOP) { override fun onPrepare(animation:

    WindowInsetsAnimation) { </TODO } override fun onStart( animation: WindowInsetsAnimation, bounds: WindowInsetsAnimation.Bounds ): WindowInsetsAnimation.Bounds { </TODO } override fun onProgress( insets: WindowInsets, runningAnimations: List<WindowInsetsAnimation> ): WindowInsets { </TODO } override fun onEnd(animation: WindowInsetsAnimation) { </TODO } }
  9. Scoped Storage - requestLegacyExternalStorage is ignored on Android 11 -

    Access to all files in shared storage requires read/write file permission
  10. Don’t ask again - If user taps “Decline” more than

    once, it’s considered as “Don’t ask again”
  11. Background Location Permission - Need to be requested separately -

    Have to request for Foreground Location permission first <manifest <<. > <<<- Required only when requesting background location access on Android 10 (API level 29) and higher. <<> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" <> </manifest>
  12. 1. Database Inspector 2. Android Emulator Windows 3. Dagger Navigation

    4. TFLite 5. Foldables Android Studio 4.1 STABLE
  13. 1. Layout Inspector Live Update On/Off 2. Jetpack Compose support

    3. Safe Args Support 4. Accessibility Scanner 5. Multiple Parallel Instrumentation Testing Android Studio 4.2 Preview
  14. • No longer recommends multiple activities • Prefer to use

    Fragment and Nav Arch to structure single-activity Single Activity Architecture
  15. “The description of the class for what it does, matches

    View Model. That has nothing to do with MVVM. We are not telling you to use or not to use MVVM” -Yigit Boyar (droidcon NYC 2017)