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

[창구] 최신 Android 개발 소식과 Gemini

강경완
September 03, 2024

[창구] 최신 Android 개발 소식과 Gemini

2024년 창구 9월 성장지원 세미나
Android 에서 Gemini 를 활용하는 법과 최신 Android 소식에 대해 소개합니다.

강경완

September 03, 2024
Tweet

More Decks by 강경완

Other Decks in Programming

Transcript

  1. • Content consumption ◦ Text summarization ◦ Document Q&A •

    Input assistance ◦ Smart replay ◦ Magic Compose Gen AI with Android use cases
  2. • Local Processing • Offline availability • Potentially reduced latency

    • No inference cost • Lower parameter size (compared to cloud models) • Smaller context window • Less generalized model Advantages Limitations • Not good at all use-cases Implications
  3. Prompt engineering is not usually sufficient for on-device models •

    Prompt engineering -> Prototyping • LoRA -> Production Low Rank Adaptation (LoRA)
  4. Studio bot is now Gemini in Android Studio • Coding

    assistance • Generate Android Code • Explain errors and improve code • Code suggestions (Koala) • Multimodal Image Uploads (Upcoming soon) ◦ Given this wireframe, implement a compose UI using material 3 Gemini in Android Studio
  5. Be specific (o) How do I add camera support to

    my app using CameraX? (x) How do I add camera support to my app? Describe the structure of the desired answer (o) Insert comments into this code. Use double slashes for the comments, and put each comment above the line of code it describes. (x) Write code comments for this code. Gemini in Android Studio
  6. • compose material3 adaptive 1.0.0 beta ◦ ListDetailPaneScaffold ◦ SupportingPaneScaffold

    Build adaptive layout https://developer.android.com/develop/ui/compose/layouts/adaptive/list-detail
  7. Compose compiler bundled with Kotlin release [plugins] compose-compiler = {

    id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } [build.gradle.kts] plugins { alias(libs.plugins.compose.compiler) apply false } android { composeOptions { kotlinCompilerExtensionVersion = ... } }
  8. • Faster time to first draw 17% up • Strong

    Skipping Mode • Lambda memoization • Indication API • Slot table rewrite Compose performance https://developer.android.com/develop/ui/compose/performance/stability/strongskipping https://developer.android.com/develop/ui/compose/touch-input/user-interactions/migrate-indication-ripple
  9. • SharedTransitionLayout • Modifier.sharedElements() • Modifier.sharedBounds() Shared elements compose 1.7.0-beta01

    부터 사용가능하며 실험적인 기능임. https://developer.android.com/develop/ui/compose/animation/shared-elements
  10. open fun Modifier.animateItem( fadeInSpec: FiniteAnimationSpec<Float>?, placementSpec: FiniteAnimationSpec<IntOffset>?, fadeOutSpec: FiniteAnimationSpec<Float>? ):

    Modifier Column { Button(onClick = { list = list + "${list.count() + 1}" }) { Text("Add new item") } Button(onClick = { list = list.shuffled() }) { Text("Shuffle") } LazyColumn { items(list, key = { it }) { Text("Item $it", Modifier.animateItem()) } }
  11. • 새로운 Service 유형 : Media Processing • mediaProcessing, dataSync

    타입의 24시간 내 최대 6시간 실행 제약 추가 • BOOT_COMPLETED 시 서비스 시작 제한 dataSync, camera, mediaPlayback, phoneCall, mediaProjection, microphone Foreground Service changes
  12. Edge to edge by default in Android 15 • Status

    bar ◦ Transparent by default ◦ setStatusBarColor is disabled • Gesture handle navigation bar ◦ Transparent by default • 3-button navigation ◦ Opacity set to 80% by default Edge to Edge
  13. • Supporting Talkback Image Captioning ◦ Image description using on-device

    ML • A11y announcement API is now discouraged Android A11y