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

● Moments: "possibility to   AddActivity
  share what user has done   BuyActivity
  in the app"                CheckInActivity
                             CommentActivity
                             CreateActivity
● Prepare snippet            DiscoverActivity
  (or let prepare)
                             ListenActivity
                             ReserveActivity
● writeMoment(moment)
                             ReviewActivity
                             WantActivity
● removeMoement(moment)
● listMoments()
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

Drupal content automation with migrate 2.6
Drupal content automation with migrate 2.6Drupal content automation with migrate 2.6
Drupal content automation with migrate 2.6Hector Iribarne
 
Android Components & Manifest
Android Components & ManifestAndroid Components & Manifest
Android Components & Manifestma-polimi
 
The Glass Class - Tutorial 3 - Android and GDK
The Glass Class - Tutorial 3 - Android and GDKThe Glass Class - Tutorial 3 - Android and GDK
The Glass Class - Tutorial 3 - Android and GDKGun Lee
 
Android应用开发简介
Android应用开发简介Android应用开发简介
Android应用开发简介easychen
 

La actualidad más candente (6)

Drupal content automation with migrate 2.6
Drupal content automation with migrate 2.6Drupal content automation with migrate 2.6
Drupal content automation with migrate 2.6
 
Ppt 2 android_basics
Ppt 2 android_basicsPpt 2 android_basics
Ppt 2 android_basics
 
Android Components & Manifest
Android Components & ManifestAndroid Components & Manifest
Android Components & Manifest
 
The Glass Class - Tutorial 3 - Android and GDK
The Glass Class - Tutorial 3 - Android and GDKThe Glass Class - Tutorial 3 - Android and GDK
The Glass Class - Tutorial 3 - Android and GDK
 
Android应用开发简介
Android应用开发简介Android应用开发简介
Android应用开发简介
 
DIY Uber
DIY UberDIY Uber
DIY Uber
 

Similar a Mooscon 2013 cebit - google integration in android apps (1)

Using Google (Cloud) APIs
Using Google (Cloud) APIsUsing Google (Cloud) APIs
Using Google (Cloud) APIswesley chun
 
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5Alkacon Software GmbH & Co. KG
 
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 Cloudwesley chun
 
Google Analytics for Developers
Google Analytics for DevelopersGoogle Analytics for Developers
Google Analytics for DevelopersRubén Martínez
 
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 & JavaScriptwesley chun
 
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 & morewesley chun
 
Google Analytics for Developers
Google Analytics for DevelopersGoogle Analytics for Developers
Google Analytics for DevelopersParadigma Digital
 
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 sdkfirenze-gtug
 
Android N Highligts
Android N HighligtsAndroid N Highligts
Android N HighligtsSercan Yusuf
 
Advanced Dagger talk from 360andev
Advanced Dagger talk from 360andevAdvanced Dagger talk from 360andev
Advanced Dagger talk from 360andevMike Nakhimovich
 
Google Cloud Messaging
Google Cloud MessagingGoogle Cloud Messaging
Google Cloud MessagingAshiq Uz Zoha
 
Intents: Talking to your neighbors
Intents: Talking to your neighborsIntents: Talking to your neighbors
Intents: Talking to your neighborscketti
 
Integrating Google Play Games
Integrating Google Play GamesIntegrating Google Play Games
Integrating Google Play GamesPlatty Soft
 
Delegating user tasks in applications
Delegating user tasks in applicationsDelegating user tasks in applications
Delegating user tasks in applicationsFriedger Müffke
 
Introduction to google glass
Introduction to google glassIntroduction to google glass
Introduction to google glassAnees Haider
 
DevFest Kuala Lumpur - Implementing Google Analytics - 2011-09-29.ppt
DevFest Kuala Lumpur - Implementing Google Analytics - 2011-09-29.pptDevFest Kuala Lumpur - Implementing Google Analytics - 2011-09-29.ppt
DevFest Kuala Lumpur - Implementing Google Analytics - 2011-09-29.pptVinoaj Vijeyakumaar
 
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleGoogle Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleMathias Seguy
 

Similar a Mooscon 2013 cebit - google integration in android apps (1) (20)

Using Google (Cloud) APIs
Using Google (Cloud) APIsUsing Google (Cloud) APIs
Using Google (Cloud) APIs
 
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5OpenCms Days 2014 - User Generated Content in OpenCms 9.5
OpenCms Days 2014 - User Generated Content in OpenCms 9.5
 
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
 
