SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
developers
Re-engineering the Facebook SDK
          for Android
                            Connor Treacy
                           connor@fb.com
                           @connortreacy
In the last 30 days, Facebook sent users to
    Google Play & the Apple App Store
             174m times
1 Billion monthly active users
600M monthly active mobile users
  40% of the top 400 mobile apps
8 of the top 10 grossing mobile apps
Share           Drives
Stories          Traffic

          Your
          App
Android versions over time
                                                                                          Source: bgr.com
 4.1 Jellybean                                                                                                     100

 4 Ice Cream
 3 Honeycomb
                                                                                                                  80
 2.3 Gingerbread
 2.2 Froyo
 2.1 Eclair                                                                                                       60
 2.0
 1.6 Donut
 1.5 Cupcake                                                                                                   40




                   Dec 2009                                                                                   20
                                June 2010
                                            Dec 2010
                                                       June 2011
                                                                   Dec 2011
                              SDK 1.0                                         June 2012                       0
                                                                                                   Dec 2012




                                                                                                SDK 3.0

                                                                                                SDK 3.0
Post-SDK 2.0....
Android moved on



                      MyAppActivity
     !
    W
  NE




                         Activity



 Fragments         Activity Hierarchy   App Ecosystem
Facebook moved on




  Native App        Platform    App Install
Improvements        Stability     Traffic
Developers expected more
Droidcon2013 facebook sdk treacy
Droidcon2013 facebook sdk treacy
Objectives
1. Restructure for additive features

2. Native UI elements and Fragment support

3. Build features for high-value scenarios
Principles
1. Low-risk upgrage path from SDK 2.0

2. Feature parity with Facebook SDK for iOS

3. Better API stability
Facebook SDK for Android 3.0.1


    http://developers.facebook.com/android
Better Modularity


Native UI   LoginButton   FriendPickerFragment      ProfilePictureView


  Graph      Facebook
              GraphUser       GraphObject.Factory
                                             FacebookActivity
                                                        OpenGraphAction


    Core     Session      Request     UiLifecycleHelper      Settings
Better API interaction


                   RequestAsyncTask      RequestBatch



                             Facebook.request
                                  Request
     Your
     App                       FacebookError
                                  Response


                  FacebookException    FacebookRequestError


      FacebookAuthorizationException   FacebookServiceException
Initializing with the SDK 2.0
‣ Instantiate the Facebook object with your App ID
‣ Most activity managed from the Facebook object



 fbconnection	
  =	
  new	
  Facebook("1123581321");




                                   fbconnection.authorize(
                                   	
  	
  	
  	
  	
  getActivity(),	
  
                                   	
  	
  	
  	
  	
  new	
  String[]	
  ("publish_actions",	
  “user_likes”),	
  	
  
                                   	
  	
  	
  	
  	
  dialogListener);
Initializing with the SDK 3.0
‣ Greater separation of concerns: Session, Request, Response, UI elements
‣ Set up the App ID through the string resources and Android Manifest files



 <string	
  name="app_id">480369938658210</string>




                               ...
                               	
  	
  	
  	
  <meta-­‐data	
  
                               	
  	
  	
  	
  	
  	
  android:name="com.facebook.sdk.ApplicationId"	
  	
  
                               	
  	
  	
  	
  	
  	
  android:value="@string/app_id"	
  />
                               </application>
