Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
compileSdkVersion33でgetSerializable/getParcelab...
Search
napplecomputer
December 22, 2022
Technology
10
4.6k
compileSdkVersion33でgetSerializable/getParcelableがつらい話
napplecomputer
December 22, 2022
Tweet
Share
More Decks by napplecomputer
See All by napplecomputer
Kotlin2.0対応などでビルド時間を45%削減したぞ!
napplecomputer
0
730
EmojiPicker触ってみた
napplecomputer
0
600
式年遷Target SDK Version
napplecomputer
0
280
Target SDK Versionを上げない Notification runtime permission対応
napplecomputer
0
420
通知がOFFだとToastは表示されな… されてる!?
napplecomputer
0
890
Photo Pickerを触って比較してみた
napplecomputer
0
1.8k
Android Qのストレージの話
napplecomputer
3
1.1k
Wi-Fi RTTによる屋内測位アプリを作ろう
napplecomputer
5
17k
Other Decks in Technology
See All in Technology
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
プロダクト開発を加速させるためのQA文化の築き方 / How to build QA culture to accelerate product development
mii3king
1
250
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
150
生成AIのガバナンスの全体像と現実解
fnifni
1
180
Amazon VPC Lattice 最新アップデート紹介 - PrivateLink も似たようなアップデートあったけど違いとは
bigmuramura
0
190
PHPからGoへのマイグレーション for DMMアフィリエイト
yabakokobayashi
1
160
オプトインカメラ:UWB測位を応用したオプトイン型のカメラ計測
matthewlujp
0
170
統計データで2024年の クラウド・インフラ動向を眺める
ysknsid25
2
830
サービスでLLMを採用したばっかりに振り回され続けたこの一年のあれやこれや
segavvy
2
360
Oracle Cloud Infrastructure:2024年12月度サービス・アップデート
oracle4engineer
PRO
0
160
AIのコンプラは何故しんどい?
shujisado
1
190
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
95
5.2k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Facilitating Awesome Meetings
lara
50
6.1k
Measuring & Analyzing Core Web Vitals
bluesmoon
4
170
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
It's Worth the Effort
3n
183
28k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
17
2.2k
Visualization
eitanlees
146
15k
Code Reviewing Like a Champion
maltzj
520
39k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Transcript
Mobility Technologies Co., Ltd. compileSdkVersion33ͰgetSerializable/ getParcelable͕ͭΒ͍ @napplecomputer
Mobility Technologies Co., Ltd. 2 ▪ @napplecomputer ▪ ͳͬͽʔ ▪
גࣜձࣾMobility Technologies(MoT)ॴଐ ▪ λΫγʔΞϓϦʮGOʯͷϢʔβʔΞϓϦ ▪ ࡢΧϝϥҿΈ·ͨ͠ ࣗݾհ
Mobility Technologies Co., Ltd. Android 13 ରԠ 3
Mobility Technologies Co., Ltd. 4 Android 13 ରԠ͠·͔ͨ͠ʁ
Mobility Technologies Co., Ltd. 5 https://support.google.com/googleplay/android-developer/answer/11926878
Mobility Technologies Co., Ltd. 6 Target SDK VersionΛ্͛ΔͨΊʹ ͳʹΛ͢Ε͍͍ʁ
Mobility Technologies Co., Ltd. 7 ▪ Target SDK VersionΛ্͛Δ͜ͱͰڍಈͷมΘΔ෦ͷରԠͱಈ࡞֬ೝ ▪
ྫ͑Notification Runtime Permission ▪ Compile SDK VersionΛ্͛Δ ▪ Target SDK VersionΛCompile SDK VersionΑΓߴ͘͢Δ͜ͱͰ͖ͳ ͍ Target SDK Version 33 ରԠ
Mobility Technologies Co., Ltd. Compile SDK Version 33 ରԠ 8
Mobility Technologies Co., Ltd. 9 ▪ Compile SDK Version 33
ରԠͱͭ·ΓAPI level 33Ͱdeprecatedʹͳͬ ͨAPIΛ༻͍ͯ͠Δ෦Λมߋ͢Δ͜ͱ ▪ onBackPressedͷมߋͳͲ৭ʑ͋Δ ▪ ಛʹBundleͱIntentͷมߋ͕ͭΒ͍ Compile SDK Version 33 ରԠ
Mobility Technologies Co., Ltd. 10 ▪ T getParcelable(String) ▪ Parcelable[]
getParcelableArray(String) ▪ ArrayList<T> getParcelableArrayList(String) ▪ Serializable getSerializable(String) ▪ SparseArray<T> getSparseParcelableArray(String) BundleͷDeprecated in API level 33
Mobility Technologies Co., Ltd. 11 ▪ T getParcelable(String) ▪ Parcelable[]
getParcelableArray(String) ▪ ArrayList<T> getParcelableArrayList(String) ▪ Serializable getSerializable(String) ▪ SparseArray<T> getSparseParcelableArray(String) BundleͷDeprecated in API level 33
Mobility Technologies Co., Ltd. 12 ▪ T getParcelable(String, Class<T>) ▪
T[] getParcelableArray(String, Class<T>) ▪ ArrayList<T> getParcelableArrayList(String, Class<?, extends, T>) ▪ T getSerializable(String, Class<T>) ▪ SparseArray<T> getSparseParcelableArray(String, Class<?, extends, T>) BundleͷAdded in API level 33
Mobility Technologies Co., Ltd. 13 ▪ Parcelable[] getParcelableArrayExtra(String) ▪ ArrayList<T>
getParcelableArrayListExtra(String) ▪ T getParcelableExtra(String) ▪ Serializable getSerializableExtra(String) IntentͷDeprecated in API level 33
Mobility Technologies Co., Ltd. 14 ▪ T[] getParcelableArrayExtra(String, Class<T>) ▪
ArrayList<T> getParcelableArrayListExtra(String, Class<?, extends, T>) ▪ T getParcelableExtra(String, Class<T>) ▪ T getSerializableExtra(String, Class<T>) IntentͷAdded in API level 33
Mobility Technologies Co., Ltd. 15 ೖΕସ͑Ε͍͍͚ͩʁ
Mobility Technologies Co., Ltd. 16 ͩΊ
Mobility Technologies Co., Ltd. 17 bundle.getSerializable(KEY_HOGE, HOGE::class.java)
Mobility Technologies Co., Ltd. 18 bundle.getSerializable(KEY_HOGE, HOGE::class.java) if (Build.VERSION.SDK_INT >=
Build.VERSION_CODES.TIRAMISU) { bundle.getSerializable(KEY_HOGE, HOGE::class.java) } else { @Suppress("DEPRECATION") bundle.getSerializable(KEY_HOGE) as HOGE }
Mobility Technologies Co., Ltd. 19 AppCompat͋ΔͰ͠ΐ
Mobility Technologies Co., Ltd. 20 ͳ͍
Mobility Technologies Co., Ltd. 21 ͰIssueTruckerʹ Feature Request͕͋Δ
Mobility Technologies Co., Ltd. 22 https://issuetracker.google.com/issues/243986223
Mobility Technologies Co., Ltd. ·ͱΊ 23
Mobility Technologies Co., Ltd. 24 ▪ Compile SDK VersionͰ৽͘͠DeprecatedʹͳͬͨBundleͱIntentͷରԠ͕ͭ Β͍
▪ AppCompat͕·ͩରԠ͍ͯ͠ͳ͍ ▪ ରԠํ๏࣍ͷ2ͭ ▪ ࣗ࡞ͰόʔδϣϯΛྀ࣮ͯ͠ ▪ AppCompatʹ࣮͞ΕΔͷΛͭ ▪ ࣮͞ΕΔ·ͰSupress warning͢Δ ·ͱΊ
Mobility Technologies Co., Ltd. 25 ͱ͍͏ରԠͰμϝͰ͢ ӕ·ͱΊͰͨ͠
Mobility Technologies Co., Ltd. One more thing... 26
Mobility Technologies Co., Ltd. 27 https://issuetracker.google.com/issues/240585930
Mobility Technologies Co., Ltd. 28 https://issuetracker.google.com/issues/240585930
Mobility Technologies Co., Ltd. 29 ▪ ͳΜͱ৽͍͠getParcelableʹόά͕༗Δ ▪ ݅Λຬͨͨ͠ParcelableΛѻ͏ͱNullPointerException ▪
API level 33ͷAPIͷόάͳͷͰमਖ਼͞ΕΔͱͯ͠API level 34 ▪ ݹ͍getParcelableΛsuppress warning͠ͳ͕Β͏ͷ͕ແ ▪ ѻ͏Parcelable͕ෆ۩߹Λ౿Ή݅Λຬ͍ͨͯ͠Δͷ͔ఆ͢Δͷ໘ ▪ ͋ͱͰParcelableͷΫϥεΛมߋͯ͠ཕΛ౿ΜͰ͠·͏͔
Mobility Technologies Co., Ltd. ຊͷ·ͱΊ 30
Mobility Technologies Co., Ltd. 31 ▪ Compile SDK VersionͰ৽͘͠DeprecatedʹͳͬͨBundleͱIntentͷରԠ͕ ͭΒ͍
▪ AppCompat·ͩରԠ͍ͯ͠ͳ͍ ▪ ৽͍͠getParcelableʹόά͕༗ΔͷͰɺsuppress warningͰݹ͍ getParcelableΛ͏ͷ͕ແ ▪ কདྷAppCompat͕ରԠͨ͠߹ɺذͷڥք͕Ͳͷόʔδϣϯʹͳ͍ͬͯΔ ͷ͔֬ೝ͔ͯ͠Β͍·͠ΐ͏ ·ͱΊ
จষ·ը૾ͷ༰ͷແஅసࡌٴͼෳͷߦҝ͝ԕྀ͍ͩ͘͞ɻ Mobility Technologies Co., Ltd.