Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Target SDK Versionを上げない Notification runtime pe...

Target SDK Versionを上げない Notification runtime permission対応

napplecomputer

June 22, 2022
Tweet

More Decks by napplecomputer

Other Decks in Technology

Transcript

  1. Mobility Technologies Co., Ltd. 2 ▪ @napplecomputer ▪ ͳͬͽʔ ▪

    גࣜձࣾMobility Technologiesॴଐ ▪ λΫγʔΞϓϦGOͷϢʔβʔΞϓϦ ▪ ࠓ೔20೥ͿΓʹচ԰ʹߦ͖·ͨ͠ ࣗݾ঺հ
  2. Mobility Technologies Co., Ltd. 4 ▪ ໨త͸3ͭ ▪ ΞϓϦʹ૝ఆ֎ͷڍಈΛͤ͞ͳ͍ͨΊ ▪

    ΞϓϦΛGoogle PlayͰ഑৴Ͱ͖Δঢ়گΛΩʔϓ͢ΔͨΊ ▪ Google PlayͰ͸Target SDK Versionʹର͢Δཁٻ͕͋Γɺظݶ·Ͱ ʹରԠͰ͖ͳ͍ͱ഑৴Ͱ͖ͳ͘ͳΔɻ ▪ ৽ػೳΛऔΓࠐΜͰΞϓϦͷ࢖͍উखΛྑ͘͢ΔͨΊ AndroidΞϓϦͷ৽OSରԠ
  3. Mobility Technologies Co., Ltd. 5 ▪ ҎԼͷެࣜυΩϡϝϯτΛ֬ೝ͢Δ ▪ Migrate apps

    to Android 13 ▪ Android 13 features and changes list ▪ Change (all apps) ▪ Change (apps targeting 13+) ▪ New features and APIs AndroidΞϓϦͷ৽OSରԠ
  4. Mobility Technologies Co., Ltd. 6 ▪ ҎԼͷެࣜυΩϡϝϯτΛ֬ೝ͢Δ ▪ Migrate apps

    to Android 13 ▪ Android 13 features and changes list ▪ Change (all apps) ▪ Change (apps targeting 13+) ▪ New features and APIs AndroidΞϓϦͷ৽OSରԠ
  5. Mobility Technologies Co., Ltd. 7 AndroidΞϓϦͷ৽OSରԠ ▪ ରԠॱং͸4ஈ֊ ▪ Change

    (all apps)ʹରԠ͢Δ ▪ Compile SDK VersionΛ্͛Δ ▪ Target SDK VersionΛ্͛Δ ▪ ৽ػೳΛऔΓࠐΉ
  6. Mobility Technologies Co., Ltd. 9 Notification runtime permission ▪ Android

    OS 13͔Β௨஌͕runtime permissionʹ௥Ճ͞Εͨ ▪ ࠓ·Ͱͷ௨஌ͷ༗ޮɾແޮ͕Permissionʹஔ͖׵ΘΔ ▪ Target SDK Version͕13Ҏ্ͷ৔߹ͱɺTarget SDK Version͕12LҎԼͷ৔߹ Ͱڍಈ͕ҟͳΔ ▪ ϝσΟΞ΍௨࿩ͳͲಛఆͷ௨஌͸Permission͕ͳͯ͘΋දࣔͰ͖Δ ▪ OSΞοϓσʔτͰAndroid OS 13ʹͳͬͨ৔߹ɺطଘͷ௨஌͕༗ޮͳΞϓϦ͸ ௨஌Permission͕ಘΒΕͨঢ়ଶʹͳΔʢ࠷ۙ࢓༷͕େ͖͘มΘͬͨʣ
  7. Mobility Technologies Co., Ltd. 12 Target SDK Version͕13ͷ৔߹ ▪ ৽نΠϯετʔϧͷ৔߹ɺ௨ৗͷRuntime

    Permissionͱಉ͡Α͏ʹରԠ͢ Ε͹ྑ͍ ▪ iOS͸Ҏલ͔Β௨஌ͷPermission͕ଘࡏ͍ͯ͠ΔͨΊɺiOS൛͕͋Δ৔߹͸ iOS൛ͷ࣮૷͕ࢀߟʹͳΔ
  8. Mobility Technologies Co., Ltd. 15 Target SDK Version͕12LҎԼͷ৔߹ ▪ ৽نΠϯετʔϧͷΞϓϦ͸

    ▪ PermissionཁٻΛࣗ༝ʹߦ͑ͳ͍ˍ݁ՌΛಘΒΕͳ͍ ▪ ௨஌νϟϯωϧΛ࡞੒ͨ͠ͱ͖ʹࣗಈͰPermissionཁٻ͕ߦΘΕΔ ▪ σόοάπʔϧͱͯ͠ྲྀߦͬͨHyperion͸ΞϓϦ͕ىಈ͢ΔͱࣗಈͰ௨ ஌νϟϯωϧΛ࡞੒͢ΔͨΊɺ͍͖ͳΓPermissionཁٻμΠΞϩά͕ද ࣔ͞ΕΔ͜ͱʹͳΔ… ▪ HyperionΛണ͕͞ͳ͍ͱςετ͠ʹ͍͘…
  9. Mobility Technologies Co., Ltd. 16 Target SDK Version͕12LҎԼͷ৔߹ ▪ λΫγʔΞϓϦGOͰ͸ApplicationͷonCreateͰ௨஌νϟϯωϧΛ࡞੒͍ͯ͠

    ΔͨΊɺΞϓϦىಈ௚ޙ࠷ॳͷActivity͕දࣔ͞ΕΔલʹPermissionཁٻμΠ Ξϩά͕දࣔ͞Εͯ͠·͏… ▪ ଞʹ΋௨஌νϟϯωϧͷଟݴޠରԠ͍ͯ͠Δ৔߹ͳͲ΋஫ҙ͕ඞཁ ▪ ݴޠ੾ସ࣌ͷBroadcastͰ௨஌νϟϯωϧ্໊ॻ͖͢Δ͍ͯ͠ΔͨΊ ▪ ௨஌Permission͕ͳ͍৔߹ɺద੾ͳλΠϛϯάҎ֎Ͱ͸௨஌νϟϯωϧΛ࡞੒ ͠ͳ͍Α͏ʹ͢Δඞཁ͕͋Δ
  10. Mobility Technologies Co., Ltd. 17 Target SDK Version͕12LҎԼͷ৔߹ ▪ PermissionཁٻΛࣗ༝ʹߦ͑ͳ͍ˍ݁ՌΛಘΒΕͳ͍

    ▪ ௨ৗͷPermissionཁٻखॱΛߦ͏ͱPermissionཁٻ͕ߦΘΕͣɺPermission ͕ಘΒΕͳ͔ͬͨͱͯ݁͠Ռ͕ฦͬͯ͘Δ ▪ ௨஌νϟϯωϧΛ࡞੒ͨ͠ࡍͷPermissionཁٻ͸݁Ռ͕ฦͬͯ͜ͳ͍ ▪ PermissionཁٻμΠΞϩά͕දࣔ͞Ε͔ͨͲ͏͔΋Θ͔Βͳ͍ ▪ ઃఆΞϓϦͰ௨஌ઃఆΛoff->on->offʹ੾Γସ͍͑ͯΔͱ௨஌νϟϯωϧΛ ࡞੒ͯ͠΋PermissionཁٻμΠΞϩά͸දࣔ͞Εͳ͍
  11. Mobility Technologies Co., Ltd. 19 Target SDK Version͕12LҎԼͷ৔߹ ▪ PermissionཁٻμΠΞϩάදࣔ࣌ʹonPause͕૸ΓɺPermissionཁٻμΠ

    Ξϩάऴྃ࣌ʹonResume͕૸Δ ▪ ௨஌νϟϯωϧ࡞੒௚ޙʹonPause͕ݺ͹ΕΕ͹PermissionཁٻμΠΞϩ ά͕දࣔ͞Ε͓ͯΓɺͦͷޙonResume͕ݺ͹ΕΕ͹PermissionཁٻμΠ Ξϩά͕ดͨ͡ͱ൑அͰ͖ͦ͏
  12. Mobility Technologies Co., Ltd. 21 ▪ ௨஌Λදࣔ͢ΔͨΊʹPermission͕ඞཁͳͬͨ ▪ Target SDK

    Version͸্͛ΒΕΔͳΒ্͛Δ΄͏͕ίϯτϩʔϧ͠΍͍͢ ▪ Ͳ͏ͯ͠΋Target SDK VersionΛ্͛Δͷ͕೉͍͠৔߹ɺTarget SDK VersionΛ্͛ͳͯ͘΋ؤுΕ͹ରԠͰ͖Δ ·ͱΊ