Slide 1

Slide 1 text

Supercharge your Android Apps Building with Gemini API Sohel Shaikh Lead Android Engineer Skylark Drones @thesohelshaikh

Slide 2

Slide 2 text

- 4+ YOE with Android - Lead Android Engineer @ Skylark Drones - I πŸ’œ Kotlin! - @thesohelshaikh on Socials Hey, I am Sohel

Slide 3

Slide 3 text

GDG Ahmedabad

Slide 4

Slide 4 text

GDG Ahmedabad

Slide 5

Slide 5 text

GDG Ahmedabad

Slide 6

Slide 6 text

GDG Ahmedabad Ways of integration ● Google AI Client SDK ● Firebase Vertex SDK ● Google AI Edge SDK for Gemini Nano

Slide 7

Slide 7 text

GDG Ahmedabad Google AI Client SDK ● Coroutines as First Class Citizen ● Written in Kotlin ● Easy to use ● Available on GitHub

Slide 8

Slide 8 text

GDG Ahmedabad

Slide 9

Slide 9 text

GDG Ahmedabad AI Client SDK Arch

Slide 10

Slide 10 text

GDG Ahmedabad val model = GenerativeModel( model = "gemini-1.5-flash-001" , apiKey = BuildConfig.apikey, generationConfig = generationConfig { temperature = 0.15f topK = 32 topP = 1f maxOutputTokens = 4096 }, safetySettings = listOf( SafetySetting(HarmCategory.HARASSMENT, BlockThreshold.MEDIUM_AND_ABOVE), SafetySetting(HarmCategory.HATE_SPEECH, BlockThreshold.MEDIUM_AND_ABOVE), ) )

Slide 11

Slide 11 text

GDG Ahmedabad val model = GenerativeModel( model = "gemini-1.5-flash-001" , apiKey = BuildConfig.apikey, generationConfig = generationConfig { temperature = 0.15f topK = 32 topP = 1f maxOutputTokens = 4096 }, safetySettings = listOf( SafetySetting(HarmCategory.HARASSMENT, BlockThreshold.MEDIUM_AND_ABOVE), SafetySetting(HarmCategory.HATE_SPEECH, BlockThreshold.MEDIUM_AND_ABOVE), ) )

Slide 12

Slide 12 text

GDG Ahmedabad val model = GenerativeModel( model = "gemini-1.5-flash-001" , apiKey = BuildConfig.apikey, generationConfig = generationConfig { temperature = 0.15f topK = 32 topP = 1f maxOutputTokens = 4096 }, safetySettings = listOf( SafetySetting(HarmCategory.HARASSMENT, BlockThreshold.MEDIUM_AND_ABOVE), SafetySetting(HarmCategory.HATE_SPEECH, BlockThreshold.MEDIUM_AND_ABOVE), ) )

Slide 13

Slide 13 text

GDG Ahmedabad val model = GenerativeModel( model = "gemini-1.5-flash-001" , apiKey = BuildConfig.apikey, generationConfig = generationConfig { temperature = 0.15f topK = 32 topP = 1f maxOutputTokens = 4096 }, safetySettings = listOf( SafetySetting(HarmCategory.HARASSMENT, BlockThreshold.MEDIUM_AND_ABOVE), SafetySetting(HarmCategory.HATE_SPEECH, BlockThreshold.MEDIUM_AND_ABOVE), ) )

Slide 14

Slide 14 text

GDG Ahmedabad scope.launch { val response = model.generateContent( content { image(bitmap) text("What is the object in this picture?") } ) }

Slide 15

Slide 15 text

Get started in 2 mins

Slide 16

Slide 16 text

Demo Create new project

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

GDG Ahmedabad Firebase Vertex AI

Slide 19

Slide 19 text

GDG Ahmedabad Gemini AI Core Arch

Slide 20

Slide 20 text

GDG Ahmedabad Low Rank Adaption (LoRA) ● Fine tuning technique ● Faster to train ● Smaller on device footprint ● Unique sets for specialized applications

Slide 21

Slide 21 text

GDG Ahmedabad

Slide 22

Slide 22 text

Prompt Engineering ● Be specific ● Few shot prompting ● Avoid negative prompting ● Image first, text second

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

GDG Ahmedabad Ways of integration** ● Google AI Client SDK - Public Preview ● Firebase Vertex SDK - Public Preview ● Google AI Edge SDK for Gemini Nano - Private Preview

Slide 26

Slide 26 text

GDG Ahmedabad

Slide 27

Slide 27 text

GDG Ahmedabad

Slide 28

Slide 28 text

Unlocking the economic potential of the skies We’re Hiring! Skylark Drones

Slide 29

Slide 29 text

What are your questions? Too shy? Ping me @thesohelshaikh

Slide 30

Slide 30 text

Thank You! Sohel Shaikh Lead Android Engineer Skylark Drones @thesohelshaikh