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.4k
compileSdkVersion33でgetSerializable/getParcelableがつらい話
napplecomputer
December 22, 2022
Tweet
Share
More Decks by napplecomputer
See All by napplecomputer
Kotlin2.0対応などでビルド時間を45%削減したぞ!
napplecomputer
0
620
EmojiPicker触ってみた
napplecomputer
0
580
式年遷Target SDK Version
napplecomputer
0
280
Target SDK Versionを上げない Notification runtime permission対応
napplecomputer
0
410
通知がOFFだとToastは表示されな… されてる!?
napplecomputer
0
870
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
スクラム成熟度セルフチェックツールを作って得た学びとその活用法
coincheck_recruit
1
140
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
460
Can We Measure Developer Productivity?
ewolff
1
150
適材適所の技術選定 〜GraphQL・REST API・tRPC〜 / Optimal Technology Selection
kakehashi
1
150
データプロダクトの定義からはじめる、データコントラクト駆動なデータ基盤
chanyou0311
1
260
Lexical Analysis
shigashiyama
1
150
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
170
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
110
Terraform Stacks入門 #HashiTalks
msato
0
350
Platform Engineering for Software Developers and Architects
syntasso
1
510
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
3
450
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
740
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
RailsConf 2023
tenderlove
29
900
Git: the NoSQL Database
bkeepers
PRO
427
64k
KATA
mclloyd
29
14k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
BBQ
matthewcrist
85
9.3k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Code Review Best Practice
trishagee
64
17k
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.