Slide 1

Slide 1 text

Mobility Technologies Co., Ltd. compileSdkVersion33ͰgetSerializable/ getParcelable͕ͭΒ͍࿩ @napplecomputer

Slide 2

Slide 2 text

Mobility Technologies Co., Ltd. 2 ■ @napplecomputer ■ ͳͬͽʔ ■ גࣜձࣾMobility Technologies(MoT)ॴଐ ■ λΫγʔΞϓϦʮGOʯͷϢʔβʔΞϓϦ ■ ࡢ೔ΧϝϥҿΈ·ͨ͠ ࣗݾ঺հ

Slide 3

Slide 3 text

Mobility Technologies Co., Ltd. Android 13 ରԠ 3

Slide 4

Slide 4 text

Mobility Technologies Co., Ltd. 4 Android 13 ରԠ͠·͔ͨ͠ʁ

Slide 5

Slide 5 text

Mobility Technologies Co., Ltd. 5 https://support.google.com/googleplay/android-developer/answer/11926878

Slide 6

Slide 6 text

Mobility Technologies Co., Ltd. 6 Target SDK VersionΛ্͛ΔͨΊʹ͸ ͳʹΛ͢Ε͹͍͍ʁ

Slide 7

Slide 7 text

Mobility Technologies Co., Ltd. 7 ■ Target SDK VersionΛ্͛Δ͜ͱͰڍಈͷมΘΔ෦෼ͷରԠͱಈ࡞֬ೝ ■ ྫ͑͹Notification Runtime Permission ■ Compile SDK VersionΛ্͛Δ ■ Target SDK VersionΛCompile SDK VersionΑΓߴ͘͢Δ͜ͱ͸Ͱ͖ͳ ͍ Target SDK Version 33 ରԠ

Slide 8

Slide 8 text

Mobility Technologies Co., Ltd. Compile SDK Version 33 ରԠ 8

Slide 9

Slide 9 text

Mobility Technologies Co., Ltd. 9 ■ Compile SDK Version 33 ରԠͱ͸ͭ·ΓAPI level 33Ͱdeprecatedʹͳͬ ͨAPIΛ࢖༻͍ͯ͠Δ෦෼Λมߋ͢Δ͜ͱ ■ onBackPressedͷมߋͳͲ৭ʑ͋Δ ■ ಛʹBundleͱIntentͷมߋ͕ͭΒ͍ Compile SDK Version 33 ରԠ

Slide 10

Slide 10 text

Mobility Technologies Co., Ltd. 10 ■ T getParcelable(String) ■ Parcelable[] getParcelableArray(String) ■ ArrayList getParcelableArrayList(String) ■ Serializable getSerializable(String) ■ SparseArray getSparseParcelableArray(String) BundleͷDeprecated in API level 33

Slide 11

Slide 11 text

Mobility Technologies Co., Ltd. 11 ■ T getParcelable(String) ■ Parcelable[] getParcelableArray(String) ■ ArrayList getParcelableArrayList(String) ■ Serializable getSerializable(String) ■ SparseArray getSparseParcelableArray(String) BundleͷDeprecated in API level 33

Slide 12

Slide 12 text

Mobility Technologies Co., Ltd. 12 ■ T getParcelable(String, Class) ■ T[] getParcelableArray(String, Class) ■ ArrayList getParcelableArrayList(String, Class, extends, T>) ■ T getSerializable(String, Class) ■ SparseArray getSparseParcelableArray(String, Class, extends, T>) BundleͷAdded in API level 33

Slide 13

Slide 13 text

Mobility Technologies Co., Ltd. 13 ■ Parcelable[] getParcelableArrayExtra(String) ■ ArrayList getParcelableArrayListExtra(String) ■ T getParcelableExtra(String) ■ Serializable getSerializableExtra(String) IntentͷDeprecated in API level 33

Slide 14

Slide 14 text

Mobility Technologies Co., Ltd. 14 ■ T[] getParcelableArrayExtra(String, Class) ■ ArrayList getParcelableArrayListExtra(String, Class, extends, T>) ■ T getParcelableExtra(String, Class) ■ T getSerializableExtra(String, Class) IntentͷAdded in API level 33

Slide 15

Slide 15 text

