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

Building for Android's future

Building for Android's future

2023년 7월 14일 (금) 인공지능위크 2023 행사에서의 발표자료입니다.
https://rsvp.withgoogle.com/events/aiweek2023

Sungyong An

July 14, 2023
Tweet

More Decks by Sungyong An

Other Decks in Programming

Transcript

  1. Building for Android's future
    Sungyong An

    Android Developer, NAVER WEBTOON

    View Slide

  2. Sungyong An

    NAVER WEBTOON

    Android GDE

    @fornewid

    View Slide

  3. Unintentional dependency changes
    Android 13 Target

    View Slide

  4. View Slide

  5. Link: https://developer.android.com/google/play/requirements/target-sdk

    View Slide

  6. Notification

    Permission
    Advertising ID

    Permission
    Granular Media

    Permission
    ׮ܲ জীࢲ ݅ٚ ޷٣য ౵ੌী ੽
    Ӕೞ۰ח ҃਋,
    READ_EXTERNAL_STORAGE
    ӂೠ ؀न ࣁ࠙ചػ ޷٣য ӂೠ ઺
    ೞա ੉࢚ਸ ਃ୒೧ঠ ೠ׮.

    READ_MEDIA_IMAGES ژח
    READ_MEDIA_VIDEO ژח
    READ_MEDIA_AUDIO
    Google Play ࢲ࠺झ ҟҊ IDܳ ࢎ
    ਊೞח জ਷ ݒפಕझ౟ ౵ੌী
    AD_ID ӂೠਸ ࢶ঱೧ঠ ೠ׮.

    ੉ ӂೠਸ ࢶ঱ೞ૑ ঋਵݶ ҟҊ ID
    о ੗زਵ۽ ઁѢغҊ 0 ޙ੗ৌ۽
    ؀୓ػ׮.
    Android 13ࠗఠח ࢎਊ੗о ঌܿ
    ӂೠਸ Ѣࠗೞݶ ঌܿ ହীࢲ ҙ۲
    ػ ঌܿਸ ࠅ ࣻ হ׮.

    ׮ܲ ۠ఋ੐ ӂೠҗ ਬࢎೞѱ ࢎਊ
    ੗ীѱ POST_NOTIFICATIONS
    ӂೠਸ ೲਊೡ૑ ഛੋ೧ঠ ೠ׮.
    Android 13 Target

    View Slide

  7. Granular Media Permission
    Link: https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions
    ׮ܲ জীࢲ ݅ٚ ޷٣য ౵ੌী ੽Ӕೞ۰ח ҃਋,
    READ_EXTERNAL_STORAGE ӂೠ ؀न

    ࣁ࠙ചػ ޷٣য ӂೠ ઺ ೞա ੉࢚ਸ ਃ୒೧ঠ ೠ׮.

    View Slide

  8. Photo Picker (Recommended)
    Link: https://d.android.com/training/data-storage/shared/photopicker
    • ӂೠ ਃ୒ হ੉ ࢎ૓ਸ ࢶఖೡ ࣻ ੓׮.

    • ࢎਊೞӝ औ׮.

    • ࢎ૓ ࢶఖӝܳ ࢎਊೡ ࣻ হਸ ٸח

    ACTION_OPEN_DOCUMENT۽ ز੘ೠ׮.

    • API 19ө૑ ૑ਗ оמ

    View Slide

  9. // build.gradle


    dependencies {


    implementation 'androidx.activity:activity-ktx:1.7.0'


    }


    // Kotlin


    val pickMedia = registerForActivityResult(PickVisualMedia()) { uri ->


    ...


    }


    pickMedia.launch(PickVisualMediaRequest(PickVisualMedia.ImageAndVideo))


    pickMedia.launch(PickVisualMediaRequest(PickVisualMedia.ImageOnly))


    pickMedia.launch(PickVisualMediaRequest(PickVisualMedia.VideoOnly))


    pickMedia.launch(PickVisualMediaRequest(PickVisualMedia.SingleMimeType("image/gif")))
    ߡ੹ਸ সؘ੉౟ೡ ٸ, যڌѱ Ѩషೞաਃ?

    View Slide

  10. Unintentional Dependency Changes!
    $ ./gradlew :app:dependencies --configuration releaseRuntimeClasspath
    androidx.activity:activity-ktx:1.2.3 -> 1.6.1


    +-- androidx.activity:activity:1.6.1 (*)


    +-- androidx.core:core-ktx:1.1.0 -> 1.8.0 (*)


    +-- androidx.lifecycle:lifecycle-runtime-ktx:2.5.1 (*)


    +-- androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1


    | +-- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*)


    | +-- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.7.10 (*)


    | \-- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1 -> 1.6.3 (*)


    +-- androidx.savedstate:savedstate-ktx:1.2.0


    | +-- androidx.savedstate:savedstate:1.2.0 (*)


    | \-- org.jetbrains.kotlin:kotlin-stdlib:1.6.20 -> 1.7.10 (*)


    +-- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 (*)


    \-- androidx.activity:activity:1.6.1 (c)
    androidx.activity:activity-ktx:1.2.3 -> 1.7.0


    +-- androidx.activity:activity:1.7.0 (*)


    +-- androidx.core:core-ktx:1.1.0 -> 1.8.0 (*)


    +-- androidx.lifecycle:lifecycle-runtime-ktx:2.6.1 (*)


    +-- androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1


    | +-- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (*)


    | +-- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 (*)


    | +-- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 (*)


    | +-- androidx.lifecycle:lifecycle-common:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-common-java8:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-livedata:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-livedata-ktx:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-process:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-runtime:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-runtime-ktx:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-service:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c)


    | \-- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c)


    +-- androidx.savedstate:savedstate-ktx:1.2.1


    | +-- androidx.savedstate:savedstate:1.2.1 (*)


    | +-- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 (*)


    | \-- androidx.savedstate:savedstate:1.2.1 (c)


    +-- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 (*)


    \-- androidx.activity:activity:1.7.0 (c)
    Dependency Treeܳ ഛੋ೧ࠁݶ

    Activity ৻ীب Kotlin, Coroutines, Lifecycle,
    SavedState৬ э਷ ׮ܲ ۄ੉࠳۞ܻ ߡ੹ب ߄Ո׮.

    View Slide

  11. Unintentional Dependency Changes!
    $ ./gradlew :app:dependencies --configuration releaseRuntimeClasspath
    androidx.activity:activity-ktx:1.2.3 -> 1.6.1


    +-- androidx.activity:activity:1.6.1 (*)


    +-- androidx.core:core-ktx:1.1.0 -> 1.8.0 (*)


    +-- androidx.lifecycle:lifecycle-runtime-ktx:2.5.1 (*)


    +-- androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1


    | +-- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*)


    | +-- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.7.10 (*)


    | \-- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1 -> 1.6.3 (*)


    +-- androidx.savedstate:savedstate-ktx:1.2.0


    | +-- androidx.savedstate:savedstate:1.2.0 (*)


    | \-- org.jetbrains.kotlin:kotlin-stdlib:1.6.20 -> 1.7.10 (*)


    +-- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 (*)


    \-- androidx.activity:activity:1.6.1 (c)
    androidx.activity:activity-ktx:1.2.3 -> 1.7.0


    +-- androidx.activity:activity:1.7.0 (*)


    +-- androidx.core:core-ktx:1.1.0 -> 1.8.0 (*)


    +-- androidx.lifecycle:lifecycle-runtime-ktx:2.6.1 (*)


    +-- androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1


    | +-- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (*)


    | +-- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 (*)


    | +-- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4 (*)


    | +-- androidx.lifecycle:lifecycle-common:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-common-java8:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-livedata:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-livedata-core:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-livedata-core-ktx:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-livedata-ktx:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-process:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-runtime:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-runtime-ktx:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-service:2.6.1 (c)


    | +-- androidx.lifecycle:lifecycle-viewmodel:2.6.1 (c)


    | \-- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1 (c)


    +-- androidx.savedstate:savedstate-ktx:1.2.1


    | +-- androidx.savedstate:savedstate:1.2.1 (*)


    | +-- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 (*)


    | \-- androidx.savedstate:savedstate:1.2.1 (c)


    +-- org.jetbrains.kotlin:kotlin-stdlib:1.8.10 (*)


    \-- androidx.activity:activity:1.7.0 (c)
    Dependency Treeܳ ഛੋ೧ࠁݶ

    Activity ৻ীب Kotlin, Coroutines, Lifecycle,
    SavedState৬ э਷ ׮ܲ ۄ੉࠳۞ܻ ߡ੹ب ߄Ո׮.
    How to
    prevent
    this?
    🤔

    View Slide

  12. Dependency Guard
    Link: https://github.com/dropbox/dependency-guard
    androidx.activity:activity-ktx:1.2.3 -> 1.6.1


    +-- androidx.activity:activity:1.6.1 (*)


    +-- androidx.core:core-ktx:1.1.0 -> 1.8.0 (*)


    +-- androidx.lifecycle:lifecycle-runtime-ktx:2.5.1 (*)


    +-- androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1


    | +-- androidx.lifecycle:lifecycle-viewmodel:2.5.1 (*)


    | +-- org.jetbrains.kotlin:kotlin-stdlib:1.6.21 -> 1.7.10 (*)


    | \-- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1 -> 1.6.3 (*)


    +-- androidx.savedstate:savedstate-ktx:1.2.0


    | +-- androidx.savedstate:savedstate:1.2.0 (*)


    | \-- org.jetbrains.kotlin:kotlin-stdlib:1.6.20 -> 1.7.10 (*)


    +-- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 (*)


    \-- androidx.activity:activity:1.6.1 (c)
    androidx.activity:activity:1.6.1


    androidx.activity:activity-ktx:1.6.1


    androidx.core:core-ktx:1.8.0


    androidx.lifecycle:lifecycle-runtime-ktx:2.5.1


    androidx.lifecycle:lifecycle-viewmodel:2.5.1


    androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1


    androidx.savedstate:savedstate:1.2.0


    androidx.savedstate:savedstate-ktx:1.2.0


    org.jetbrains.kotlin:kotlin-stdlib:1.7.10


    org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3


    ...
    ઺ࠂ ઁѢ


    + ੿۳
    ੄ب஖ ঋ਷ ੄ઓࢿ ߸҃ਸ ߑ૑ೞח Gradle ೒۞Ӓੋ
    📄 releaseRuntimeClasspath.txt

    View Slide

  13. Dependency Guard
    Link: https://github.com/dropbox/dependency-guard
    📄 releaseRuntimeClasspath.txt
    success or fail
    dependencyGuard
    develop branch current branch
    📄 releaseRuntimeClasspath.txt dependencyGuardBaseline

    View Slide

  14. // build.gradle


    buildscript {


    dependencies {


    classpath "com.dropbox.dependency-guard:dependency-guard:0.4.3"


    }


    }


    // app/build.gradle


    apply plugin: 'com.dropbox.dependency-guard'


    dependencyGuard {


    configuration("releaseRuntimeClasspath")


    }
    Installation

    View Slide

  15. $ ./gradlew dependencyGuardBaseline


    // dependencies/releaseRuntimeClasspath.txt


    androidx.activity:activity:1.6.1


    androidx.activity:activity-ktx:1.6.1


    androidx.core:core-ktx:1.8.0


    androidx.lifecycle:lifecycle-runtime-ktx:2.5.1


    androidx.lifecycle:lifecycle-viewmodel:2.5.1


    androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1


    androidx.savedstate:savedstate:1.2.0


    androidx.savedstate:savedstate-ktx:1.2.0


    org.jetbrains.kotlin:kotlin-stdlib:1.7.10


    org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3


    ...
    Create a dependency baseline

    View Slide

  16. dependencies {


    - implementation 'androidx.activity:activity-ktx:1.6.1'


    + implementation 'androidx.activity:activity-ktx:1.7.0'


    }


    -------------------------------------------------------------------------------


    $ ./gradlew dependencyGuard


    > Task :app:dependencyGuard FAILED


    Dependencies Changed in :app for configuration releaseRuntimeClasspath


    - androidx.activity:activity-ktx:1.6.1


    + androidx.activity:activity-ktx:1.7.0


    - androidx.lifecycle:lifecycle-runtime-ktx:2.5.1


    + androidx.lifecycle:lifecycle-runtime-ktx:2.6.1


    - androidx.savedstate:savedstate-ktx:1.2.0


    + androidx.savedstate:savedstate-ktx:1.2.1


    - org.jetbrains.kotlin:kotlin-stdlib:1.7.10


    + org.jetbrains.kotlin:kotlin-stdlib:1.8.10


    - org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.3


    + org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4

    View Slide

  17. $ ./gradlew dependencyGuardBaseline


    // dependencies/releaseRuntimeClasspath.txt


    androidx.activity:activity:1.7.0


    androidx.activity:activity-ktx:1.7.0


    androidx.core:core-ktx:1.8.0


    androidx.lifecycle:lifecycle-runtime-ktx:2.6.1


    androidx.lifecycle:lifecycle-viewmodel:2.6.1


    androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1


    androidx.savedstate:savedstate:1.2.1


    androidx.savedstate:savedstate-ktx:1.2.1


    org.jetbrains.kotlin:kotlin-stdlib:1.8.10


    org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4


    ...
    Update a dependency baseline

    View Slide

  18. ݒ֙ ׮নೠ ӝמٜ੉ ࢜܂ѱ ࣗѐؾפ׮.

    ೞ૑݅ উ੿੸ਵ۽ জਸ ѐߊೞח Ѫ੉ ޖ঺ࠁ׮ ઺ਃೞѷભ.

    য়ט ೠ о૑ ߑߨਸ ҕਬ೮૑݅,

    ࢜۽਍ ӝמਸ উ੿੸ਵ۽ بੑೡ ࣻ ੓ѱ

    ৈ۞о૑ ߑߨਸ Ҋ޹೧ࠁח Ѫਸ ୶ୌ೤פ׮.

    View Slide

  19. Apps work well together
    Seamless Interoperability

    View Slide

  20. WorkManager ࢎਊ
    Foreground Service ࢎਊоמ
    ੉ Use Caseܳ ਤ೧

    ҳ୷ػ APIо ੓աਃ?
    Background Work on Android 14
    ৈӝࢲ द੘!
    Yes
    ShortService ࢎਊ оמ
    Purpose Built API ࢎਊ
    No
    ੘স੉ Әߑ ՘աҊ

    ઺ਃೠоਃ?
    ࢎਊ੗о ੘স ࢚కܳ ঌ ࣻ ੓Ҋ

    ੌद ઺૑/઺૑ೡ ࣻ ੓աਃ?
    জ੉ foreground ੌ ٸ

    ࢎਊ੗о ੘সਸ द੘ೞաਃ?
    ੘স੉ Android੄

    Foreground Service ਬഋ ઺

    ೞա৬ ੌ஖ೞաਃ?
    Yes
    Yes
    No Yes
    No
    No
    Yes

    View Slide

  21. WorkManager ࢎਊ
    Foreground Service ࢎਊоמ
    ੉ Use Caseܳ ਤ೧

    ҳ୷ػ APIо ੓աਃ?
    Background Work on Android 14
    ৈӝࢲ द੘!
    Yes
    ShortService ࢎਊ оמ
    Purpose Built API ࢎਊ
    No
    ੘স੉ Әߑ ՘աҊ

    ઺ਃೠоਃ?
    ࢎਊ੗о ੘স ࢚కܳ ঌ ࣻ ੓Ҋ

    ੌद ઺૑/઺૑ೡ ࣻ ੓աਃ?
    জ੉ foreground ੌ ٸ

    ࢎਊ੗о ੘সਸ द੘ೞաਃ?
    ੘স੉ Android੄

    Foreground Service ਬഋ ઺

    ೞա৬ ੌ஖ೞաਃ?
    Yes
    Yes
    No Yes
    No
    No
    Yes
    ੉ Use Caseܳ ਤ೧

    ҳ୷ػ APIо ੓աਃ?

    View Slide

  22. WorkManager ࢎਊ
    Foreground Service ࢎਊоמ
    ੉ Use Caseܳ ਤ೧

    ҳ୷ػ APIо ੓աਃ?
    Background Work on Android 14
    ৈӝࢲ द੘!
    Yes
    ShortService ࢎਊ оמ
    Purpose Built API ࢎਊ
    No
    ੘স੉ Әߑ ՘աҊ

    ઺ਃೠоਃ?
    ࢎਊ੗о ੘স ࢚కܳ ঌ ࣻ ੓Ҋ

    ੌद ઺૑/઺૑ೡ ࣻ ੓աਃ?
    জ੉ foreground ੌ ٸ

    ࢎਊ੗о ੘সਸ द੘ೞաਃ?
    ੘স੉ Android੄

    Foreground Service ਬഋ ઺

    ೞա৬ ੌ஖ೞաਃ?
    Yes
    Yes
    No Yes
    No
    No
    Yes
    জ੉ foreground ੌ ٸ

    ࢎਊ੗о ੘সਸ द੘ೞաਃ?

    View Slide

  23. WorkManager ࢎਊ
    Foreground Service ࢎਊоמ
    ੉ Use Caseܳ ਤ೧

    ҳ୷ػ APIо ੓աਃ?
    Background Work on Android 14
    ৈӝࢲ द੘!
    Yes
    ShortService ࢎਊ оמ
    Purpose Built API ࢎਊ
    No
    ੘স੉ Әߑ ՘աҊ

    ઺ਃೠоਃ?
    ࢎਊ੗о ੘স ࢚కܳ ঌ ࣻ ੓Ҋ

    ੌद ઺૑/઺૑ೡ ࣻ ੓աਃ?
    জ੉ foreground ੌ ٸ

    ࢎਊ੗о ੘সਸ द੘ೞաਃ?
    ੘স੉ Android੄

    Foreground Service ਬഋ ઺

    ೞա৬ ੌ஖ೞաਃ?
    Yes
    Yes
    No Yes
    No
    No
    Yes
    ࢎਊ੗о ੘স ࢚కܳ ঌ ࣻ ੓Ҋ

    ੌद ઺૑/઺૑ೡ ࣻ ੓աਃ?

    View Slide

  24. WorkManager ࢎਊ
    Foreground Service ࢎਊоמ
    ੉ Use Caseܳ ਤ೧

    ҳ୷ػ APIо ੓աਃ?
    Background Work on Android 14
    ৈӝࢲ द੘!
    Yes
    ShortService ࢎਊ оמ
    Purpose Built API ࢎਊ
    No
    ੘স੉ Әߑ ՘աҊ

    ઺ਃೠоਃ?
    ࢎਊ੗о ੘স ࢚కܳ ঌ ࣻ ੓Ҋ

    ੌद ઺૑/઺૑ೡ ࣻ ੓աਃ?
    জ੉ foreground ੌ ٸ

    ࢎਊ੗о ੘সਸ द੘ೞաਃ?
    ੘স੉ Android੄

    Foreground Service ਬഋ ઺

    ೞա৬ ੌ஖ೞաਃ?
    Yes
    Yes
    No Yes
    No
    No
    Yes
    ੘স੉ Android੄

    Foreground Service ਬഋ ઺

    ೞա৬ ੌ஖ೞաਃ?

    View Slide

  25. Foreground Service
    Link: https://goo.gle/fgstypes

    View Slide

  26. WorkManager ࢎਊ
    Foreground Service ࢎਊоמ
    ੉ Use Caseܳ ਤ೧

    ҳ୷ػ APIо ੓աਃ?
    Background Work on Android 14
    ৈӝࢲ द੘!
    Yes
    ShortService ࢎਊ оמ
    Purpose Built API ࢎਊ
    No
    ੘স੉ Әߑ ՘աҊ

    ઺ਃೠоਃ?
    ࢎਊ੗о ੘স ࢚కܳ ঌ ࣻ ੓Ҋ

    ੌद ઺૑/઺૑ೡ ࣻ ੓աਃ?
    জ੉ foreground ੌ ٸ

    ࢎਊ੗о ੘সਸ द੘ೞաਃ?
    ੘স੉ Android੄

    Foreground Service ਬഋ ઺

    ೞա৬ ੌ஖ೞաਃ?
    Yes
    Yes
    No Yes
    No
    No
    Yes
    WorkManager ࢎਊ

    View Slide

  27. Foreground Service ਬഋҗ ӂೠ
    Link: https://developer.android.com/google/play/requirements/target-sdk
    Service ӂೠ Manifest ਬഋ
    FOREGROUND_SERVICE_CAMERA camera
    FOREGROUND_SERVICE_CONNECTED_DEVICE connectedDevice
    FOREGROUND_SERVICE_DATA_SYNC dataSync
    FOREGROUND_SERVICE_HEALTH health
    FOREGROUND_SERVICE_LOCATION location
    FOREGROUND_SERVICE_MEDIA_PLAYBACK mediaPlayback
    FOREGROUND_SERVICE_MEDIA_PROJECTION mediaProjection
    FOREGROUND_SERVICE_MICROPHONE microphone
    FOREGROUND_SERVICE_PHONE_CALL phoneCall
    FOREGROUND SERVICE_REMOTE_MESSAGING remoteMessaging
    shortService
    FOREGROUND_SERVICE_SPECIAL_USE specialUse
    FOREGROUND_SERVICE_SYSTEM_EXEMPTED systemExempted

    View Slide

  28. Link: https://developer.android.com/about/versions/14/changes/fgs-types-required#use-cases
    • Foreground Service ਬഋী ؀ೠ

    ۠ఋ੐ ਃҳࢎ೦ਸ ୽઒೧ঠ ೠ׮.

    • ৘द: location FGSܳ ࢎਊೞ۰ݶ

    COARSE ژח FINE ӂೠ੉ ੓যঠ ೠ׮.

    • Google Play ੿଼ب द೯ػ׮.
    Foreground Service

    enforcement

    View Slide


















  29. android:name=".MyFitnessService"


    android:foregroundServiceType="health|location"


    android:exported="false" />






    View Slide

  30. WorkManager ࢎਊ
    Foreground Service ࢎਊоמ
    ੉ Use Caseܳ ਤ೧

    ҳ୷ػ APIо ੓աਃ?
    Background Work on Android 14
    ৈӝࢲ द੘!
    Yes
    ShortService ࢎਊ оמ
    Purpose Built API ࢎਊ
    No
    ੘স੉ Әߑ ՘աҊ

    ઺ਃೠоਃ?
    ࢎਊ੗о ੘স ࢚కܳ ঌ ࣻ ੓Ҋ

    ੌद ઺૑/઺૑ೡ ࣻ ੓աਃ?
    জ੉ foreground ੌ ٸ

    ࢎਊ੗о ੘সਸ द੘ೞաਃ?
    ੘স੉ Android੄

    Foreground Service ਬഋ ઺

    ೞա৬ ੌ஖ೞաਃ?
    Yes
    Yes
    No Yes
    No
    No
    Yes
    ੘স੉ Әߑ ՘աҊ

    ઺ਃೠоਃ?

    View Slide

  31. Short Service
    Link: https://developer.android.com/about/versions/14/changes/fgs-types-required#short-service
    ઺ױೞѢա োӝೡ ࣻ হח ઺ਃೠ ੘সী ࢎਊೞח FGS ਬഋ

    • ૣ਷ दр زউ݅ प೯ؼ ࣻ ੓׮. (୭؀ 3࠙)

    • STICKY FGSח ૑ਗೞ૑ ঋח׮.

    • ׮ܲ FGSܳ प೯ೡ ࣻ হ׮.

    • प೯઺ੋ FGSܳ shortService ਬഋਵ۽ ߸҃ೡ ࣻ হ׮.

    Service.onTimeout() ੉ ഐ୹غݶ, জ੉ cached stateо ػ׮.

    ੉ ٸ, Short Serviceо ઺૑غ૑ ঋਵݶ ANR੉ ߊࢤೠ׮.

    View Slide

  32. Cached apps in Android 14
    Link: https://developer.android.com/about/versions/14/behavior-changes-all#pending-broadcasts-queued
    • cached stateо غݶ ݻ ୡ ੉ղী CPUܳ ੼ਬೡ ࣻ হѱ ػ׮.

    • ز੸ਵ۽ ١۾ػ BroadcastReceiverח ؀ӝ࢚కо غ঻׮о

    cached stateܳ ߩযզ ٸ, broadcastо ೠߣী ੹׳ػ׮.

    ੉ ٸ, broadcastо ߽೤غয ੹׳ؼ ࣻب ੓׮.

    View Slide

  33. Purpose Built APIs
    җѢীח Foreground Serviceо ೙ਃ೮؍ ӝמب

    FGS হ੉ ҳഅೡ ࣻ ੓ѱ ׮নೠ APIܳ ઁҕೞҊ ੓׮.

    • Companion Device Manager

    • Picture-In-Picture

    • Chat Bubble

    • Bluetooth Scanning

    • Core-Telecom Jetpack library

    • User-initiated data transfer job

    • …

    View Slide

  34. User-initiated data transfer
    Link: https://developer.android.com/about/versions/14/changes/user-initiated-data-transfers
    ࢎਊ੗о द੘ೠ ؘ੉ఠ ੹࣠ ੘সী ࢎਊೠ׮.

    • ৘द: ౵ੌ ׮਍۽٘/স۽٘

    • RUN_USER_INITIATED_JOBS ӂೠਸ

    Manifestী ୶о೧ঠ ೠ׮.

    • ੘স੉ प೯غח زউ, ঌܿਸ ಴द೧ঠ ೠ׮.

    • ੘সਸ ઺૑ೞѢա ੌ੿ਸ ߸҃ೡ ࣻ ੓Ҋ,

    ઁড ઑѤਸ ࢸ੿ೡ ࣻب ੓׮.

    View Slide

  35. Exact Alarms
    Link: https://developer.android.com/about/versions/14/changes/schedule-exact-alarms
    ߔӒۄ਍٘ীࢲ ੘সਸ प೯ೞӝী ੸೤ೠ ߑߨ਷ ইפ׮.

    • ؀উਵ۽ WorkManager੄ Periodic Work ӝמਸ ࢎਊೡ ࣻ ੓׮.

    • Android 14 ࠗఠח Android 13+ਸ ؀࢚ਵ۽ ೞח জ਷

    SCHEDULE_EXACT_ALARM ӂೠ੉ ઁೠػ׮.

    • ஫ܽ؊, ঌۈ द҅ জ݅ ৘৻੸ਵ۽

    USE_EXACT_ALARM ӂೠਸ ࢎਊೡ ࣻ ੓׮.

    View Slide

  36. The future of running in the Background
    • ԙ ೙ਃೠ ҃਋о ইפۄݶ WorkManagerܳ ࢎਊೡ Ѫ

    • ؘ੉ఠܳ زӝചೞח ݾ੸ਵ۽ח ౠ൤

    • оמೞ׮ݶ Purpose Built APIܳ ࢎਊೡ Ѫ

    • ୭ࢶ੄ ҃਋ী݅ Foreground Serviceܳ ࢎਊೡ Ѫ

    • Exact Alarms਷ ߈٘द ೙ਃೠ ҃਋ী݅ ࢎਊೡ Ѫ

    View Slide

  37. Cross Device SDK
    Link: github.com/google/cross-device-sdk
    рױೞҊ ૒ҙ੸ੋ API۽ Multi-device ҃೷ਸ ҳ୷ೡ ࣻ ੓׮.

    Device discovery, Secure connections, Multi-device Sessions

    Personal Experiences:

    • ಪীࢲ ߊ಴ ѐਃܳ ੘ࢿೞҊ, క࠶݁ਵ۽ ੹׳ೞৈ ৮ࢿೠ׮.

    • ಪਵ۽ ੍؍ ӝࢎܳ, క࠶݁ীࢲ ੉যࢲ ੍ח׮.

    Communal experiences:

    • ஘ҳ ੗زରী ૑ب ਤ஖ܳ ҕਬೠ׮.

    • ೣԋ ੗੹Ѣܳ ఋח ࢎۈٜҗ ੗੹Ѣ ҃۽ܳ ҕਬೠ׮.

    View Slide

  38. 3-Button Navigation
    Gesture Navigation

    View Slide

  39. Predictive Back

    View Slide

  40. Cross Activity
    Back-to-Home

    View Slide

  41. Material Component Animations
    Link: https://m3.material.io/foundations/interaction/gestures#22462fb2-fbe8-4e0c-b3e7-9278bd18ea0d
    • Search

    • Bottom Sheet

    • Slide Sheet

    View Slide

  42. // build.gradle


    dependencies {


    implementation "androidx.activity:activity:1.6.0"


    }











    ...






    View Slide

  43. Migration Path
    Link: https://developer.android.com/guide/navigation/custom-back/predictive-back-gesture
    Back ੉߮౟ܳ interceptೞҊ ੓׮ݶ,

    • KeyEvent.KEYCODE_BACK


    • Activity#onBackPressed()


    ௏٘ܳ ߸҃ೞৈ Predictive Back Gestureܳ ૑ਗೡ ࣻ ੓׮.

    • Activity, Fragment:

    • AndroidX API: onBackPressedDispatcher + onBackPressedCallback

    • Platform API (T+): onBackInvokedDispatcher + OnBackInvokedCallback

    • Jetpack Compose: BackHandler

    View Slide

  44. // Using AndroidX API


    class MyFragment : Fragment () {


    override fun onViewCreated (view: View, savedInstanceState: Bundle?) {


    val binding = MyFragmentBinding.bind(view)


    val callback = requireActivity().onBackPressedDispatcher.addCallback(


    owner = viewLifecycleOwner,


    enabled = false


    ) {


    // handle back event


    }


    binding.editText .doAfterTextChanged { text ->


    callback.isEnabled = !text.isNullOrEmpty()


    }


    }


    }

    View Slide

  45. // Using Jetpack Compose API


    fun MyScreen() {


    val name by remember { mutableStateof ("") }


    BackHandler (enabled = name.isNotEmpty()) {


    // handle back event


    }


    TextField(


    value = name,


    onValueChange = { name = it },


    label = { Text("Name") }


    )


    }

    View Slide

  46. Tips!
    (1) UI ۽૒ী callbackਸ ࢎਊೞ૑ ݈ Ѫ

    ৘ܳ ٜয, onBackPressed()ীࢲ ੉߮౟ܳ ۽Ӧೞ؍ ௏٘ܳ callbackਵ۽ ৤ӝݶ

    ৘ஏ গפݫ੉࣌੉ ࠺ഝࢿചغҊ ૒੽ Navigationਸ ׮ܞঠ ೠ׮.

    Lifecycle Callbackਸ ੉ਊೞח Ѫਸ ӂ੢ೠ׮.

    (2) callback਷ ױੌ ଼੐ਵ۽ ٜ݅ Ѫ

    callbackਸ Stackী ୶оೞח ҳઑۄࢲ,

    গפݫ੉࣌ ഑਷ ӝמ݃׮ ೞա੄ callbackਸ ݅٘ח Ѫਸ ӂ੢ೠ׮.
    // Don't do this! ❌


    override fun onBackPressed() {


    // log back event


    }
    // Cross activity ✅


    override fun onDestroy() {


    ...


    if (isFinishing) {


    // log back event


    }


    }
    // Cross fragment ✅


    override fun onDestroy() {


    ...


    if (isRemoving) {


    // log back event


    }


    }

    View Slide

  47. // use android.activity:activity-ktx:1.8.0-alpha05 or higher


    object : OnBackPressedCallback(true) {


    override fun handleOnBackStarted(backEvent: BackEventCompat) {


    }


    override fun handleOnBackProgressed(backEvent: BackEventCompat) {


    }


    override fun handleOnBackCancelled() {


    }


    }
    Predictive Back Progress

    View Slide






  48. android:enableOnBackInvokedCallback="false">




    android:name=".MainActivity"


    android:enableOnBackInvokedCallback="true"


    ...>







    android:name=".SecondActivity"


    ...>









    Disables Predictive Back

    View Slide

  49. Apps should be designed for safety
    Privacy & Security

    View Slide

  50. Designing for safety
    Link: https://d.android.com/design-for-safety
    ୭ࣗചী ઺੼ਸ ك ೐ۄ੉ߡदܳ Ҋ۰ೠ ٣੗ੋ

    • জ੄ ӂೠਸ ୭ࣗച೧ঠ ೠ׮.

    • ਤ஖੄ ੿ഛࢿҗ ࠼بܳ ୭ࣗച೧ঠ ೠ׮.

    • ׮ܲ জ੄ оदࢿਸ ୭ࣗചೞҊ, ӝӝ ध߹੗ ࢎਊਸ ୭ࣗച೧ঠ ೠ׮.

    • জ੉ ࢎਊ੗੄ ؘ੉ఠী ੽Ӕೞח Ѫਸ ੉೧ೞب۾ ذҊ, ࢎਊ੗ীѱ ઁয ӂೠਸ ࠗৈ೧ঠ ೠ׮.

    • জ੉ ੽ӔೞҊ ࣻ૘ೞח ੿ࠁܳ ࢎਊ੗о ੜ ঌ ࣻ ੓ب۾ ೧ঠ ೠ׮.

    View Slide

  51. Link: https://developer.android.com/codelabs/android-privacy-codelab
    • ૑դ ݻ ର۹ ୹दী Ѧ஘

    Android ѐੋ ੿ࠁ ࠁഐ ӂ੢ࢎ೦

    • ѐੋ ੿ࠁ ࠁഐ ӂ੢ࢎ೦ਸ ӝઓ জী ా೤ೞৈ

    ѐੋ ੿ࠁܳ ؊਌ উ੹ೞѱ ࠁഐೞח ߑߨ
    Android Privacy Codelab

    View Slide

  52. ୭Ӕী ୶оػ Android ѐੋ ੿ࠁ ࠁഐ ҙ۲ ӝמ
    Link: https://developer.android.com/training/permissions/explaining-access

    View Slide

  53. New in Android 14

    View Slide

  54. Selected Photos Access
    if (granted(READ_MEDIA_IMAGES, READ_MEDIA_VIDEO))
    {


    // Full access


    }


    else if (granted(READ_MEDIA_VISUAL_USER_SELECTED)
    {


    // Partial access


    }


    else {


    // Denied


    }
    Android 14 ࠗఠ ࢎਊ੗о ࢶఖೠ ࢎ૓җ ز৔࢚ী ؀೧ࢲ݅ জী ੽Ӕ ӂೠਸ ࠗৈೡ ࣻ ੓׮.

    ૒੽ ӂೠਸ ҙܻೞח Ѫࠁ׮ Photo Picker ࢎਊਸ ӂ੢ೠ׮.
    Link: https://developer.android.com/about/versions/14/changes/partial-photo-video-access

    View Slide

  55. Special App Access Permissions
    Link: https://developer.android.com/training/permissions/requesting-special
    ౠ߹ ӂೠ਷ ޹хೠ दझమ ܻࣗझ ؀ೠ ੽Ӕਸ ࠁഐೠ׮.

    ৘ܳ ٜݶ:

    • ׮ܲ জ ਤী ಴दೞѢա Ӓܻח ӂೠ

    • ݽٚ ੷੢ࣗ ؘ੉ఠী ੽Ӕೞח ӂೠ

    • दझమ ࢸ੿ਸ ࣻ੿ೞח ӂೠ

    Android 14 ࠗఠ ࢜۽਍ ౠ߹ ӂೠ੉ ୶оػ׮.

    • USE_FULL_SCREEN_INTENT (=੹୓ ചݶ ੋబ౟ ҙܻ)

    ాച ژח ঌۈ জ݅ ӝࠄਵ۽ ഝࢿചػ׮.

    • SCHEDULE_EXACT_ALARM (=ঌۈ ߂ ܻ݃ੋ؊)

    ӝࠄ੸ਵ۽ ؀ࠗ࠙੄ জী ഝࢿചغ૑ ঋח׮.

    View Slide

  56. // USE_FULL_SCREEN_INTENT


    val notificationManager = NotificationManagerCompat.from(context)


    if (notificationManager.canUseFullScreenIntent()) {


    notificationBuilder.setFullScreenIntent(...)


    } else {


    startActivity(Intent(ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT))


    }


    // SCHEDULE_EXACT_ALARM


    val alarmManager = getSystemService()


    if (alarmManager != null) {


    if (alarmManager.canScheduleExactAlarms()) {


    alarmManager.setExact(...)


    } else {


    startActivity(Intent(ACTION_REQUEST_SCHEDULE_EXACT_ALARM))


    }


    }

    View Slide

  57. Broadcast Receiver
    Link: https://developer.android.com/about/versions/14/behavior-changes-14#runtime-receivers-exported
    Android 14ܳ ؀࢚ਵ۽ ೞח জ਷ ۠ఋ੐ BRਸ ١۾ೡ ٸ,

    RECEIVER_EXPORTED ژח RECEIVER_NOT_EXPORTED ઺ ೞաܳ ૑੿೧ঠ ೠ׮.

    ૑੿غ૑ ঋਵݶ, SecurityException੉ ߊࢤೠ׮.
    // I want to receive broadcasts from other apps!


    context.registerReceiver(broadcastReceiver, intentFilter, RECEIVER_EXPORTED)


    // I DON'T want to receive broadcasts from other apps, even system apps!


    context.registerReceiver(broadcastReceiver, intentFilter, RECEIVER_NOT_EXPORTED)

    View Slide

  58. Intent
    Link: https://developer.android.com/about/versions/14/behavior-changes-14#safer-intents
    Android 14ܳ ؀࢚ਵ۽ ೞח জ਷ ղࠗ জ ҳࢿਃࣗী ঐद੸ ੋబ౟ܳ ੹࣠ೞ૑ ޅೞب۾ ઁೠೠ׮.

    • ҳࢿਃࣗܳ android:exported="true"۽ ࢶ঱ೞѢա,

    • ݺद੸ ੋబ౟ܳ ࢎਊ೧ঠ ೠ׮.

    • ঐद੸ ੋబ౟۽ Mutable PendingIntentܳ ࢤࢿೞݶ, Exception੉ ߊࢤೠ׮.
    // vulnerable


    val intent = Intent("com.example.action.APP_ACTION")


    context.startActivity(intent)


    // correct


    val intent = Intent("com.example.action.APP_ACTION")


    intent.package = context.packageName


    context.startActivity(intent)

    View Slide

  59. Background Activity Launch (BAL)
    Link: https://developer.android.com/about/versions/14/behavior-changes-14#background-activity-restrictions
    Android 14ܳ ؀࢚ਵ۽ ೞח জ਷ ߔӒۄ਍٘ীࢲ Activityܳ प೯ೡ ࣻ হب۾ ୶о۽ ઁೠೠ׮.

    • PendingIntent#send() ١ਵ۽ জ੉ PendingIntentܳ ࠁյ ٸ,

    BAL ӂೠਸ ࠗৈೞ۰ݶ ২౟ੋ೧ঠ ೠ׮.

    setPendingIntentBackgroundActivityStartMode(MODE_BACKGROUND_ACTIVITY_START_ALLOWED)


    • ചݶী ಴दغח জ੉ ߔӒۄ਍٘ী ੓ח ׮ܲ জ੄ ࢲ࠺झী bindService()۽ ߄ੋ٘ೡ ٸ

    ߄ੋ٘ػ ࢲ࠺झী BAL ӂೠਸ ࠗৈೞ۰ݶ,

    ചݶী ಴दغח জীࢲ BIND_ALLOW_ACTIVITY_STARTS flagܳ ࢎਊೞৈ ӝמਸ ২౟ੋ೧ঠ ೠ׮.

    View Slide

  60. Target SDK 33

    2023.08.31.
    2023 2024
    জ সؘ੉౟
    ো੢ оמೠ ӝೠ

    2023.11.01.
    Target SDK 33

    2023.08.31.
    नӏ জ ١۾
    Link: https://support.google.com/googleplay/android-developer/answer/11926878
    Google Play

    View Slide

  61. Minimum target API level
    Link: https://developer.android.com/about/versions/14/behavior-changes-all#minimum-target-api-level
    Android 14 ࠗఠח targetSdkVersion੉ 23ࠁ׮ ծ਷ জਸ ࢸ஖ೡ ࣻ হ׮.

    ױ, Android 14۽ সӒۨ੉٘ೞח ӝӝীࢲח

    targetSdkVersion 23 ޷݅ੋ ݽٚ জ੉ ࢸ஖ػ ࢚క۽ ਬ૑ػ׮.
    < 23

    View Slide

  62. • Google Play SDK Indexܳ ੉ਊೞৈ

    ੸೤ೠ SDKܳ ࢶఖೞחؘ ੿ࠁܳ ઁҕೠ׮.

    https://play.google.com/sdks

    • Data Access Auditing API۽ SDKо

    ࠺ҕѐ ؘ੉ఠী ੽Ӕೞח૑ Ѩ୹ೡ ࣻ ੓׮.

    d.android.com/guide/topics/data/audit-access
    ৻ࠗ SDK ࢎਊ

    View Slide

  63. Data Safety Section
    Link: https://support.google.com/googleplay/android-developer/answer/10787469

    View Slide

  64. Data Deletion
    Link: https://support.google.com/googleplay/android-developer/answer/13327111

    View Slide

  65. Data Deletion Policy
    Link: https://support.google.com/googleplay/android-developer/answer/13327111
    জীࢲ ࢎਊ੗о ҅੿ਸ ٜ݅ ࣻ ੓ਵݶ,

    ҅੿ਸ ࢏ઁೡ ࣻ ੓ח ҃۽ܳ ઁҕ೧ঠ ೠ׮.

    1. জ ղ ҃۽

    2. ਢ ࢎ੉౟ ҃۽

    ҅੿਷ ࢏ઁೞ૑ ঋҊ,

    ࢎਊ੗੄ ؘ੉ఠ݅ ࢏ઁೞח ӝמੋ

    ҅੿ ੿ܻ ২࣌ب ઁҕೞח Ѫਸ ӂ੢ೠ׮.

    View Slide

  66. ࢎਊ੗ ѐੋ ੿ࠁ ࠁഐܳ ъചೞח زदী

    ݽ߄ੌ ҟҊܳ ૑ਗೞח ࢜۽਍ ೒ۖಬ ӝמ بੑ
    Privacy Sandbox
    Link: https://developer.android.com/design-for-safety/privacy-sandbox

    View Slide

  67. • Ѥъ ߂ ೖ౟פझ ؘ੉ఠܳ ҙܻೞח ઺ঔ ઁয ࣃఠ

    • ؘ੉ఠח ӝӝী ۽ஸ۽ ੷੢ػ׮.
    Health Connect
    Link: https://developer.android.com/health-connect

    View Slide

  68. Credential Manager
    Link: https://developer.android.com/training/sign-in/passkeys
    • Android 14ী ୶оػ ೒ۖಬ API

    • API 19ө૑ ഐജغח Jetpack ۄ੉࠳۞ܻب ઁҕೠ׮.

    • ױੌ API۽ passkey, password, federated sign-inਸ ૑ਗೠ׮.

    • One-tap ۽Ӓੋਵ۽ ҅੿ ੹ജ੉ оמೞ׮.

    View Slide

  69. App adapt to user needs and desires
    Personalization

    View Slide

  70. Jetpack Glance
    Link: https://d.android.com/jetpack/compose/glance
    Jetpack Compose APIܳ ੉ਊೞৈ,

    জ ਤઇ੄ ۨ੉ইਓਸ ѐߊೡ ࣻ ੓׮.

    View Slide

  71. @Composable


    fun Weather(...) {


    Column(...) {


    Row(...) {


    WeatherIcon(...)


    PlaceWeather( ...)


    }


    Row(...) {


    CurrentTemperature( ...)


    HourlyForecast(...)


    }


    DailyForecast(...)


    }


    }


    @Composable


    fun WeatherIcon(...) {...}


    @Composable


    fun PlaceWeather() {...}


    @Composable


    fun DailyForecast() {...}
    Link: https://github.com/android/user-interface-samples/tree/main/AppWidget

    View Slide

  72. Link: https://developer.android.com/develop/ui/views/launch/icon_design_adaptive
    Adaptive Icons

    View Slide














  73. View Slide

  74. View Slide

  75. Adaptive Icons
    • goo.gle/adaptive-icon-template

    • goo.gle/adaptive-icon-codelab

    View Slide

  76. Link: https://developer.android.com/guide/topics/resources/app-languages
    জ߹ ঱য ࢸ੿

    View Slide















































































































































































































































































  77. View Slide

  78. // Using Android platform API


    val localeManager = getSystemService()


    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {


    localeManager?.applicationLocales = LocaleList(Locale.forLanguageTag("en-US"))


    val currentAppLocale: LocaleList = localeManager.getApplicationLocales()


    }


    // Using AppCompat API


    val appLocale: LocaleListCompat = LocaleListCompat.forLanguageTags("en-US")


    // Call this on the main thread as it may require Activity.restart()


    AppCompatDelegate.setApplicationLocales(appLocale)


    val currentAppLocale: LocaleListCompat = AppCompatDelegate.getApplicationLocales()
    জ ղ ࢸ੿ীࢲ ঱য ࢶఖ ઁҕೞӝ

    View Slide

  79. Link: https://developer.android.com/studio/preview/features#automatic-per-app-languages
    জ߹ ঱য ੗ز ૑ਗ
    1. Android Studio Giraffe Canary 7 ੉࢚ਸ ׮਍۽٘ೠ׮.

    2. Android Gradle Pluginਸ 8.1.0-alpha07 ੉࢚ਵ۽ সؘ੉౟ೠ׮.

    3. ӝࠄ localeਸ res/resources.propertiesী ୶оೠ׮.


    4. build.gradleী ২࣌ਸ ୶оೠ׮.


    5. ૒੽ ࢤࢿೠ ܳ ࢏ઁೠ׮.
    unqualifiedResLocale=en-US
    android {


    androidResources {


    generateLocaleConfig = true


    }


    }

    View Slide


























  80. View Slide

  81. 👏

    View Slide

  82. Link: https://developer.android.com/about/versions/14/features#app-languages
    জীࢲ ૑ਗೞח ঱য ݾ۾

    ز੸ਵ۽ ߸҃ೞӝ
    A Test B Test

    View Slide

  83. // i.e. "de,fr,hi,ja" or "de,fr,hi,ja,bn"


    val locales = Firebase.remoteConfig["a_b_test"].asString()


    val localeManager = getSystemService()


    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {


    localeManager?.overrideLocaleConfig = LocaleConfig(


    LocaleList.forLanguageTags(locales)


    )


    }

    View Slide

  84. Link: https://developer.android.com/about/versions/14/features#regional-preferences
    ૑৉ ജ҃ࢸ੿
    ࢎਊ੗о दझమ ࢸ੿ীࢲ ߸҃ೡ ࣻ ੓׮. (ҕా)

    androidx.core:core:1.12.0-alpha01 ࠗఠ ࢎਊ оמ

    • LocalePreferences.getTemperatureUnit()


    • LocalePreferences.getFirstDayOfWeek()

    View Slide

  85. Link: https://developer.android.com/about/versions/14/features/grammatical-inflection
    ࢿ߹ਸ Ҋ۰ೠ UI
    • 30র ݺ ੉࢚੄ ࢎਊ੗о ࢿ߹੉ ૑੿ػ ঱য(=gendered languages)ܳ ࢎਊೠ׮.

    • Android 14ࠗఠ ޙߨ੸ ࢿ߹ী ҙೠ ૑ਗਸ ୶оೡ ࣻ ੓ח Grammatical Inflection APIܳ بੑೠ׮.

    • ৈࢿഋ/թࢿഋ/઺ࢿ੸ ޙҳܳ ઁҕೡ ࣻ ੓׮. (Feminine/Masculine/Neuter)

    View Slide







  86. Vous êtes abonné à...











    Vous êtes abonnée à...











    Abonnement à...activé



    View Slide

  87. // Using Android framework API


    val grammaticalInflectionManager = context.getSystemService()


    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {


    grammaticalInflectionManager?.setRequestedApplicationGrammaticalGender(


    Configuration.GRAMMATICAL_GENDER_FEMININE


    // or Configuration.GRAMMATICAL_GENDER_MASCULINE


    // or Configuration.GRAMMATICAL_GENDER_NEUTRAL


    // or Configuration.GRAMMATICAL_GENDER_NOT_SPECIFIED


    )


    val grammaticalGender = grammaticalInflectionManager?.applicationGrammaticalGender


    }


    // Using androidx.core API


    GrammaticalInflectionManagerCompat.setRequestedApplicationGrammaticalGender(


    context,


    GrammaticalInflectionManagerCompat.GRAMMATICAL_GENDER_FEMININE,


    )


    val grammaticalGender = GrammaticalInflectionManagerCompat.getApplicationGrammaticalGender(context)

    View Slide

  88. ࠺ࢶഋ ӖԜ ௼ӝ ઑ੿
    ௾ ఫझ౟ח ੘਷ Ѫࠁ׮ ୌୌ൤ ഛ؀ػ׮.

    • ఫझ౟ ௼ӝח sp ױਤ۽ ૑੿೧ঠ ೠ׮.

    • ಁ٬ীח dpܳ ࢎਊೞҊ, ֫੉ীח
    wrap_content ࢎਊਸ ӂ੢ೠ׮.

    • sp৬ px р ߸ജ੉ ೙ਃೡٸח

    TypedValue੄ applyDimension()৬
    deriveDimension()ܳ ੉ਊೠ׮.

    • Configuration ژח DisplayMetrics۽
    ૒੽ ҅࢑ೞ૑ ݈ Ѫ
    Link: goo.gle/font-scaling-best-practices
    px = dp * (dpi / 160)

    View Slide

  89. // Using platform API (U+)


    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {


    val px = TypedValue.applyDimension(


    COMPLEX_UNIT_SP,


    16f /* sp */,


    resources.displayMetrics


    )


    val sp = TypedValue.deriveDimension(


    COMPLEX_UNIT_SP,


    16f /* px */,


    resources.displayMetrics


    )


    }


    // Using androidx core API


    val px = TypedValueCompat.spToPx(16f /* sp */, resources.displayMetrics)


    val sp = TypedValueCompat.pxToSp(16f /* px */, resources.displayMetrics)

    View Slide

  90. Premium goes mainstream
    Future Hardware

    View Slide

  91. HDR Displays and Cameras
    ؊ ௾ ؀࠺۽ ؊ և਷ ࢚࢝ झಖ౟ۢਸ ૑ਗೠ׮.

    View Slide

  92. Ultra HDR
    Android 14ী ࢜۽ ୶оػ high-bit depth ੉޷૑.

    Ultra HDR਷ JPEGҗ ৮੹൤ ೞਤ ഐജػ׮.

    ӝࠄ੸ਵ۽ Activityח SDR۽ UIܳ Ӓܻ૑݅,

    ইې ߑߨਵ۽ HDR UIܳ ࢎਊೞب۾ ࢸ੿ೡ ࣻ ੓׮:

    • AndroidManifest.xml ౵ੌ੄ Activityী

    android:colorMode="hdr" ࣘࢿਸ ݺदೠ׮.

    • ژח Activity੄ onCreate() द੼ী

    window.colorMode=ActivityInfo.COLOR_MODE_HDR


    ਸ ഐ୹ೠ׮.

    View Slide

  93. Link: https://goo.gle/spatial-audio-docs
    Spatial Audio
    ௑బஎ ࢎ਍٘ܳ ؊਌ ࢎप੸ਵ۽ ݅٘ח ށੑഋ য়٣য় ҃೷.

    View Slide

  94. Link: https://developer.android.com/reference/android/media/AudioMixerAttributes
    Lossless Audio
    Android 14ח য়٣য় গഐо ࣻળ੄ ҃೷ਸ ਤ೧

    USB ਬࢶ ೻٘ࣇਸ ాೠ ޖࣚप য়٣য় ഋधਸ ૑ਗೠ׮.

    ׮নೠ OEM ౵౟ց৬ ഈ۱ೞৈ ৢ೧ ݈ী ഝࢿചؼ ৘੿੉׮.

    Android 14ী ࢜۽ ୶оػ AudioMixerAttributes ௿ېझܳ ੉ਊೞৈ

    য়٣য় ޸ࢲ੄ ز੘ਸ ߸҃ೡ ࣻ ੓׮. (DEFAULT, BIT_PERFECT)

    View Slide

  95. Link: https://developer.android.com/guide/topics/media/media3
    Media3 1.0 (Stable)
    জ੉ ೂࠗೠ য়٣য় ߂ दп੸ ҃೷ਸ ಴दೡ ࣻ ੓ѱ ೞח ޷٣য ۄ੉࠳۞ܻ.

    ޷٣য ೒ۨ੉যੋ ExoPlayerܳ ઁҕೠ׮.

    View Slide

  96. Link: goo.gle/media3-migration
    ExoPlayer to Media3 Migration
    usage: ./media3-migration.sh [-p|-c|-d|-v]|[-m|-l [-x ] [-f]
    PROJECT_ROOT]


    PROJECT_ROOT: path to your project root (location of 'gradlew')


    -p: list package mappings and then exit


    -c: list class mappings (precedence over package mappings) and then exit


    -d: list dependency mappings and then exit


    -l: list files that will be considered for rewrite and then exit


    -x: exclude the path from the list of file to be changed: 'app/src/test'


    -m: migrate packages, classes and dependencies to AndroidX Media3


    -f: force the action even when validation fails


    -v: print the exoplayer2/media3 version strings of this script


    -h, --help: show this help text
    औѱ Migration ೡ ࣻ ੓ب۾ о੉٘৬ झ௼݀౟ܳ ઁҕೠ׮.

    1. ୭न ExoPlayer ߡ੹ਵ۽ জਸ সؘ੉౟ೠ׮.

    2. Migration झ௼݀౟ܳ ੉ਊೞৈ, Media3 package nameਵ۽ Ү୓ೠ׮.

    View Slide

  97. Link: https://developer.android.com/google/play/requirements/target-sdk
    Transformable displays
    ੽Ҋ, ಟ஖Ҋ, ৈ۞ ѐ੄ ചݶ੉ ੓ח ӝӝо ੼੼ טযաҊ ੓׮.

    View Slide

  98. Alternate input
    झఋੌ۞झ, ఠ஖ಁ٘, ݃਋झ, ఃࠁ٘

    • Android 14ীࢲ झఋੌ۞झ, ఃࠁ٘ ӝמ ѐࢶ

    View Slide

  99. Link: https://developer.android.com/guide/topics/large-screens/advanced-stylus#low-latency
    Low latency drawing
    dependencies {


    // low latency graphics library


    implementation "androidx.graphics:graphics-core:1.0.0-alpha04"


    // motion prediction library


    implementation"androidx.input:input-motionprediction:1.0.0-beta01"


    }
    Low-Latency Graphics Jetpack ۄ੉࠳۞ܻܳ ࢎਊೞݶ

    ੹ݶ ߡಌ ۪؊݂ ӝߨਸ ੉ਊೞৈ

    ࢎਊ੗ ੑ۱җ ചݶ ۪؊݂ р੄ ୊ܻ दрਸ ױ୷ೡ ࣻ ੓׮.

    ױ, झఋੌ۞झ୊ۢ ചݶ੄ ੘਷ ࠗ࠙ਸ সؘ੉౟ೞח ҃਋ী݅

    ࢎਊ೧ঠ ೞҊ, ੹୓ ചݶ ۪؊݂ীח ࢎਊೞݶ উػ׮.

    View Slide

  100. Link: https://android-developers.googleblog.com/2022/10/64-bit-only-devices.html
    64-bit only
    64-bit ݅ਸ ૑ਗೞח ӝӝ ୹द.

    (ex. Pixel 7)
    32-bit
    64-bit
    32-bit
    64-bit
    +
    only only

    View Slide

  101. Link: https://developer.android.com/ml
    On-device ML
    ML Kit ژח TensorFlow Liteী ҳ୷ػ Android custom stackਸ ੉ਊೞݶ:

    • Low-latency

    • Data privacy

    • Offline support

    • Cost Saving

    View Slide

  102. Link: https://developers.google.com/ml-kit
    Turn-key ML features with ML Kit
    ੌ߈੸ੋ User Flowܳ ૑ਗೞח

    Production-ready ݠन۞׬ API.
    Barcode
    Document Scanner
    Entity Extraction
    Face Mesh (Beta)
    Pose Detection
    Text Recognition
    NEW
    Digital Ink Recognition
    UPDATED
    Coming
    Soon…
    UPDATED
    Smart Reply
    UPDATED UPDATED
    Translation
    UPDATED UPDATED
    Image Labeling
    Object Detection
    Document Scanner
    Language ID
    Selfie Segmentation

    View Slide

  103. • Ҋಿ૕ झப ജ҃ ઁҕ

    • Google Play ࢲ࠺झ۽ APK ૐо࠙ ୭ࣗച

    • ݻ ઴੄ ௏٘ ݅ਵ۽ ࢎਊ оמ

    • ஠ݫۄ ӂೠ ࠛ೙ਃ
    Link: https://android-developers.googleblog.com/2023/05/build-smarter-android-apps-with-on-device-machine-learning.html
    Document Scanner

    View Slide

  104. Link: https://developer.android.com/ml#androids-custom-ml-stack-high-performance-ml
    Android’s custom ML stack
    • Google Play ࢲ࠺झܳ ా೧ TF Lite ࢎਊ.

    APK ௼ӝ ୭ࣗച + উ੿੸ੋ ୭न ߡ੹ ࢎਊоמ

    • TF Lite Delegatesܳ ࢎਊೞৈ ೞ٘ਝয оࣘ.

    ૑োदрਸ ୭ࣗചೞৈ ࢎਊ੗ ҃೷ ѐࢶоמ

    View Slide

  105. Link: https://www.tensorflow.org/lite/android/acceleration_service
    Acceleration Service (Beta)
    ۠ఋ੐ী ݽ؛ী ؀ೠ ୭੸੄ ೞ٘ਝয оࣘ ҳࢿਸ ଺ח API

    GPU, NPU, DSP э਷ ౠࣻ ೐۽ࣁࢲܳ ࢎਊೞৈ

    ୶ۿ ࢿמҗ ML জ੄ ࢎਊ੗ ҃೷ਸ

    ௼ѱ ೱ࢚दఆ ࣻ ੓׮.

    ઁডࢎ೦:

    • API 22+

    • ૑Ә਷ CPU / GPU оࣘ ҳࢿ݅ ૑ਗ

    • Google Play੄ TensorFlow Lite݅ ૑ਗ (ߣٜ ޷૑ਗ)

    View Slide

  106. Interoperability

    Privacy & Security

    Personalization

    Hardware

    +Stability

    View Slide

  107. хࢎ೤פ׮!
    Link: https://speakerdeck.com/fornewid

    View Slide