Google Analytics for Developers
Google Analytics for DevelopersGoogle Analytics for Developers
Google Analytics for Developers
 
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
 
Nicolas Embleton, Advanced Angular JS
Nicolas Embleton, Advanced Angular JSNicolas Embleton, Advanced Angular JS
Nicolas Embleton, Advanced Angular JS
 
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
 
Google Analytics for Developers
Google Analytics for DevelopersGoogle Analytics for Developers
Google Analytics for Developers
 
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
 
Android N Highligts
Android N HighligtsAndroid N Highligts
Android N Highligts
 
Advanced Dagger talk from 360andev
Advanced Dagger talk from 360andevAdvanced Dagger talk from 360andev
Advanced Dagger talk from 360andev
 
Google Cloud Messaging
Google Cloud MessagingGoogle Cloud Messaging
Google Cloud Messaging
 
Android Data Binding
Android Data BindingAndroid Data Binding
Android Data Binding
 
Intents: Talking to your neighbors
Intents: Talking to your neighborsIntents: Talking to your neighbors
Intents: Talking to your neighbors
 
Integrating Google Play Games
Integrating Google Play GamesIntegrating Google Play Games
Integrating Google Play Games
 
Delegating user tasks in applications
Delegating user tasks in applicationsDelegating user tasks in applications
Delegating user tasks in applications
 
Introduction to google glass
Introduction to google glassIntroduction to google glass
Introduction to google glass
 
Android Made Simple
Android Made SimpleAndroid Made Simple
Android Made Simple
 
DevFest Kuala Lumpur - Implementing Google Analytics - 2011-09-29.ppt
DevFest Kuala Lumpur - Implementing Google Analytics - 2011-09-29.pptDevFest Kuala Lumpur - Implementing Google Analytics - 2011-09-29.ppt
DevFest Kuala Lumpur - Implementing Google Analytics - 2011-09-29.ppt
 
Google Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleGoogle Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification Google
 

Más de Heinrich Seeger

Dennis hoppe droidcon_2014_slide_deck_screen
Dennis hoppe droidcon_2014_slide_deck_screenDennis hoppe droidcon_2014_slide_deck_screen
Dennis hoppe droidcon_2014_slide_deck_screenHeinrich Seeger
 
Hasan hosgel moosecon_2013_customers_choice fullsize
Hasan hosgel moosecon_2013_customers_choice fullsizeHasan hosgel moosecon_2013_customers_choice fullsize
Hasan hosgel moosecon_2013_customers_choice fullsizeHeinrich Seeger
 
Moosecon rcs for developers
Moosecon   rcs for developersMoosecon   rcs for developers
Moosecon rcs for developersHeinrich Seeger
 
Mobile apps on the big screen
Mobile apps on the big screenMobile apps on the big screen
Mobile apps on the big screenHeinrich Seeger
 
Push notification generaltalk
Push notification generaltalkPush notification generaltalk
Push notification generaltalkHeinrich Seeger
 
Backendasaservice apiomat
Backendasaservice apiomatBackendasaservice apiomat
Backendasaservice apiomatHeinrich Seeger
 
Push notification technicaltalk
Push notification technicaltalkPush notification technicaltalk
Push notification technicaltalkHeinrich Seeger
 
Crowdshare, Secure Resource Sharing in Mobile Crowds
Crowdshare, Secure Resource Sharing in Mobile CrowdsCrowdshare, Secure Resource Sharing in Mobile Crowds
Crowdshare, Secure Resource Sharing in Mobile CrowdsHeinrich Seeger
 
Moosecon native apps_blackberry_10-optimized
Moosecon native apps_blackberry_10-optimizedMoosecon native apps_blackberry_10-optimized
Moosecon native apps_blackberry_10-optimizedHeinrich Seeger
 
Dev mobile apps ent it final
Dev mobile apps ent   it finalDev mobile apps ent   it final
Dev mobile apps ent it finalHeinrich Seeger
 

Más de Heinrich Seeger (12)

Dennis hoppe droidcon_2014_slide_deck_screen
Dennis hoppe droidcon_2014_slide_deck_screenDennis hoppe droidcon_2014_slide_deck_screen
Dennis hoppe droidcon_2014_slide_deck_screen
 
