SlideShare una empresa de Scribd logo
1 de 31
Descargar para leer sin conexión
Google
Integration in
Android Apps
Ronan Schwarz and Friedger Müffke
Moosecon - 8 March 2013
Android and Google
● Android Open
Source Project (AOSP)
all, cheap, free
● Open Handset Alliance
84 companies, Google governance
● Android Update Alliance
promise to update
● Google User Experience
CTS and relevance
Google for developers so far
● Some Content Provider API,
e.g. calendar contract
● Intents to launch apps
e.g. Navigation
● Java libs and Web APIs
e.g gdata client lib to connect to Google
Docs
Google Play Framework (gms)
● Requires Android 2.2 and Google Play
● APK that provides APIs to Google services
● Service APK will and must be installed
automatically
Google Play Framework (gms)
Requires real device
Helper methods
● Always check for availability first!
● Use isGooglePlayServicesAvailable() in
onResume
● Give the user a chance to install the missing
file with getErrorDialog()
● getOpenSourceSoftwareLicenseInfo()
Authentication
http://www.flickr.com/photos/carlosluzz/
Authentication
● OAuth2 through GoogleAuthToken class
● get the Google Account(s) by
○ AccountManager
○ AccountPicker.newIntent()
● Email needed for retrieving auth token
● getToken() for UI components
● getTokenWithNotification() for Services
Authentication Error Handling
● User Recoverable Error
○ UserRecoverableAuthException
○ GooglePlayServicesAvailabilityException
○ UserRecoverableNotifiedException
● Non-Recoverable Error
○ GoogleAuthException
Google Plus
Google Plus
● Updated on 26 February 2013
● Policy
○ not to misuse personal data and +1 links
○ only use Google provided branding
○ provide means to revoke authorization
Google Plus: Setup
Services
OAuth2 client
Google Plus: Setup
Identify
each client
PlusClient: initialize
PlusClient.Builder()...build()
PlusClient.connected() and .disconnected()
within component lifecycle
All calls are asyncronous .onConnected() and .
onDisconnected()
PlusClient: Sign-In
● Visual user consent <com.google.android.gms.
common.SignInButton
android:id="@+id/sign_in_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
● startResolutionForResult() on click
● optional sign-out button
● required revoke method with deletion of data
PlusClient: Social Graph
● Profile of the user
mPlusClient.loadPerson(this, "me"); // or "108591961893121462921"
● People in the circles of the user
mPlusClient.loadPeople(this, Person.Collection.VISIBLE);
● Email address (PlusClient.getAccountName())
requires additional permission
GET_ACCOUNTS
PlusClient: App Activities
AddActivity
BuyActivity
CheckInActivity
CommentActivity
CreateActivity
DiscoverActivity
ListenActivity
ReserveActivity
ReviewActivity
WantActivity
● Moments: "possibility to
share what user has done
in the app"
● Prepare snippet
(or let prepare)
● writeMoment(moment)
● removeMoement(moment)
PlusShare: Share Content
● Simple share intent
PlusShare.Builder.getIntent()
● Deep linking
setContentDeepLinkId()
setContentUrl()
● Interactive posts
addCallToAction()
● Can be ActionBar or (standard) Button
● Breaks ShareActionProvider
PlusShare: Deep Linking
● Intent filter in Manifest
<activity android:name=".ParseDeepLinkActivity">
<intent-filter>
<action android:name="com.google.android.apps.plus.VIEW_DEEP_LINK" />
<data android:scheme="vnd.google.deeplink" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
</activity>
● Extract deep link id
PlusShare.getDeepLinkId(this.getIntent());
PlusOneButton: Recommendations
● Add a +1 Button to anything
<com.google.android.gms.plus.PlusOneButton
xmlns:plus=
"http://schemas.android.com/apk/lib/com.google.android.gms.plus"
plus:size="standard"/>
● One URL per button
mPlusOneButton.initialize(mPlusClient, URL);
● No Meta-Data
Over-the-air install (7 March)
● Setup web client
● Sign-in Button + app package name
● Quality control by
Google (?)
Google Maps: V2
Google Maps: V2
● Fragments!
● Fragments for older Devices!
● Views!
● Activities ?
● Breaks compatibility.
Google Maps: Camera
● 2-Axis Rotation
● Perspective View
● Zoom
● Move
● Target
Google Maps: Markers
● Default Markers
● Customize
Appearance
● Show InfoWindow
● InfoWindow != View
● Add/Remove
Markers manually
Google Maps: Custom Drawing
● Lines
● Circles
● Polygons
● Points are Lat,Long points
Polygon polygon = map.addPolygon(
new PolygonOptions()
.add(new LatLng(0, 0), new LatLng(0, 5), new LatLng(3,
5))
.strokeColor(Color.RED)
.fillColor(Color.BLUE));
Goodies
http://www.flickr.com/photos/g-alain/
ImageManager
● Load Images from an external resource in
the background
● Can specify a default resource for errors etc
● As easy as loadImage(ImageView,Uri,defaultResId)
● Only G+ URL's
● For everything else use the novoda
ImageLoader on github.com/novoda
PanoramaClient
● Load from URL
● Load from ContentProvider
● Zoom and Rotate
Hints
● Debug
adb shell setprop log.tag.GooglePlusPlatform VERBOSE
● Lot's of example codes and documentation at
https://developer.android.com/google/play-services/index.html
● G+ Bootcamp for companies
http://googleplusplatform.blogspot.de/2013/03/global-google-sign-in-bootcamps.
html
Berlin, Germany - March 18th - March 22nd
More to come...
Questions
Ronan Schwarz
Friedger Müffke
novoda.com
@novoda
#moosecon

