Building the Next Generation of Android Apps with AI.pdf

VeronicaAnggraini1 223 views 36 slides Aug 12, 2024
Slide 1
Slide 1 of 36
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36

About This Presentation

Discover how to harness the power of AI to create innovative and engaging Android apps. Learn about the latest tools and techniques to build intelligent, user-centric experiences.


Slide Content

Android
Building the Next
Generation of
Android Apps
with AI

<Veronica Anggraini>
<Google Developer Expert Android>
<Software Engineer Android>
<eWIDEPLUS>

veroanggra
veroanggra

Does it involve AI?
YES
NO

Does it involve AI?
YES
NO

Does it involve AI?
YES
NO

Does it involve AI?
YES
NO

“65% of consumers have
trust in the businesses
which use AI
technology”
- Forbes Advisor

Traditional Programming
to ML
Section 1

Section 1

Section 1
On Cloud On Device
On Device On Cloud
Reliability Good Bad
Privacy Good Bad
Accuracy Bad Good

SOCIAL MEDIA

Focus Pre-built models for
common tasks
Custom models and
on-device inference
Building complex pipelines
with pre-built models
Privacy-focused,
on-device inference
Ease of Use Easiest to use, minimal
coding required
Requires ML expertise to
create and use models
More complex than ML Kit,
but easier than TFLite
Easiest to use for Pixel 8
Pro, limited elsewhere
Customization Limited Highly customizable Moderately customizable Limited
Model Source Pre-built Google models Custom models trained
by you or others
Pre-built Google models or
custom TFLite models
Pre-built Google models
Offline
Functionality
Works on-device, no
internet required
Works on-device, no
internet required
Works on-device, no internet
required
Works on-device, no
internet required
Best For Simple mobile apps
needing basic ML features
Complex mobile apps
with custom requirements
Complex real-time pipelines
with pre-built models
Privacy-focused
on-device ML
ML Kit TF Lite MediaPipe
Gemini
Nano
On Device
*Pixel 8 and Samsung S24Pro only still on
private EOP

Gen AI Inside App
Section 2

On Android, you can deliver rich
generative AI experiences without
needing a network connection or
sending data to the cloud. On-device AI
is a great solution for use-cases where
low latency, low cost, and privacy
safeguards are your primary concerns.
The Google AI Client SDK lets you to
integrate the Gemini API to use Gemini
Pro models in your Android app.
Google AI Edge SDK Google AI Client SDK
The API of Vertex AI for Firebase is
similar to the Google AI client SDK. If
you've already integrated the Google AI
client SDK into your app, you can
Migrate to Vertex AI for Firebase.
Vertex AI for Firebase
Section 2
01 02 03

Google AI Client SDK Vertex AI for Firebase

Add the gradle dependency
Section 2
Vertex AI for
Firebase
Google AI Client
SDK

Initialize
Section 2
Integrate Google
AI Client SDK to
your Kotlin code
Initialize the
Vertex AI service
and the generative
model

API Function
Section 2
Text generation
Image
prompting

API Function
Section 2


Multi-turn
chat

Response
streaming

My problem
Section 3

“Pake kartu kamu dulu dong!!”

“Jangan sampe pertemanan putus
karna PT-PT kurang mulus”

Once upon a time at Lunch after Launch ….
Section 3


Eat with happy face

Lucknut Friends!!

Splitting bills with friends, family, or colleagues can be
a hassle, involving manual calculations, keeping track
of receipts, and the potential for confusion about who
owes what.
Problem
Develop a simplifies system the
bill-splitting process, allowing users
to easily track expenses, split costs
fairly, and settle payments
efficiently.
Section 4
Solution

*Only my perspective, you can try your own
System Plan
Section 4

ML Kit
Use on App
JSON FormatOffline/Online
Decode
String Output
Generate
processedText
processedTextScan Bill
Prompting
Gemini

The ML Kit Text Recognition v2 API can recognize text
in any Chinese, Devanagari, Japanese, Korean and
Latin character set. The API can also be used to
automate data-entry tasks such as processing credit
cards, receipts, and business cards.
ML Kit
Section 4

Model in
Google Play
Services
Bundling the
model

Powerful toolkit for creative endeavors through its understanding of various formats and its
ability to adapt to specific contexts. Gemini can create different creative text formats like
poems, code, scripts, musical pieces, email, letters, etc. It can adapt the style and tone based
on your input.
Gemini

Section 4

Ready
Use to build your simple app

Logic

Section 5

DEMO
TIME

Thank You
Veronica Putri Anggraini pronouns
Android GDE