listener view.setOnApplyWindowInsetsListener { view, insets -> // See if the IME is visible val imeVisible = insets.isVisible((WindowInsets.Type.ime())) }
listener view.setOnApplyWindowInsetsListener { view, insets -> // See if the IME is visible val imeVisible = insets.isVisible((WindowInsets.Type.ime())) if (imeVisible) { val imeInsets = insets.getInsets(WindowInsets.Type.ime()) // ... } }
du clavier avec les modifications du contenu de l'application ◦ Écouter les changements ▪ ET / OU ◦ Conduire directement l'animation du clavier logiciel
val person = Person.Builder().build() val shortcutInfo = ShortcutInfoCompat.Builder(this, "sampleShortcut"). setPerson(person). setLongLived(true). // ... build()
val person = Person.Builder().build() val shortcutInfo = ShortcutInfoCompat.Builder(this, "sampleShortcut"). setPerson(person). setLongLived(true). // ... build() ShortcutManagerCompat.pushDynamicShortcut(shortcutInfo)
comme des bulles • Android 10 : Option de développeur ◦ Android 11 : Elles sont arrivées • Meilleur que System Alert Window! • Créé avec Notification API ◦ avec plus de metadata ◦ et son propre Activity
to launch val intent = Intent(context, BubbleActivity::class.java) val bubbleIntent = PendingIntent.getActivity(context, 0, intent,...) // Create metadata val shortcutInfo = ... /* probably already using for notifications */ val bubbleMetadata = Notification.BubbleMetadata.Builder(shortcutInfo.id)
the art privacy and security features, protecting users and their data from access by malicious apps, while simultaneously making access of that data more transparent to the user.
of ApplicationExitInfo val reasonsList = activityManager.getHistoricalProcessExitReasons( packageName, pid /* 0 for all matches */, max /* 0 for all */)
of ApplicationExitInfo val reasonsList = activityManager.getHistoricalProcessExitReasons( packageName, pid /* 0 for all matches */, max /* 0 for all */) for (info in reasonsList) { // Log/store/upload info.reason // REASON_LOW_MEMORY, REASON_CRASH, REASON_ANR, etc. }
Memory issue debugging • GWP-ASan ◦ Catches memory issues (for native apps) ◦ On user devices in the field ◦ Low overhead (runtime and memory) ◦ Reports uploaded to Play dashboard GWP-ASan
de changements sont limités a targetSdk R • Essayez les changements avec les bascules de fonctionnement ◦ Command-line ◦ Nouveau panneau de Développeur Options
decoder = nullptr; AImageDecoder_createFromAAsset(assetDescriptor, &decoder); /* Set up the target format */ AImageDecoder_setAndroidBitmapFormat(decoder, ANDROID_BITMAP_FORMAT_RGBA_8888); NDK ImageDecoder
val source = ImageDecoder.createSource(file) // Perform off main thread val drawable = ImageDecoder.decodeDrawable(source); if (drawable is AnimatedImageDrawable) { drawable.start() }
with their own rendering loop ◦ e.g., games • 60 frames per second used to be a given ◦ Now some devices support 90, 120 Hz ◦ Enables more flexible backoff rates • Surface.setFrameRate() 120 fps 60
IF, WHILE, QUANTIZED_LSTM, HARD_SWISH • New quantization scheme GPU DSP NPU Graphics Processing Unit Digital Signal Processor Neural Processing Unit • New advanced execution control ◦ Fenced compute ◦ Memory domain input/output ◦ Quality of Service(QoS)
autofill contenu dans le clavier ◦ Claviers logiciels ◦ Les applis de mot de passe • Sécurité - le clavier obtient l’UI a présenter les données, mais pas les données eux-même
à jour chaque deux semaines • Neuf / récent ◦ Hilt: Dependency injection (Dagger) ◦ Paging 3.0: Tout Kotlin, avec coroutines ◦ CameraX Beta ◦ … et plus !
: complètement repensé ◦ plus claire, plus facile à utiliser ◦ policy status section ◦ acquisition reports ◦ team management • Maintenant en Beta ◦ play.google.com/console