Notch Support if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { val windowAttributes = window.attributes windowAttributes.layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFAULT }
Notification - Person API - Can now display Image - Reply drafts - Group conversations support - Semantic Action (Reply, Mark as read, thumbs up… etc.) - Smart Reply Photo Ⓒ Google
Notification // create new Person val sender = Person() .setName(name) .setUri(uri) .setIcon(null) .build() // create image message val message = Message("Picture", time, sender) .setData("image/";, imageUri) val style = Notification.MessagingStyle(getUser()) .addMessage("Check this out!", 0, sender) .addMessage(message)
And…. - Indoor positioning - Multi-camera support - ImageDecoder - AnimatedImageDrawable - Client side encryptions for backups - New accessibility features - Autofill improvements - And Many more!
RecyclerView Selection - Allow select/deselect multiple items in list SelectionTracker tracker = new SelectionTracker.Builder<>( "my-selection-id", recyclerView, new StableIdKeyProvider(recyclerView), new MyDetailsLookup(recyclerView), StorageStrategy.createLongStorage()) .build();
- Use for enqueuing background works - JobScheduler for API 23+ - Firebase JobDispatcher (or) custom AlarmManager + Broadcast Receiver for backport WorkManager
val workManager = WorkManager.getInstance() val workRequest = OneTimeWorkRequest.Builder(SyncWorker::class.java).build() workManager.enqueue(workRequest) WorkManager
val workManager = WorkManager.getInstance() val workRequest = OneTimeWorkRequest.Builder(SyncWorker::class.java).build() workManager.enqueue(workRequest) WorkManager
WorkManager val workManager = WorkManager.getInstance() val request1 = OneTimeWorkRequest.Builder(FooWorker::class.java).build() val request2 = OneTimeWorkRequest.Builder(BarWorker::class.java).build() val request3 = OneTimeWorkRequest.Builder(BazWorker::class.java).build() workManager.beginWith(request1, request2).then(request3).enqueue()
var bundle = bundleOf("amount" to amount) view.findNavController().navigate(R.id.confirmationAction, bundle) val tv = view.findViewById(R.id.textViewAmount) tv.text = arguments.getString("amount")
Testing - Roboelectric to be packaged inside androidx.test - Roboelectric semantics will be same as Espresso http://robolectric.org/blog/2018/05/09/robolectric-4-0-alpha/
Testing - Roboelectric to be packaged inside androidx.test - Roboelectric semantics will be same as Espresso - Will be able to run UI test in local JVM http://robolectric.org/blog/2018/05/09/robolectric-4-0-alpha/
Play Store - Digital Rights Management(DRM) metadata - App now have to be complaint with GDPR - Algorithm changes - Must have minimum API level 26 by end of August 2018