Activity Lifecycle with SDK 2.0
‣ Extend the FacebookActivity class
‣ Handle session state changes by overriding the abstract method in
 FacebookActivity


 public	
  class	
  MainActivity	
  extends	
  FacebookActivity	
  {




                                     @Override
                                     protected	
  void	
  onSessionStateChange(
                                     	
  	
  SessionState	
  state,	
  Exception	
  exception)	
  {
                                     ...
                                     }
Activity Lifecycle with SDK 3.0
‣ Keep your own Activities
‣ Instantiate a UiLifeCycleHelper and keep it in step with your Activity



 public	
  class	
  MainActivity	
  extends	
  WhateverYouWantActivity	
  {




                             @Override
                             public	
  void	
  onCreate(Bundle	
  savedInstanceState)	
  {
                             	
  	
  	
  	
  super.onCreate(savedInstanceState);

                             	
  	
  	
  	
  uiHelper	
  =	
  new	
  UiLifecycleHelper(this,	
  callback);
                             	
  	
  	
  	
  uiHelper.onCreate(savedInstanceState);
Session Lifecycle

new Session()            CREATED_TOKEN_LOADED      session.open()




    valid       Yes                                                   OPENED
   cache?
                        OPENING
                                                                Yes
                                                     success?
      No

  CREATED             session.openFor…()
                                                         No


                                                CLOSED_LOGIN_FAILED
Session Lifecycle

   session.close()          CLOSED

                                       OPENED_TOKEN_UPDATED


      OPENED

                                                Yes
                                     success?

session.reauthorizeFor…()
                                         No


                                     OPENED
Feed Dialog
FriendPickerFragment   PlacePickerFragment
Growing your app
Growing your app




                   Settings.publishInstallAsync(...);
Facebook SDK 3.0.1
   for Android
developers.facebook.com/android

Mais conteúdo relacionado

Destaque

Facebook connect tutorial
Facebook connect tutorialFacebook connect tutorial
Facebook connect tutorialJerry Wijaya
 
Build the future of mobile apps with facebook mobile app europe berlin sept 14
Build the future of mobile apps with facebook   mobile app europe berlin sept 14Build the future of mobile apps with facebook   mobile app europe berlin sept 14
Build the future of mobile apps with facebook mobile app europe berlin sept 14Julien Lesaicherre
 
Mobile Authentication for iOS Applications
Mobile Authentication for iOS ApplicationsMobile Authentication for iOS Applications
Mobile Authentication for iOS ApplicationsLindsay Brunner
 
The power of mobile advertising on facebook
The power of mobile advertising on facebookThe power of mobile advertising on facebook
The power of mobile advertising on facebookAndrey Podshibyakin
 
Introduction to facebook sdk
Introduction to facebook sdkIntroduction to facebook sdk
Introduction to facebook sdkSingsys Pte Ltd
 

Destaque (6)

Facebook connect tutorial
Facebook connect tutorialFacebook connect tutorial
Facebook connect tutorial
 
Build the future of mobile apps with facebook mobile app europe berlin sept 14
Build the future of mobile apps with facebook   mobile app europe berlin sept 14Build the future of mobile apps with facebook   mobile app europe berlin sept 14
Build the future of mobile apps with facebook mobile app europe berlin sept 14
 
Mobile Authentication for iOS Applications
Mobile Authentication for iOS ApplicationsMobile Authentication for iOS Applications
Mobile Authentication for iOS Applications
 
Facebook api for iOS
Facebook api for iOSFacebook api for iOS
Facebook api for iOS
 
The power of mobile advertising on facebook
The power of mobile advertising on facebookThe power of mobile advertising on facebook
The power of mobile advertising on facebook
 
Introduction to facebook sdk
Introduction to facebook sdkIntroduction to facebook sdk
Introduction to facebook sdk
 

Semelhante a Droidcon2013 facebook sdk treacy

Introduction to facebook java script sdk
Introduction to facebook java script sdk Introduction to facebook java script sdk
Introduction to facebook java script sdk Yi-Fan Chu
 
One graph to rule them all - Facebook
One graph to rule them all - FacebookOne graph to rule them all - Facebook
One graph to rule them all - Facebookitnig
 
Introduction to facebook javascript sdk
Introduction to facebook javascript sdk Introduction to facebook javascript sdk
Introduction to facebook javascript sdk Yi-Fan Chu
 
Activities, Fragments, and Events
Activities, Fragments, and EventsActivities, Fragments, and Events
Activities, Fragments, and EventsHenry Osborne
 
Extending Appcelerator Titanium Mobile through Native Modules
Extending Appcelerator Titanium Mobile through Native ModulesExtending Appcelerator Titanium Mobile through Native Modules
Extending Appcelerator Titanium Mobile through Native Modulesomorandi
 
Build a lego app with CocoaPods
Build a lego app with CocoaPodsBuild a lego app with CocoaPods
Build a lego app with CocoaPodsCocoaHeads France
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideVisual Engineering
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recieversUtkarsh Mankad
 
Christopher Allen's Presentation at eComm 2009
Christopher Allen's Presentation at eComm 2009Christopher Allen's Presentation at eComm 2009
Christopher Allen's Presentation at eComm 2009eCommConf
 
Session #8 adding magic to your app
Session #8  adding magic to your appSession #8  adding magic to your app
Session #8 adding magic to your appVitali Pekelis
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...Matt Raible
 
Lecture #3 activities and intents
Lecture #3  activities and intentsLecture #3  activities and intents
Lecture #3 activities and intentsVitali Pekelis
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Androidrizki adam kurniawan
 
Android MVVM architecture using Kotlin, Dagger2, LiveData, MediatorLiveData
Android MVVM architecture using Kotlin, Dagger2, LiveData, MediatorLiveDataAndroid MVVM architecture using Kotlin, Dagger2, LiveData, MediatorLiveData
Android MVVM architecture using Kotlin, Dagger2, LiveData, MediatorLiveDataWaheed Nazir
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recieversJagdish Gediya
 

Semelhante a Droidcon2013 facebook sdk treacy (20)

Introduction to facebook java script sdk
Introduction to facebook java script sdk Introduction to facebook java script sdk
Introduction to facebook java script sdk
 
One graph to rule them all - Facebook
One graph to rule them all - FacebookOne graph to rule them all - Facebook
One graph to rule them all - Facebook
 
Introduction to facebook javascript sdk
Introduction to facebook javascript sdk Introduction to facebook javascript sdk
Introduction to facebook javascript sdk
 
Activities, Fragments, and Events
Activities, Fragments, and EventsActivities, Fragments, and Events
Activities, Fragments, and Events
 
Activity
ActivityActivity
Activity
 
Activity
ActivityActivity
Activity
 
Activity
ActivityActivity
Activity
 
Activity
ActivityActivity
Activity
 
Extending Appcelerator Titanium Mobile through Native Modules
Extending Appcelerator Titanium Mobile through Native ModulesExtending Appcelerator Titanium Mobile through Native Modules
Extending Appcelerator Titanium Mobile through Native Modules
 
Build a lego app with CocoaPods
Build a lego app with CocoaPodsBuild a lego app with CocoaPods
Build a lego app with CocoaPods
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
 
Building richwebapplicationsusingasp
Building richwebapplicationsusingaspBuilding richwebapplicationsusingasp
Building richwebapplicationsusingasp
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
 
Christopher Allen's Presentation at eComm 2009
Christopher Allen's Presentation at eComm 2009Christopher Allen's Presentation at eComm 2009
Christopher Allen's Presentation at eComm 2009
 
Session #8 adding magic to your app
Session #8  adding magic to your appSession #8  adding magic to your app
Session #8 adding magic to your app
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - Utah JUG...
 
Lecture #3 activities and intents
Lecture #3  activities and intentsLecture #3  activities and intents
Lecture #3 activities and intents
 
[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android[PBO] Pertemuan 12 - Pemrograman Android
[PBO] Pertemuan 12 - Pemrograman Android
 
Android MVVM architecture using Kotlin, Dagger2, LiveData, MediatorLiveData
Android MVVM architecture using Kotlin, Dagger2, LiveData, MediatorLiveDataAndroid MVVM architecture using Kotlin, Dagger2, LiveData, MediatorLiveData
Android MVVM architecture using Kotlin, Dagger2, LiveData, MediatorLiveData
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
 

Mais de Droidcon Berlin

Droidcon de 2014 google cast
Droidcon de 2014   google castDroidcon de 2014   google cast
Droidcon de 2014 google castDroidcon Berlin
 
Android programming -_pushing_the_limits
Android programming -_pushing_the_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limitsDroidcon Berlin
 
Android industrial mobility
Android industrial mobility Android industrial mobility
Android industrial mobility Droidcon Berlin
 
From sensor data_to_android_and_back
From sensor data_to_android_and_backFrom sensor data_to_android_and_back
From sensor data_to_android_and_backDroidcon Berlin
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86Droidcon Berlin
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building AndroidDroidcon Berlin
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentationDroidcon Berlin
 
Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Droidcon Berlin
 
The artofcalabash peterkrauss
The artofcalabash peterkraussThe artofcalabash peterkrauss
The artofcalabash peterkraussDroidcon Berlin
 
Raesch, gries droidcon 2014
Raesch, gries   droidcon 2014Raesch, gries   droidcon 2014
Raesch, gries droidcon 2014Droidcon Berlin
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Droidcon Berlin
 
20140508 quantified self droidcon
20140508 quantified self droidcon20140508 quantified self droidcon
20140508 quantified self droidconDroidcon Berlin
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devicesDroidcon Berlin
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradioDroidcon Berlin
 
Droidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon Berlin
 

Mais de Droidcon Berlin (20)

Droidcon de 2014 google cast
Droidcon de 2014   google castDroidcon de 2014   google cast
Droidcon de 2014 google cast
 
Android programming -_pushing_the_limits
Android programming -_pushing_the_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limits
 
crashing in style
crashing in stylecrashing in style
crashing in style
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Android industrial mobility
Android industrial mobility Android industrial mobility
Android industrial mobility
 
Details matter in ux
Details matter in uxDetails matter in ux
Details matter in ux
 
From sensor data_to_android_and_back
From sensor data_to_android_and_backFrom sensor data_to_android_and_back
From sensor data_to_android_and_back
 
droidparts
droidpartsdroidparts
droidparts
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86
 
5 tips of monetization
5 tips of monetization5 tips of monetization
5 tips of monetization
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentation
 
Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3
 
The artofcalabash peterkrauss
The artofcalabash peterkraussThe artofcalabash peterkrauss
The artofcalabash peterkrauss
 
Raesch, gries droidcon 2014
Raesch, gries   droidcon 2014Raesch, gries   droidcon 2014
Raesch, gries droidcon 2014
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014
 
20140508 quantified self droidcon
20140508 quantified self droidcon20140508 quantified self droidcon
20140508 quantified self droidcon
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devices
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradio
 
Droidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicro
 

Último

Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInThousandEyes
 
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Alkin Tezuysal
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNeo4j
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FESTBillieHyde
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...DianaGray10
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024Brian Pichman
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)codyslingerland1
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch TuesdayIvanti
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingMAGNIntelligence
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024Brian Pichman
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveIES VE
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxKaustubhBhavsar6
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarThousandEyes
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
 
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTSIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTxtailishbaloch
 
LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0DanBrown980551
 
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxGraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxNeo4j
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationKnoldus Inc.
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updateadam112203
 

Último (20)

Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedInOutage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
Outage Analysis: March 5th/6th 2024 Meta, Comcast, and LinkedIn
 
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile BrochurePlanetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile Brochure
 
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
Design and Modeling for MySQL SCALE 21X Pasadena, CA Mar 2024
 
Novo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4jNovo Nordisk's journey in developing an open-source application on Neo4j
Novo Nordisk's journey in developing an open-source application on Neo4j
 
Technical SEO for Improved Accessibility WTS FEST
Technical SEO for Improved Accessibility  WTS FESTTechnical SEO for Improved Accessibility  WTS FEST
Technical SEO for Improved Accessibility WTS FEST
 
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...
 
AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024AI Workshops at Computers In Libraries 2024
AI Workshops at Computers In Libraries 2024
 
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)
 
March Patch Tuesday
March Patch TuesdayMarch Patch Tuesday
March Patch Tuesday
 
IT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced ComputingIT Service Management (ITSM) Best Practices for Advanced Computing
IT Service Management (ITSM) Best Practices for Advanced Computing
 
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024
 
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES LiveKeep Your Finger on the Pulse of Your Building's Performance with IES Live
Keep Your Finger on the Pulse of Your Building's Performance with IES Live
 
How to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptxHow to become a GDSC Lead GDSC MI AOE.pptx
How to become a GDSC Lead GDSC MI AOE.pptx
 
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? WebinarEMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? Webinar
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENTSIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
 
LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0LF Energy Webinar - Unveiling OpenEEMeter 4.0
LF Energy Webinar - Unveiling OpenEEMeter 4.0
 
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptxGraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
GraphSummit Copenhagen 2024 - Neo4j Vision and Roadmap.pptx
 
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its applicationIntroduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its application
 
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 updatePatch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 update
 

Droidcon2013 facebook sdk treacy

  • 1. developers Re-engineering the Facebook SDK for Android Connor Treacy connor@fb.com @connortreacy
  • 2. In the last 30 days, Facebook sent users to Google Play & the Apple App Store 174m times
  • 3. 1 Billion monthly active users 600M monthly active mobile users 40% of the top 400 mobile apps 8 of the top 10 grossing mobile apps
  • 4. Share Drives Stories Traffic Your App
  • 5. Android versions over time Source: bgr.com 4.1 Jellybean 100 4 Ice Cream 3 Honeycomb 80 2.3 Gingerbread 2.2 Froyo 2.1 Eclair 60 2.0 1.6 Donut 1.5 Cupcake 40 Dec 2009 20 June 2010 Dec 2010 June 2011 Dec 2011 SDK 1.0 June 2012 0 Dec 2012 SDK 3.0 SDK 3.0
  • 7. Android moved on MyAppActivity ! W NE Activity Fragments Activity Hierarchy App Ecosystem
  • 8. Facebook moved on Native App Platform App Install Improvements Stability Traffic
  • 12. Objectives 1. Restructure for additive features 2. Native UI elements and Fragment support 3. Build features for high-value scenarios
  • 13. Principles 1. Low-risk upgrage path from SDK 2.0 2. Feature parity with Facebook SDK for iOS 3. Better API stability
  • 14. Facebook SDK for Android 3.0.1 http://developers.facebook.com/android
  • 15. Better Modularity Native UI LoginButton FriendPickerFragment ProfilePictureView Graph Facebook GraphUser GraphObject.Factory FacebookActivity OpenGraphAction Core Session Request UiLifecycleHelper Settings
  • 16. Better API interaction RequestAsyncTask RequestBatch Facebook.request Request Your App FacebookError Response FacebookException FacebookRequestError FacebookAuthorizationException FacebookServiceException
  • 17. Initializing with the SDK 2.0 ‣ Instantiate the Facebook object with your App ID ‣ Most activity managed from the Facebook object fbconnection  =  new  Facebook("1123581321"); fbconnection.authorize(          getActivity(),            new  String[]  ("publish_actions",  “user_likes”),              dialogListener);
  • 18. Initializing with the SDK 3.0 ‣ Greater separation of concerns: Session, Request, Response, UI elements ‣ Set up the App ID through the string resources and Android Manifest files <string  name="app_id">480369938658210</string> ...        <meta-­‐data              android:name="com.facebook.sdk.ApplicationId"                android:value="@string/app_id"  /> </application>
  • 19. Activity Lifecycle with SDK 2.0 ‣ Extend the FacebookActivity class ‣ Handle session state changes by overriding the abstract method in FacebookActivity public  class  MainActivity  extends  FacebookActivity  { @Override protected  void  onSessionStateChange(    SessionState  state,  Exception  exception)  { ... }
  • 20. Activity Lifecycle with SDK 3.0 ‣ Keep your own Activities ‣ Instantiate a UiLifeCycleHelper and keep it in step with your Activity public  class  MainActivity  extends  WhateverYouWantActivity  { @Override public  void  onCreate(Bundle  savedInstanceState)  {        super.onCreate(savedInstanceState);        uiHelper  =  new  UiLifecycleHelper(this,  callback);        uiHelper.onCreate(savedInstanceState);
  • 21. Session Lifecycle new Session() CREATED_TOKEN_LOADED session.open() valid Yes OPENED cache? OPENING Yes success? No CREATED session.openFor…() No CLOSED_LOGIN_FAILED
  • 22. Session Lifecycle session.close() CLOSED OPENED_TOKEN_UPDATED OPENED Yes success? session.reauthorizeFor…() No OPENED
  • 24. FriendPickerFragment PlacePickerFragment
  • 26. Growing your app Settings.publishInstallAsync(...);
  • 27. Facebook SDK 3.0.1 for Android developers.facebook.com/android