Más contenido relacionado

La actualidad más candente

Google Cloud Messaging
Google Cloud MessagingGoogle Cloud Messaging
Google Cloud Messaging
Ashiq Uz Zoha
 
Google analytics reporting using api
Google analytics reporting using apiGoogle analytics reporting using api
Google analytics reporting using api
Sankar Ponnusamy
 
Google Web Toolkitのすすめ
Google Web ToolkitのすすめGoogle Web Toolkitのすすめ
Google Web Toolkitのすすめ
Kaisei Hamamoto
 
Kotlin で android アプリを作ってみた
Kotlin で android アプリを作ってみたKotlin で android アプリを作ってみた
Kotlin で android アプリを作ってみた
bina1204 Hozuki
 

La actualidad más candente (17)

Google Cloud Messaging
Google Cloud MessagingGoogle Cloud Messaging
Google Cloud Messaging
 
Introducing the (new) Google Docs API (2019)
Introducing the (new) Google Docs API (2019)Introducing the (new) Google Docs API (2019)
Introducing the (new) Google Docs API (2019)
 
The Best Way to Become an Android Developer Expert with Android Jetpack
The Best Way to Become an Android Developer Expert  with Android JetpackThe Best Way to Become an Android Developer Expert  with Android Jetpack
The Best Way to Become an Android Developer Expert with Android Jetpack
 
Jump into React Native (Class 3)
Jump into React Native  (Class 3)Jump into React Native  (Class 3)
Jump into React Native (Class 3)
 
Atomic Designは「マルチ」で真価を発揮する
Atomic Designは「マルチ」で真価を発揮するAtomic Designは「マルチ」で真価を発揮する
Atomic Designは「マルチ」で真価を発揮する
 
Android overview
Android overviewAndroid overview
Android overview
 
Google analytics reporting using api
Google analytics reporting using apiGoogle analytics reporting using api
Google analytics reporting using api
 
F1
F1F1
F1
 
Google Web Toolkitのすすめ
Google Web ToolkitのすすめGoogle Web Toolkitのすすめ
Google Web Toolkitのすすめ
 
The Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror APIThe Glass Class - Tutorial 2 - Mirror API
The Glass Class - Tutorial 2 - Mirror API
 
Google Glass Meetup 3/3 - 8 Janvier 2014
Google Glass Meetup 3/3 - 8 Janvier 2014Google Glass Meetup 3/3 - 8 Janvier 2014
Google Glass Meetup 3/3 - 8 Janvier 2014
 
