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
9
4.1k
compileSdkVersion33でgetSerializable/getParcelableがつらい話
napplecomputer
December 22, 2022
Tweet
Share
More Decks by napplecomputer
See All by napplecomputer
Kotlin2.0対応などでビルド時間を45%削減したぞ!
napplecomputer
0
480
EmojiPicker触ってみた
napplecomputer
0
540
式年遷Target SDK Version
napplecomputer
0
260
Target SDK Versionを上げない Notification runtime permission対応
napplecomputer
0
400
通知がOFFだとToastは表示されな… されてる!?
napplecomputer
0
840
Photo Pickerを触って比較してみた
napplecomputer
0
1.6k
Android Qのストレージの話
napplecomputer
3
1.1k
Wi-Fi RTTによる屋内測位アプリを作ろう
napplecomputer
5
17k
Other Decks in Technology
See All in Technology
[JAWS-UG GameTech] 第6回 各種事例紹介_18TRIPにおけるAWSサービスを活用した負荷テスト・障害テスト
naoto_yasuda
0
100
【swonet.conf_】NOCメンバーが語るSTMの実態!! ~ShowNetから若者への贈り物~
shownet
PRO
0
230
LINEヤフー新卒採用 コーディングテスト解説 実装問題編
lycorp_recruit_jp
1
12k
【shownet.conf_】クロージングセッション
shownet
PRO
0
220
成果のためのコミュニケーション - 語彙を育てよう -/communication-for-good-outcome-developing-vocabulary
hassaku63
4
150
Product Utilization of Large Language Models Starting Today
ymatsuwitter
3
690
【shownet.conf_】ShowNet伝送改めShowNet APN 2024
shownet
PRO
0
320
エンジニアは伝え方が9割/90% of what engineers need is communication skills
ykanoh
2
160
分析者起点の企画を成功させた連携面の工夫
lycorptech_jp
PRO
1
220
スモールスタート、不都合な真実 〜 耳当たりの良い言葉に現場が振り回されないために/20240930-ssmjp-small-start
opelab
13
1.7k
リスクから学ぶKubernetesコンテナセキュリティ/k8s-risk-and-security
mochizuki875
1
260
いまからでも遅くない! コンテナでWebアプリケーションを 動かしてみよう(2-1)WebAPI座学
nomu
0
140
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Why Our Code Smells
bkeepers
PRO
334
57k
Writing Fast Ruby
sferik
625
60k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
59k
Design by the Numbers
sachag
278
19k
[RailsConf 2023] Rails as a piece of cake
palkan
49
4.7k
A Philosophy of Restraint
colly
202
16k
We Have a Design System, Now What?
morganepeng
49
7.1k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Navigating Team Friction
lara
183
14k
Testing 201, or: Great Expectations
jmmastey
38
7k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
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.