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. 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
  2. Granular Media Permission Link: https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions ׮ܲ জীࢲ ݅ٚ ޷٣য ౵ੌী

    ੽Ӕೞ۰ח ҃਋, READ_EXTERNAL_STORAGE ӂೠ ؀न ࣁ࠙ചػ ޷٣য ӂೠ ઺ ೞա ੉࢚ਸ ਃ୒೧ঠ ೠ׮.
  3. Photo Picker (Recommended) Link: https://d.android.com/training/data-storage/shared/photopicker • ӂೠ ਃ୒ হ੉ ࢎ૓ਸ

    ࢶఖೡ ࣻ ੓׮. • ࢎਊೞӝ औ׮. • ࢎ૓ ࢶఖӝܳ ࢎਊೡ ࣻ হਸ ٸח ACTION_OPEN_DOCUMENT۽ ز੘ೠ׮. • API 19ө૑ ૑ਗ оמ
  4. // 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"))) ߡ੹ਸ সؘ੉౟ೡ ٸ, যڌѱ Ѩషೞաਃ?
  5. 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৬ э਷ ׮ܲ ۄ੉࠳۞ܻ ߡ੹ب ߄Ո׮.
  6. 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? 🤔
  7. 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
  8. Dependency Guard Link: https://github.com/dropbox/dependency-guard 📄 releaseRuntimeClasspath.txt success or fail dependencyGuard

    develop branch current branch 📄 releaseRuntimeClasspath.txt dependencyGuardBaseline
  9. // 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
  10. $ ./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
  11. 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
  12. $ ./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
  13. ݒ֙ ׮নೠ ӝמٜ੉ ࢜܂ѱ ࣗѐؾפ׮. ೞ૑݅ উ੿੸ਵ۽ জਸ ѐߊೞח Ѫ੉

    ޖ঺ࠁ׮ ઺ਃೞѷભ. য়ט ೠ о૑ ߑߨਸ ҕਬ೮૑݅, ࢜۽਍ ӝמਸ উ੿੸ਵ۽ بੑೡ ࣻ ੓ѱ ৈ۞о૑ ߑߨਸ Ҋ޹೧ࠁח Ѫਸ ୶ୌ೤פ׮.
  14. 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
  15. 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о ੓աਃ?
  16. 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 ੌ ٸ ࢎਊ੗о ੘সਸ द੘ೞաਃ?
  17. 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 ࢎਊ੗о ੘স ࢚కܳ ঌ ࣻ ੓Ҋ ੌद ઺૑/઺૑ೡ ࣻ ੓աਃ?
  18. 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 ਬഋ ઺ ೞա৬ ੌ஖ೞաਃ?
  19. 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 ࢎਊ
  20. 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
  21. 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
  22. <manifest ...> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE HEALTH" /> <uses-permission

    android:name="android.permission.FOREGROUND_SERVICE_LOCATION" /> <application ...> <service android:name=".MyFitnessService" android:foregroundServiceType="health|location" android:exported="false" /> </application> </manifest>
  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 ੘স੉ Әߑ ՘աҊ ઺ਃೠоਃ?
  24. 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੉ ߊࢤೠ׮.
  25. 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о ߽೤غয ੹׳ؼ ࣻب ੓׮.
  26. 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 • …
  27. User-initiated data transfer Link: https://developer.android.com/about/versions/14/changes/user-initiated-data-transfers ࢎਊ੗о द੘ೠ ؘ੉ఠ ੹࣠ ੘সী

    ࢎਊೠ׮. • ৘द: ౵ੌ ׮਍۽٘/স۽٘ • RUN_USER_INITIATED_JOBS ӂೠਸ Manifestী ୶о೧ঠ ೠ׮. • ੘স੉ प೯غח زউ, ঌܿਸ ಴द೧ঠ ೠ׮. • ੘সਸ ઺૑ೞѢա ੌ੿ਸ ߸҃ೡ ࣻ ੓Ҋ, ઁড ઑѤਸ ࢸ੿ೡ ࣻب ੓׮.
  28. 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 ӂೠਸ ࢎਊೡ ࣻ ੓׮.
  29. The future of running in the Background • ԙ ೙ਃೠ

    ҃਋о ইפۄݶ WorkManagerܳ ࢎਊೡ Ѫ • ؘ੉ఠܳ زӝചೞח ݾ੸ਵ۽ח ౠ൤ • оמೞ׮ݶ Purpose Built APIܳ ࢎਊೡ Ѫ • ୭ࢶ੄ ҃਋ী݅ Foreground Serviceܳ ࢎਊೡ Ѫ • Exact Alarms਷ ߈٘द ೙ਃೠ ҃਋ী݅ ࢎਊೡ Ѫ
  30. Cross Device SDK Link: github.com/google/cross-device-sdk рױೞҊ ૒ҙ੸ੋ API۽ Multi-device ҃೷ਸ

    ҳ୷ೡ ࣻ ੓׮. Device discovery, Secure connections, Multi-device Sessions Personal Experiences: • ಪীࢲ ߊ಴ ѐਃܳ ੘ࢿೞҊ, క࠶݁ਵ۽ ੹׳ೞৈ ৮ࢿೠ׮. • ಪਵ۽ ੍؍ ӝࢎܳ, క࠶݁ীࢲ ੉যࢲ ੍ח׮. Communal experiences: • ஘ҳ ੗زରী ૑ب ਤ஖ܳ ҕਬೠ׮. • ೣԋ ੗੹Ѣܳ ఋח ࢎۈٜҗ ੗੹Ѣ ҃۽ܳ ҕਬೠ׮.
  31. // build.gradle dependencies { implementation "androidx.activity:activity:1.6.0" } <!-- AndroidManifest.xml -->

    <manifest> <application android:enableOnBackInvokedCallback="true"> ... </application> </manifest>
  32. 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
  33. // 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() } } }
  34. // 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") } ) }
  35. 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 } }
  36. // 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
  37. Designing for safety Link: https://d.android.com/design-for-safety ୭ࣗചী ઺੼ਸ ك ೐ۄ੉ߡदܳ Ҋ۰ೠ

    ٣੗ੋ • জ੄ ӂೠਸ ୭ࣗച೧ঠ ೠ׮. • ਤ஖੄ ੿ഛࢿҗ ࠼بܳ ୭ࣗച೧ঠ ೠ׮. • ׮ܲ জ੄ оदࢿਸ ୭ࣗചೞҊ, ӝӝ ध߹੗ ࢎਊਸ ୭ࣗച೧ঠ ೠ׮. • জ੉ ࢎਊ੗੄ ؘ੉ఠী ੽Ӕೞח Ѫਸ ੉೧ೞب۾ ذҊ, ࢎਊ੗ীѱ ઁয ӂೠਸ ࠗৈ೧ঠ ೠ׮. • জ੉ ੽ӔೞҊ ࣻ૘ೞח ੿ࠁܳ ࢎਊ੗о ੜ ঌ ࣻ ੓ب۾ ೧ঠ ೠ׮.
  38. Link: https://developer.android.com/codelabs/android-privacy-codelab • ૑դ ݻ ର۹ ୹दী Ѧ஘ Android ѐੋ

    ੿ࠁ ࠁഐ ӂ੢ࢎ೦ • ѐੋ ੿ࠁ ࠁഐ ӂ੢ࢎ೦ਸ ӝઓ জী ా೤ೞৈ ѐੋ ੿ࠁܳ ؊਌ উ੹ೞѱ ࠁഐೞח ߑߨ Android Privacy Codelab
  39. 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
  40. Special App Access Permissions Link: https://developer.android.com/training/permissions/requesting-special ౠ߹ ӂೠ਷ ޹хೠ दझమ

    ܻࣗझ ؀ೠ ੽Ӕਸ ࠁഐೠ׮. ৘ܳ ٜݶ: • ׮ܲ জ ਤী ಴दೞѢա Ӓܻח ӂೠ • ݽٚ ੷੢ࣗ ؘ੉ఠী ੽Ӕೞח ӂೠ • दझమ ࢸ੿ਸ ࣻ੿ೞח ӂೠ Android 14 ࠗఠ ࢜۽਍ ౠ߹ ӂೠ੉ ୶оػ׮. • USE_FULL_SCREEN_INTENT (=੹୓ ചݶ ੋబ౟ ҙܻ) ాച ژח ঌۈ জ݅ ӝࠄਵ۽ ഝࢿചػ׮. • SCHEDULE_EXACT_ALARM (=ঌۈ ߂ ܻ݃ੋ؊) ӝࠄ੸ਵ۽ ؀ࠗ࠙੄ জী ഝࢿചغ૑ ঋח׮.
  41. // 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<AlarmManager>() if (alarmManager != null) { if (alarmManager.canScheduleExactAlarms()) { alarmManager.setExact(...) } else { startActivity(Intent(ACTION_REQUEST_SCHEDULE_EXACT_ALARM)) } }
  42. 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)
  43. 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)
  44. 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ܳ ࢎਊೞৈ ӝמਸ ২౟ੋ೧ঠ ೠ׮.
  45. 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
  46. 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
  47. • Google Play SDK Indexܳ ੉ਊೞৈ ੸೤ೠ SDKܳ ࢶఖೞחؘ ੿ࠁܳ

    ઁҕೠ׮. https://play.google.com/sdks • Data Access Auditing API۽ SDKо ࠺ҕѐ ؘ੉ఠী ੽Ӕೞח૑ Ѩ୹ೡ ࣻ ੓׮. d.android.com/guide/topics/data/audit-access ৻ࠗ SDK ࢎਊ
  48. Data Deletion Policy Link: https://support.google.com/googleplay/android-developer/answer/13327111 জীࢲ ࢎਊ੗о ҅੿ਸ ٜ݅ ࣻ

    ੓ਵݶ, ҅੿ਸ ࢏ઁೡ ࣻ ੓ח ҃۽ܳ ઁҕ೧ঠ ೠ׮. 1. জ ղ ҃۽ 2. ਢ ࢎ੉౟ ҃۽ ҅੿਷ ࢏ઁೞ૑ ঋҊ, ࢎਊ੗੄ ؘ੉ఠ݅ ࢏ઁೞח ӝמੋ ҅੿ ੿ܻ ২࣌ب ઁҕೞח Ѫਸ ӂ੢ೠ׮.
  49. ࢎਊ੗ ѐੋ ੿ࠁ ࠁഐܳ ъചೞח زदী ݽ߄ੌ ҟҊܳ ૑ਗೞח ࢜۽਍

    ೒ۖಬ ӝמ بੑ Privacy Sandbox Link: https://developer.android.com/design-for-safety/privacy-sandbox
  50. • Ѥъ ߂ ೖ౟פझ ؘ੉ఠܳ ҙܻೞח ઺ঔ ઁয ࣃఠ •

    ؘ੉ఠח ӝӝী ۽ஸ۽ ੷੢ػ׮. Health Connect Link: https://developer.android.com/health-connect
  51. 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 ۽Ӓੋਵ۽ ҅੿ ੹ജ੉ оמೞ׮.
  52. @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
  53. <locale android:name="nl" /> <locale android:name="or" /> <locale android:name="pa" /> <locale

    android:name="pl" /> <locale android:name="pt-BR" /> <locale android:name="pt-PT" /> <locale android:name="ro" /> <locale android:name="ru" /> <locale android:name="si" /> <locale android:name="sk" /> <locale android:name="sl" /> <locale android:name="sa" /> <locale android:name="sr" /> <locale android:name="sv" /> <locale android:name="sw" /> <locale android:name="ta" /> <locale android:name="te" /> <locale android:name="th" /> <locale android:name="t]" /> <locale android:name="tr" /> <locale android:name="uk" /> <locale android:name="ur" /> <locale android:name="uz" /> <locale android:name="vi" /> <locale android:name="zh-CN" /> <locale android:name="zh-HK" /> <locale android:name="zh-TW" /> <locale android:name="zu" /> </locale-config> <!-- app/src/main/AndroidManifest.xml --> <manifest> <application android:localeConfig="@xml/locales_config" /> </manifest> <!-- app/src/main/res/xml/locales_config.xml --> <locale-config> <locale android:name="af" /> <locale android:name="am" /> <locale android:name="ar" /> <locale android:name="as" /> <locale android:name="az" /> <locale android:name="be" /> <locale android:name="bg" /> <locale android:name="bn" /> <locale android:name="bs" /> <locale android:name="ca" /> <locale android:name="cs" /> <locale android:name="da" /> <locale android:name="de" /> <locale android:name="el" /> <locale android:name="en-AU" /> <locale android:name="en-CA" /> <locale android:name="en-GB" /> <locale android:name="en-IN" /> <locale android:name="en-US" /> <locale android:name="en-XA" /> <locale android:nome="es" /> <locale android:name="es-US" /> <locale android:name="et" /> <locale android:name="eu" /> <locale android:name="fa" /> <locale android:name="fi" /> <locale android:name="fr" /> <locale android:name="fr-CA" /> <locale android:name=“gl" /> <locale android:name="gu" /> <locale android:name="hi" /> <locale android:name="hr" /> <locale android:name="hu" /> <locale android:name="hy" /> <locale android:name="in" /> <locale android:name="is" /> <locale android:name="it" /> <locale android:name="iw" /> <locale android:name="¡a" /> <locale android:name="ka" /> <locale android:name="kk" /> <locale android:name="Km" /> <locale android:name="kn" /> <locale android:name="ko" /> <locale android:name="ky" /> <locale android:name="lo" /> <locale android:name="lt" /> <locale android:name="lv" /> <locale android:nome="mk" /> <locale android:name="mi" /> <locale android:name="mn" /> <locale android:name="mr" /> <locale android:name="ms" /> <locale android:name="my" /> <locale android:name="my-MM" /> <locale android:name="nb" /> <locale android:name="ne" />
  54. // Using Android platform API val localeManager = getSystemService<LocaleManager>() 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() জ ղ ࢸ੿ীࢲ ঱য ࢶఖ ઁҕೞӝ
  55. 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. ૒੽ ࢤࢿೠ <locale-config>ܳ ࢏ઁೠ׮. unqualifiedResLocale=en-US android { androidResources { generateLocaleConfig = true } }
  56. // i.e. "de,fr,hi,ja" or "de,fr,hi,ja,bn" val locales = Firebase.remoteConfig["a_b_test"].asString() val

    localeManager = getSystemService<LocaleManager>() if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { localeManager?.overrideLocaleConfig = LocaleConfig( LocaleList.forLanguageTags(locales) ) }
  57. Link: https://developer.android.com/about/versions/14/features#regional-preferences ૑৉ ജ҃ࢸ੿ ࢎਊ੗о दझమ ࢸ੿ীࢲ ߸҃ೡ ࣻ ੓׮.

    (ҕా) androidx.core:core:1.12.0-alpha01 ࠗఠ ࢎਊ оמ • LocalePreferences.getTemperatureUnit() • LocalePreferences.getFirstDayOfWeek()
  58. Link: https://developer.android.com/about/versions/14/features/grammatical-inflection ࢿ߹ਸ Ҋ۰ೠ UI • 30র ݺ ੉࢚੄ ࢎਊ੗о

    ࢿ߹੉ ૑੿ػ ঱য(=gendered languages)ܳ ࢎਊೠ׮. • Android 14ࠗఠ ޙߨ੸ ࢿ߹ী ҙೠ ૑ਗਸ ୶оೡ ࣻ ੓ח Grammatical Inflection APIܳ بੑೠ׮. • ৈࢿഋ/թࢿഋ/઺ࢿ੸ ޙҳܳ ઁҕೡ ࣻ ੓׮. (Feminine/Masculine/Neuter)
  59. <!-- values-fr-feminine/strings.xml --> <resources> <string name="example_string">Vous êtes abonné à...</string> </resources>

    <!-- values-fr-masculine/strings.xml --> <resources> <string name="example_string">Vous êtes abonnée à...</string> </resources> <!-- values-fr-neuter/strings.xml --> <resources> <string name="example_string">Abonnement à...activé</string> </resources>
  60. // Using Android framework API val grammaticalInflectionManager = context.getSystemService<GrammaticalInflectionManager>() 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)
  61. ࠺ࢶഋ ӖԜ ௼ӝ ઑ੿ ௾ ఫझ౟ח ੘਷ Ѫࠁ׮ ୌୌ൤ ഛ؀ػ׮.

    • ఫझ౟ ௼ӝח sp ױਤ۽ ૑੿೧ঠ ೠ׮. • ಁ٬ীח dpܳ ࢎਊೞҊ, ֫੉ীח wrap_content ࢎਊਸ ӂ੢ೠ׮. • sp৬ px р ߸ജ੉ ೙ਃೡٸח TypedValue੄ applyDimension()৬ deriveDimension()ܳ ੉ਊೠ׮. • Configuration ژח DisplayMetrics۽ ૒੽ ҅࢑ೞ૑ ݈ Ѫ Link: goo.gle/font-scaling-best-practices px = dp * (dpi / 160)
  62. // 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)
  63. 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 ਸ ഐ୹ೠ׮.
  64. Link: https://developer.android.com/reference/android/media/AudioMixerAttributes Lossless Audio Android 14ח য়٣য় গഐо ࣻળ੄ ҃೷ਸ

    ਤ೧ USB ਬࢶ ೻٘ࣇਸ ాೠ ޖࣚप য়٣য় ഋधਸ ૑ਗೠ׮. ׮নೠ OEM ౵౟ց৬ ഈ۱ೞৈ ৢ೧ ݈ী ഝࢿചؼ ৘੿੉׮. Android 14ী ࢜۽ ୶оػ AudioMixerAttributes ௿ېझܳ ੉ਊೞৈ য়٣য় ޸ࢲ੄ ز੘ਸ ߸҃ೡ ࣻ ੓׮. (DEFAULT, BIT_PERFECT)
  65. Link: https://developer.android.com/guide/topics/media/media3 Media3 1.0 (Stable) জ੉ ೂࠗೠ য়٣য় ߂ दп੸

    ҃೷ਸ ಴दೡ ࣻ ੓ѱ ೞח ޷٣য ۄ੉࠳۞ܻ. ޷٣য ೒ۨ੉যੋ ExoPlayerܳ ઁҕೠ׮.
  66. Link: goo.gle/media3-migration ExoPlayer to Media3 Migration usage: ./media3-migration.sh [-p|-c|-d|-v]|[-m|-l [-x

    <path>] [-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ਵ۽ Ү୓ೠ׮.
  67. 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 ۄ੉࠳۞ܻܳ ࢎਊೞݶ ੹ݶ ߡಌ ۪؊݂ ӝߨਸ ੉ਊೞৈ ࢎਊ੗ ੑ۱җ ചݶ ۪؊݂ р੄ ୊ܻ दрਸ ױ୷ೡ ࣻ ੓׮. ױ, झఋੌ۞झ୊ۢ ചݶ੄ ੘਷ ࠗ࠙ਸ সؘ੉౟ೞח ҃਋ী݅ ࢎਊ೧ঠ ೞҊ, ੹୓ ചݶ ۪؊݂ীח ࢎਊೞݶ উػ׮.
  68. Link: https://developer.android.com/ml On-device ML ML Kit ژח TensorFlow Liteী ҳ୷ػ

    Android custom stackਸ ੉ਊೞݶ: • Low-latency • Data privacy • Offline support • Cost Saving
  69. 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
  70. • Ҋಿ૕ झப ജ҃ ઁҕ • Google Play ࢲ࠺झ۽ APK

    ૐо࠙ ୭ࣗച • ݻ ઴੄ ௏٘ ݅ਵ۽ ࢎਊ оמ • ஠ݫۄ ӂೠ ࠛ೙ਃ Link: https://android-developers.googleblog.com/2023/05/build-smarter-android-apps-with-on-device-machine-learning.html Document Scanner
  71. 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ܳ ࢎਊೞৈ ೞ٘ਝয оࣘ. ૑োदрਸ ୭ࣗചೞৈ ࢎਊ੗ ҃೷ ѐࢶоמ
  72. 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݅ ૑ਗ (ߣٜ ޷૑ਗ)