Hello, Android Studio 3.2 & Android App Bundle @ I/O Extended Bangkok 2018
Hello, Android Studio 3.2 & Android App Bundle @ I/O Extended Bangkok 2018Hello, Android Studio 3.2 & Android App Bundle @ I/O Extended Bangkok 2018
Hello, Android Studio 3.2 & Android App Bundle @ I/O Extended Bangkok 2018
 
Gradle how to's
Gradle how to'sGradle how to's
Gradle how to's
 
Android Data Binding
Android Data BindingAndroid Data Binding
Android Data Binding
 
Git workshop
Git workshopGit workshop
Git workshop
 
Let's your users share your App with Friends: App Invites for Android
 Let's your users share your App with Friends: App Invites for Android Let's your users share your App with Friends: App Invites for Android
Let's your users share your App with Friends: App Invites for Android
 
Kotlin で android アプリを作ってみた
Kotlin で android アプリを作ってみたKotlin で android アプリを作ってみた
Kotlin で android アプリを作ってみた
 

Destacado

Serverless Apps - droidcon london 2012
Serverless Apps - droidcon london 2012Serverless Apps - droidcon london 2012
Serverless Apps - droidcon london 2012
Friedger Müffke
 

Destacado (8)

Open intents Aggregating Apps
Open intents Aggregating AppsOpen intents Aggregating Apps
Open intents Aggregating Apps
 
Level Up Your Android Build -Droidcon Berlin 2015
Level Up Your Android Build -Droidcon Berlin 2015Level Up Your Android Build -Droidcon Berlin 2015
Level Up Your Android Build -Droidcon Berlin 2015
 
Android Evolution, AppForum 2014, Brussels, Friedger Müffke
Android Evolution, AppForum 2014, Brussels, Friedger MüffkeAndroid Evolution, AppForum 2014, Brussels, Friedger Müffke
Android Evolution, AppForum 2014, Brussels, Friedger Müffke
 
Open Governance in Mobile - SFD 2013 - HSBXL
Open Governance in Mobile -  SFD 2013 - HSBXLOpen Governance in Mobile -  SFD 2013 - HSBXL
Open Governance in Mobile - SFD 2013 - HSBXL
 
Delegating user tasks in applications
Delegating user tasks in applicationsDelegating user tasks in applications
Delegating user tasks in applications
 
UXperts 2012: Connectivity Beyond the Web (Android), Friedger Müffke
UXperts 2012: Connectivity Beyond the Web (Android), Friedger MüffkeUXperts 2012: Connectivity Beyond the Web (Android), Friedger Müffke
UXperts 2012: Connectivity Beyond the Web (Android), Friedger Müffke
 
Web Wishes, Intents, Extensions, .. Friedger Müffke, droidcon London 2014
Web Wishes, Intents, Extensions, ..  Friedger Müffke, droidcon London 2014Web Wishes, Intents, Extensions, ..  Friedger Müffke, droidcon London 2014
Web Wishes, Intents, Extensions, .. Friedger Müffke, droidcon London 2014
 
Serverless Apps - droidcon london 2012
Serverless Apps - droidcon london 2012Serverless Apps - droidcon london 2012
Serverless Apps - droidcon london 2012
 

Similar a Google Integration in Android Apps - Mooscon 2013 Cebit

Mooscon 2013 cebit - google integration in android apps (1)
Mooscon 2013   cebit - google integration in android apps (1)Mooscon 2013   cebit - google integration in android apps (1)
Mooscon 2013 cebit - google integration in android apps (1)
Heinrich Seeger
 
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleGoogle Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification Google
Mathias Seguy
 

Similar a Google Integration in Android Apps - Mooscon 2013 Cebit (20)

Mooscon 2013 cebit - google integration in android apps (1)
Mooscon 2013   cebit - google integration in android apps (1)Mooscon 2013   cebit - google integration in android apps (1)
Mooscon 2013 cebit - google integration in android apps (1)
 
Exploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScriptExploring Google (Cloud) APIs with Python & JavaScript
Exploring Google (Cloud) APIs with Python & JavaScript
 