Mobility Technologies Co., Ltd. 15 ೖΕସ͑Ε͹͍͍͚ͩʁ

Slide 16

Slide 16 text

Mobility Technologies Co., Ltd. 16 ͩΊ

Slide 17

Slide 17 text

Mobility Technologies Co., Ltd. 17 bundle.getSerializable(KEY_HOGE, HOGE::class.java)

Slide 18

Slide 18 text

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 }

Slide 19

Slide 19 text

Mobility Technologies Co., Ltd. 19 AppCompat͋ΔͰ͠ΐ

Slide 20

Slide 20 text

Mobility Technologies Co., Ltd. 20 ͳ͍

Slide 21

Slide 21 text

Mobility Technologies Co., Ltd. 21 Ͱ΋IssueTruckerʹ Feature Request͕͋Δ

Slide 22

Slide 22 text

Mobility Technologies Co., Ltd. 22 https://issuetracker.google.com/issues/243986223

Slide 23

Slide 23 text

Mobility Technologies Co., Ltd. ·ͱΊ 23

Slide 24

Slide 24 text

Mobility Technologies Co., Ltd. 24 ■ Compile SDK VersionͰ৽͘͠DeprecatedʹͳͬͨBundleͱIntentͷରԠ͕ͭ Β͍ ■ AppCompat͕·ͩରԠ͍ͯ͠ͳ͍ ■ ରԠํ๏͸࣍ͷ2ͭ ■ ࣗ࡞ͰόʔδϣϯΛ഑ྀ࣮ͯ͠૷ ■ AppCompatʹ࣮૷͞ΕΔͷΛ଴ͭ ■ ࣮૷͞ΕΔ·ͰSupress warning͢Δ ·ͱΊ

Slide 25

Slide 25 text

Mobility Technologies Co., Ltd. 25 ͱ͍͏ରԠͰ͸μϝͰ͢ ӕ·ͱΊͰͨ͠

Slide 26

Slide 26 text

Mobility Technologies Co., Ltd. One more thing... 26

Slide 27

Slide 27 text

Mobility Technologies Co., Ltd. 27 https://issuetracker.google.com/issues/240585930

Slide 28

Slide 28 text

Mobility Technologies Co., Ltd. 28 https://issuetracker.google.com/issues/240585930

Slide 29

Slide 29 text

Mobility Technologies Co., Ltd. 29 ■ ͳΜͱ৽͍͠getParcelableʹ͸όά͕༗Δ ■ ৚݅Λຬͨͨ͠ParcelableΛѻ͏ͱNullPointerException ■ API level 33ͷAPIͷόάͳͷͰमਖ਼͞ΕΔͱͯ͠΋API level 34 ■ ݹ͍getParcelableΛsuppress warning͠ͳ͕Β࢖͏ͷ͕ແ೉ ■ ѻ͏Parcelable͕ෆ۩߹Λ౿Ή৚݅Λຬ͍ͨͯ͠Δͷ͔൑ఆ͢Δͷ͸໘౗ ■ ͋ͱͰParcelableͷΫϥεΛมߋͯ͠஍ཕΛ౿ΜͰ͠·͏͔΋

Slide 30

Slide 30 text

Mobility Technologies Co., Ltd. ຊ౰ͷ·ͱΊ 30

Slide 31

Slide 31 text

Mobility Technologies Co., Ltd. 31 ■ Compile SDK VersionͰ৽͘͠DeprecatedʹͳͬͨBundleͱIntentͷରԠ͕ ͭΒ͍ ■ AppCompat͸·ͩରԠ͍ͯ͠ͳ͍ ■ ৽͍͠getParcelableʹ͸όά͕༗ΔͷͰɺsuppress warningͰݹ͍ getParcelableΛ࢖͏ͷ͕ແ೉ ■ কདྷAppCompat͕ରԠͨ͠৔߹ɺ෼ذͷڥք͕Ͳͷόʔδϣϯʹͳ͍ͬͯΔ ͷ͔֬ೝ͔ͯ͠Β࢖͍·͠ΐ͏ ·ͱΊ

Slide 32

Slide 32 text

จষ·ը૾౳ͷ಺༰ͷແஅసࡌٴͼෳ੡౳ͷߦҝ͸͝ԕྀ͍ͩ͘͞ɻ Mobility Technologies Co., Ltd.