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.3k
compileSdkVersion33でgetSerializable/getParcelableがつらい話
napplecomputer
December 22, 2022
Tweet
Share
More Decks by napplecomputer
See All by napplecomputer
Kotlin2.0対応などでビルド時間を45%削減したぞ!
napplecomputer
0
560
EmojiPicker触ってみた
napplecomputer
0
560
式年遷Target SDK Version
napplecomputer
0
270
Target SDK Versionを上げない Notification runtime permission対応
napplecomputer
0
410
通知がOFFだとToastは表示されな… されてる!?
napplecomputer
0
850
Photo Pickerを触って比較してみた
napplecomputer
0
1.7k
Android Qのストレージの話
napplecomputer
3
1.1k
Wi-Fi RTTによる屋内測位アプリを作ろう
napplecomputer
5
17k
Other Decks in Technology
See All in Technology
【若手エンジニア応援LT会】AWSで繋がり、共に成長! ~コミュニティ活動と新人教育への挑戦~
kazushi_ohata
0
180
サイバーエージェントにおける生成AIのリスキリング施策の取り組み / cyber-ai-reskilling
cyberagentdevelopers
PRO
2
200
Amazon FSx for NetApp ONTAPを利用するにあたっての要件整理と設計のポイント
non97
1
160
Gradle: The Build System That Loves To Hate You
aurimas
2
150
LeSSに潜む「隠れWF病」とその処方箋
lycorptech_jp
PRO
2
120
ABEMA のコンテンツ制作を最適化!生成 AI x クラウド映像編集システム / abema-ai-editor
cyberagentdevelopers
PRO
1
180
omakaseしないための.rubocop.yml のつくりかた / How to Build Your .rubocop.yml to Avoid Omakase #kaigionrails
linkers_tech
3
740
AWS CDKでデータリストアの運用、どのように設計する?~Aurora・EFSの実践事例を紹介~/aws-cdk-data-restore-aurora-efs
mhrtech
4
650
マネジメント視点でのre:Invent参加 ~もしCEOがre:Inventに行ったら~
kojiasai
0
470
MAMを軸とした動画ハンドリングにおけるAI活用前提の整備と次世代ビジョン / abema-ai-mam
cyberagentdevelopers
PRO
1
120
一休.comレストランにおけるRustの活用
kymmt90
3
580
コンテンツを支える 若手ゲームクリエイターの アートディレクションの事例紹介 / cagamefi-game
cyberagentdevelopers
PRO
1
130
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
92
16k
Teambox: Starting and Learning
jrom
132
8.7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
3
370
4 Signs Your Business is Dying
shpigford
180
21k
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
A Tale of Four Properties
chriscoyier
156
23k
Done Done
chrislema
181
16k
Fashionably flexible responsive web design (full day workshop)
malarkey
404
65k
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
A Modern Web Designer's Workflow
chriscoyier
692
190k
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.