Hasan hosgel moosecon_2013_customers_choice fullsize
Hasan hosgel moosecon_2013_customers_choice fullsizeHasan hosgel moosecon_2013_customers_choice fullsize
Hasan hosgel moosecon_2013_customers_choice fullsize
 
Moosecon rcs for developers
Moosecon   rcs for developersMoosecon   rcs for developers
Moosecon rcs for developers
 
Mobile apps on the big screen
Mobile apps on the big screenMobile apps on the big screen
Mobile apps on the big screen
 
Push notification generaltalk
Push notification generaltalkPush notification generaltalk
Push notification generaltalk
 
Backendasaservice apiomat
Backendasaservice apiomatBackendasaservice apiomat
Backendasaservice apiomat
 
Paypal
PaypalPaypal
Paypal
 
Push notification technicaltalk
Push notification technicaltalkPush notification technicaltalk
Push notification technicaltalk
 
Crowdshare, Secure Resource Sharing in Mobile Crowds
Crowdshare, Secure Resource Sharing in Mobile CrowdsCrowdshare, Secure Resource Sharing in Mobile Crowds
Crowdshare, Secure Resource Sharing in Mobile Crowds
 
Moosecon native apps_blackberry_10-optimized
Moosecon native apps_blackberry_10-optimizedMoosecon native apps_blackberry_10-optimized
Moosecon native apps_blackberry_10-optimized
 
Key2 share moosecon
Key2 share mooseconKey2 share moosecon
Key2 share moosecon
 
Dev mobile apps ent it final
Dev mobile apps ent   it finalDev mobile apps ent   it final
Dev mobile apps ent it final
 

Último

Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 

Último (20)

Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 

Mooscon 2013 cebit - google integration in android apps (1)

  • 1. Google Integration in Android Apps Ronan Schwarz and Friedger Müffke Moosecon - 8 March 2013
  • 2. 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
  • 3. 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
  • 4. 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
  • 5. Google Play Framework (gms) Requires real device
  • 6. Helper methods ● Always check for availability first! ● Use isGooglePlayServicesAvailable() in onResume ● Give the user a chance to install the missing file with getErrorDialog() ● getOpenSourceSoftwareLicenseInfo()
  • 8. 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
  • 9. Authentication Error Handling ● User Recoverable Error ○ UserRecoverableAuthException ○ GooglePlayServicesAvailabilityException ○ UserRecoverableNotifiedException ● Non-Recoverable Error ○ GoogleAuthException
  • 11. 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
  • 14. PlusClient: initialize PlusClient.Builder()...build() PlusClient.connected() and .disconnected() within component lifecycle All calls are asyncronous .onConnected() and . onDisconnected()
  • 15. 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
  • 16. 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
  • 17. PlusClient: App Activities ● Moments: "possibility to AddActivity share what user has done BuyActivity in the app" CheckInActivity CommentActivity CreateActivity ● Prepare snippet DiscoverActivity (or let prepare) ListenActivity ReserveActivity ● writeMoment(moment) ReviewActivity WantActivity ● removeMoement(moment) ● listMoments()
  • 18. PlusShare: Share Content ● Simple share intent PlusShare.Builder.getIntent() ● Deep linking setContentDeepLinkId() setContentUrl() ● Interactive posts addCallToAction() ● Can be ActionBar or (standard) Button ● Breaks ShareActionProvider
  • 19. 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());
  • 20. 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
  • 21. Over-the-air install (7 March) ● Setup web client ● Sign-in Button + app package name ● Quality control by Google (?)
  • 23. Google Maps: V2 ● Fragments! ● Fragments for older Devices! ● Views! ● Activities ? ● Breaks compatibility.
  • 24. Google Maps: Camera ● 2-Axis Rotation ● Perspective View ● Zoom ● Move ● Target
  • 25. Google Maps: Markers ● Default Markers ● Customize Appearance ● Show InfoWindow ● InfoWindow != View ● Add/Remove Markers manually
  • 26. 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));
  • 27. Goodies http://www.flickr.com/photos/g-alain/
  • 28. 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
  • 29. PanoramaClient ● Load from URL ● Load from ContentProvider ● Zoom and Rotate
  • 30. 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...
  • 31. Questions Ronan Schwarz Friedger Müffke novoda.com @novoda #moosecon