Building the Next Generation of Android Apps with AI.pdf
VeronicaAnggraini1
223 views
36 slides
Aug 12, 2024
Slide 1 of 36
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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.
Size: 5.12 MB
Language: en
Added: Aug 12, 2024
Slides: 36 pages
Slide Content
Android
Building the Next
Generation of
Android Apps
with AI
“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