Status Update
Comments
al...@google.com <al...@google.com> #2
Maybe also something aline the lines of:
inline fun <reified T> Bundle.parcelable(key: String): T? = when {
SDK_INT >= 33 -> getParcelable(key, T::class.java)
else -> @Suppress("DEPRECATION") getParcelable(key) as? T
}
al...@google.com <al...@google.com> #3
Over to platform owner for consideration.
bu...@google.com <bu...@google.com> #4
Yeah, we want this, but with
pr...@gmail.com <pr...@gmail.com> #5
also bugs me about Parcel.readParcelable
. if ya gonna nag me in a gazilion places through my code at least give me a nice way to resolve it. these 'blah is deprecated' msgs for code that works on my minSdkVersion just kill me. sticking an if or a supress on every second line of my code is just ...
a little comment about the above kotlin inline fun, I need both kotlin and java solution.
pr...@gmail.com <pr...@gmail.com> #6
Re #4, I think Google should offer this even if it's only going to work on U+ because right now the original APIs are deprecated and the replacements are not safe to use.
bu...@google.com <bu...@google.com>
al...@google.com <al...@google.com>
ap...@google.com <ap...@google.com> #7
ap...@google.com <ap...@google.com> #8
To add to #5, I went half an hour through the app, thinking the new method is backwards-compatible. Android Studio reported no issues, having the compileSdkVersion to 33 and minSdkVersion at 23.
Run the app on the device and boom, crash. Time to revert everything or replace every method with a backwards-compatbile function that I have to integrate on my own :(.
pr...@gmail.com <pr...@gmail.com> #9
pr...@google.com <pr...@google.com> #10
Can anyone tell me How to use the new declaration of the method
getParcelable(key, T::class.java)
and What's T class represent?
Description
Version used: 1.15
Description
The ActivityOptionsCompat is missing the setTargetDisplayId API which is set on the underlying ActivityOptions. This is needed because ActivityResultLauncher::launch accepts the compat version of "ActivityOptions" instead of a bundle which is accepted by "Context::startActivity()" API.
The android product that I work on deals with displaying content on multiple displays and is not a traditional mobile app, so we have an internal navigation framework to allow displaying content on different displays and having this API exposed natively will allow us to deprecate and remove usages of "startActivityForResult".