google drive and the google drive sdk
google drive and the google drive sdkgoogle drive and the google drive sdk
google drive and the google drive sdk
 
Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)Mobile backends with Google Cloud Platform (MBLTDev'14)
Mobile backends with Google Cloud Platform (MBLTDev'14)
 
Google Home and Google Assistant Workshop: Build your own serverless Action o...
Google Home and Google Assistant Workshop: Build your own serverless Action o...Google Home and Google Assistant Workshop: Build your own serverless Action o...
Google Home and Google Assistant Workshop: Build your own serverless Action o...
 
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleGoogle Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification Google
 
Accessing Google Cloud APIs
Accessing Google Cloud APIsAccessing Google Cloud APIs
Accessing Google Cloud APIs
 
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & morePower your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
Power your apps with Gmail, Google Drive, Calendar, Sheets, Slides & more
 
Introduction to Google Apps Platform
Introduction to Google Apps PlatformIntroduction to Google Apps Platform
Introduction to Google Apps Platform
 
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...Build an AI/ML-driven image archive processing workflow: Image archive, analy...
Build an AI/ML-driven image archive processing workflow: Image archive, analy...
 
Advanced Dagger talk from 360andev
Advanced Dagger talk from 360andevAdvanced Dagger talk from 360andev
Advanced Dagger talk from 360andev
 
What's new in android jakarta gdg (2015-08-26)
What's new in android   jakarta gdg (2015-08-26)What's new in android   jakarta gdg (2015-08-26)
What's new in android jakarta gdg (2015-08-26)
 
Image archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google CloudImage archive, analysis & report generation with Google Cloud
Image archive, analysis & report generation with Google Cloud
 
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIsExploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
 
Google cloud platform Introduction - 2014
Google cloud platform Introduction - 2014Google cloud platform Introduction - 2014
Google cloud platform Introduction - 2014
 
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
#MBLTdev: Разработка backend для мобильного приложения с использованием Googl...
 
Exploring Google (Cloud) APIs & Cloud Computing overview
Exploring Google (Cloud) APIs & Cloud Computing overviewExploring Google (Cloud) APIs & Cloud Computing overview
Exploring Google (Cloud) APIs & Cloud Computing overview
 
Introduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google CloudIntroduction to Cloud Computing with Google Cloud
Introduction to Cloud Computing with Google Cloud
 
Google Cloud Platform
Google Cloud Platform Google Cloud Platform
Google Cloud Platform
 
Getting started using Google APIs (2019)
Getting started using Google APIs (2019)Getting started using Google APIs (2019)
Getting started using Google APIs (2019)
 

Más de Friedger Müffke

Open intents, open apps and dependencies
Open intents, open apps and dependenciesOpen intents, open apps and dependencies
Open intents, open apps and dependencies
Friedger Müffke
 

Más de Friedger Müffke (9)

Open intents Open Governance
Open intents Open GovernanceOpen intents Open Governance
Open intents Open Governance
 
Highlights Google I/O 2011
Highlights Google I/O 2011Highlights Google I/O 2011
Highlights Google I/O 2011
 
Open Android Apps - Hidden Treasures on Android phones
Open Android Apps - Hidden Treasures on Android phonesOpen Android Apps - Hidden Treasures on Android phones
Open Android Apps - Hidden Treasures on Android phones
 
Google Workshop at International Congress of Youth Enterpreneurship by Friedg...
Google Workshop at International Congress of Youth Enterpreneurship by Friedg...Google Workshop at International Congress of Youth Enterpreneurship by Friedg...
Google Workshop at International Congress of Youth Enterpreneurship by Friedg...
 
Open intents, open apps and dependencies
Open intents, open apps and dependenciesOpen intents, open apps and dependencies
Open intents, open apps and dependencies
 
Glass
GlassGlass
Glass
 
App inventor for android and similar tools
App inventor for android and similar toolsApp inventor for android and similar tools
App inventor for android and similar tools
 
Open Intents And Dependencies
Open Intents And DependenciesOpen Intents And Dependencies
Open Intents And Dependencies
 
Open Intents - Android Intents Mechanism and Dependency Management
Open Intents - Android Intents Mechanism and Dependency ManagementOpen Intents - Android Intents Mechanism and Dependency Management
Open Intents - Android Intents Mechanism and Dependency Management
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Google Integration in Android Apps - Mooscon 2013 Cebit