SlideShare a Scribd company logo
Module 6: Hooking into SharePoint APIs with Android
Registration for Los Angeles June 16 2015
http://aka.ms/O365campLA
Course Agenda
Office Camp
Module 1: Introduction to the Day
Module 2: Setting up the Environments
Module 3: Hooking into Apps for SharePoint
Module 4: Hooking into Office 365 APIs
Module 5: Hooking into Apps for Office
Module 6: Hooking into SharePoint APIs with Android
Ivan Sanders
SharePoint MVP/MCT
ivan@dimension-si.com
@iasanders
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID
http://developer.android.com/sdk/index.html
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID
Android Client
Azure AD O365 SharePoint
Linked
JSON/REST
OAuth
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID
Android Client
Azure AD O365 SharePoint
Linked
JSON/REST
OAuth
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID
https://github.com/AzureAD/azure-activedirectory-
library-for-android
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID
dependencies {
//Include the Active Directory Authentication Library
compile group: 'com.microsoft.aad', name: 'adal', version: '1.0.5'
}
<uses-permission android:name="android.permission.INTERNET" />
<application ...>
...
<activity
android:name="com.microsoft.aad.adal.AuthenticationActivity"
android:label="Authenticate with AD"
android:screenOrientation="portrait">
</activity>
</application>
//in Activity
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
//complete any authentication requests
mContext.onActivityResult(requestCode, resultCode, data);
}
//in Activity.onCreate()
mContext = new AuthenticationContext(application, authority, false);
mAuthContext.acquireToken(currentActivity,
sharepointUrl, //e.g. http://mydomain.sharepoint.com
clientId, //an Azure AD client id
redirectUrl, //e.g. "http://android/callback" (also configured with AD)
loginHint, //e.g. "user@mydomain.onmicrosoft.com"
promptBehaviour,
extraQueryArgs,
callback //e.g. new AuthenticationCallback<AuthenticationResult>() {...}
);
mAuthContext.acquireTokenSilently(
resource,
clientId,
userId, //acquired by call to acquireToken
callback
);
Start
Show splash screen
acquireToken()AuthenticationActivity
Show main screen
End
storeTokens() callback(accessToken)
Start
User initiates API call
acquireTokenSilently()
callback(accessToken)
Complete API call
End
Cache valid? NO
YES
refreshToken()
Success?YES NO
Restart app for auth
End
storeTokens()
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID
Android Client
Azure AD O365 SharePoint
Linked
JSON/REST
OAuth
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID
https://github.com/OfficeDev/Office-365-SDK-for-
Android
ListClient client = new ListClient(
sharePointUrl, //e.g. "http://mydomain.sharepoint.com/"
sharePointSitePath, //e.g. "/client/site"
credentials
);
Credentials credentials = new OAuthCredentials(accessToken);
final String listName = "My List";
//this produces the odata query: $filter=Title+eq+"My list"
Query query = QueryOperations.field("Title").eq(listName);
//we can attach callbacks to f which will run when the data is available
ListenableFuture<List<SPList>> f = client.getLists(query);
//Or... calling .get() will block this thread until the data is available
//DO NOT DO THIS ON THE UI THREAD!
List<SPList> results = f.get();
final String listName = "My List";
//this produces the odata query: $filter=startsWith(Title,"Item #")
Query query = QueryOperations.startsWith("Title", "Item #");
//we can attach callbacks to f which will run when the data is available
ListenableFuture<List<SPListItem>> f = client.getListItems(listName, query);
//Or... calling .get() will block this thread until the data is available
//DO NOT DO THIS ON THE UI THREAD!
List<SPListItem> results = f.get();
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID
O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID

More Related Content

What's hot (20)

How to create custom Connector for Microsoft Flow
How to create custom Connector for Microsoft FlowHow to create custom Connector for Microsoft Flow
How to create custom Connector for Microsoft Flow
Dragan Panjkov
 
Using office add ins to solve business problems-SharePoint Saturday Redmond 2015
Using office add ins to solve business problems-SharePoint Saturday Redmond 2015Using office add ins to solve business problems-SharePoint Saturday Redmond 2015
Using office add ins to solve business problems-SharePoint Saturday Redmond 2015
Ryan Schouten
 
Practical Business Intelligence in SharePoint 2013 - Helsinki Finalnd
Practical Business Intelligence in SharePoint 2013 - Helsinki FinalndPractical Business Intelligence in SharePoint 2013 - Helsinki Finalnd
Practical Business Intelligence in SharePoint 2013 - Helsinki Finalnd
Ivan Sanders
 
So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015
So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015
So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015
Ryan Schouten
 
How to: Create a custom connector for Microsoft Flow
How to: Create a custom connector for Microsoft FlowHow to: Create a custom connector for Microsoft Flow
How to: Create a custom connector for Microsoft Flow
Dragan Panjkov
 
Introducción a las Apps para SharePoint
Introducción a las Apps para SharePointIntroducción a las Apps para SharePoint
Introducción a las Apps para SharePoint
Alberto Diaz Martin
 
Deep dive into office 365 ap is for calendar mail and contacts
Deep dive into office 365 ap is for calendar mail and contactsDeep dive into office 365 ap is for calendar mail and contacts
Deep dive into office 365 ap is for calendar mail and contacts
Alberto Diaz Martin
 
How to create custom connector for Microsoft Flow - SPSNL18
How to create custom connector for Microsoft Flow - SPSNL18How to create custom connector for Microsoft Flow - SPSNL18
How to create custom connector for Microsoft Flow - SPSNL18
Dragan Panjkov
 
Introducción a las Apps para Office
Introducción a las Apps para OfficeIntroducción a las Apps para Office
Introducción a las Apps para Office
Alberto Diaz Martin
 
Getting started with Office 365 API's
Getting started with Office 365 API'sGetting started with Office 365 API's
Getting started with Office 365 API's
Alberto Diaz Martin
 
Deep dive into office 365 api for one drive for business
Deep dive into office 365 api for one drive for businessDeep dive into office 365 api for one drive for business
Deep dive into office 365 api for one drive for business
Alberto Diaz Martin
 
SharePoint Framework SPS Madrid 2016
SharePoint Framework SPS Madrid 2016SharePoint Framework SPS Madrid 2016
SharePoint Framework SPS Madrid 2016
Sonja Madsen
 
Microsoft Office Web Applications
Microsoft Office Web ApplicationsMicrosoft Office Web Applications
Microsoft Office Web Applications
pearce.alex
 
Office 365 Development Overview
Office 365 Development OverviewOffice 365 Development Overview
Office 365 Development Overview
Mahmoud Hamed Mahmoud
 
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by AtidanTechnical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
David J Rosenthal
 
Build & Ignite Cloud Notes
Build & Ignite Cloud NotesBuild & Ignite Cloud Notes
Build & Ignite Cloud Notes
Mahmoud Hamed Mahmoud
 
Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...
Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...
Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...
Corey Roth
 
Apps for SharePoint Online 2013
Apps for SharePoint Online 2013Apps for SharePoint Online 2013
Apps for SharePoint Online 2013
Giuseppe Marchi
 
Microsoft PowerApps Let’s change the way we build business apps
Microsoft PowerApps Let’s change the way we build business appsMicrosoft PowerApps Let’s change the way we build business apps
Microsoft PowerApps Let’s change the way we build business apps
BizTalk360
 
O365con14 - the new sharepoint online apps - napa in action
O365con14 - the new sharepoint online apps - napa in actionO365con14 - the new sharepoint online apps - napa in action
O365con14 - the new sharepoint online apps - napa in action
NCCOMMS
 
How to create custom Connector for Microsoft Flow
How to create custom Connector for Microsoft FlowHow to create custom Connector for Microsoft Flow
How to create custom Connector for Microsoft Flow
Dragan Panjkov
 
Using office add ins to solve business problems-SharePoint Saturday Redmond 2015
Using office add ins to solve business problems-SharePoint Saturday Redmond 2015Using office add ins to solve business problems-SharePoint Saturday Redmond 2015
Using office add ins to solve business problems-SharePoint Saturday Redmond 2015
Ryan Schouten
 
Practical Business Intelligence in SharePoint 2013 - Helsinki Finalnd
Practical Business Intelligence in SharePoint 2013 - Helsinki FinalndPractical Business Intelligence in SharePoint 2013 - Helsinki Finalnd
Practical Business Intelligence in SharePoint 2013 - Helsinki Finalnd
Ivan Sanders
 
So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015
So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015
So You Want To Be A SharePoint Developer-SPS Silicon Valley 2015
Ryan Schouten
 
How to: Create a custom connector for Microsoft Flow
How to: Create a custom connector for Microsoft FlowHow to: Create a custom connector for Microsoft Flow
How to: Create a custom connector for Microsoft Flow
Dragan Panjkov
 
Introducción a las Apps para SharePoint
Introducción a las Apps para SharePointIntroducción a las Apps para SharePoint
Introducción a las Apps para SharePoint
Alberto Diaz Martin
 
Deep dive into office 365 ap is for calendar mail and contacts
Deep dive into office 365 ap is for calendar mail and contactsDeep dive into office 365 ap is for calendar mail and contacts
Deep dive into office 365 ap is for calendar mail and contacts
Alberto Diaz Martin
 
How to create custom connector for Microsoft Flow - SPSNL18
How to create custom connector for Microsoft Flow - SPSNL18How to create custom connector for Microsoft Flow - SPSNL18
How to create custom connector for Microsoft Flow - SPSNL18
Dragan Panjkov
 
Introducción a las Apps para Office
Introducción a las Apps para OfficeIntroducción a las Apps para Office
Introducción a las Apps para Office
Alberto Diaz Martin
 
Getting started with Office 365 API's
Getting started with Office 365 API'sGetting started with Office 365 API's
Getting started with Office 365 API's
Alberto Diaz Martin
 
Deep dive into office 365 api for one drive for business
Deep dive into office 365 api for one drive for businessDeep dive into office 365 api for one drive for business
Deep dive into office 365 api for one drive for business
Alberto Diaz Martin
 
SharePoint Framework SPS Madrid 2016
SharePoint Framework SPS Madrid 2016SharePoint Framework SPS Madrid 2016
SharePoint Framework SPS Madrid 2016
Sonja Madsen
 
Microsoft Office Web Applications
Microsoft Office Web ApplicationsMicrosoft Office Web Applications
Microsoft Office Web Applications
pearce.alex
 
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by AtidanTechnical Overview of Microsoft SharePoint Online - Presented by Atidan
Technical Overview of Microsoft SharePoint Online - Presented by Atidan
David J Rosenthal
 
Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...
Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...
Office 365 - Introduction to SharePoint Online Development - SharePoint Conne...
Corey Roth
 
Apps for SharePoint Online 2013
Apps for SharePoint Online 2013Apps for SharePoint Online 2013
Apps for SharePoint Online 2013
Giuseppe Marchi
 
Microsoft PowerApps Let’s change the way we build business apps
Microsoft PowerApps Let’s change the way we build business appsMicrosoft PowerApps Let’s change the way we build business apps
Microsoft PowerApps Let’s change the way we build business apps
BizTalk360
 
O365con14 - the new sharepoint online apps - napa in action
O365con14 - the new sharepoint online apps - napa in actionO365con14 - the new sharepoint online apps - napa in action
O365con14 - the new sharepoint online apps - napa in action
NCCOMMS
 

Viewers also liked (8)

Overview of Office 365 - Presentation By Sajid
Overview of Office 365  - Presentation By Sajid Overview of Office 365  - Presentation By Sajid
Overview of Office 365 - Presentation By Sajid
srafiq
 
Introduction to O365 E5 Plan
Introduction to O365 E5 Plan Introduction to O365 E5 Plan
Introduction to O365 E5 Plan
SoftwareONEPresents
 
O365 Groups- Best Practices and Solutions
O365 Groups- Best Practices and SolutionsO365 Groups- Best Practices and Solutions
O365 Groups- Best Practices and Solutions
JohnConnected
 
36.5 Office 365 Features That Will Increase Your Productivity
36.5 Office 365 Features That Will Increase Your Productivity36.5 Office 365 Features That Will Increase Your Productivity
36.5 Office 365 Features That Will Increase Your Productivity
Best STL
 
Office 365 Sales Presentation
Office 365 Sales PresentationOffice 365 Sales Presentation
Office 365 Sales Presentation
Thomas Perdana
 
Office 365 presentation
Office 365 presentationOffice 365 presentation
Office 365 presentation
Saed Shela
 
Microsoft Office 365 Presentation
Microsoft Office 365 PresentationMicrosoft Office 365 Presentation
Microsoft Office 365 Presentation
SNP Technologies, Inc.
 
Office 365 introduction and technical overview
Office 365 introduction and technical overviewOffice 365 introduction and technical overview
Office 365 introduction and technical overview
Motty Ben Atia
 
Overview of Office 365 - Presentation By Sajid
Overview of Office 365  - Presentation By Sajid Overview of Office 365  - Presentation By Sajid
Overview of Office 365 - Presentation By Sajid
srafiq
 
O365 Groups- Best Practices and Solutions
O365 Groups- Best Practices and SolutionsO365 Groups- Best Practices and Solutions
O365 Groups- Best Practices and Solutions
JohnConnected
 
36.5 Office 365 Features That Will Increase Your Productivity
36.5 Office 365 Features That Will Increase Your Productivity36.5 Office 365 Features That Will Increase Your Productivity
36.5 Office 365 Features That Will Increase Your Productivity
Best STL
 
Office 365 Sales Presentation
Office 365 Sales PresentationOffice 365 Sales Presentation
Office 365 Sales Presentation
Thomas Perdana
 
Office 365 presentation
Office 365 presentationOffice 365 presentation
Office 365 presentation
Saed Shela
 
Office 365 introduction and technical overview
Office 365 introduction and technical overviewOffice 365 introduction and technical overview
Office 365 introduction and technical overview
Motty Ben Atia
 

Similar to O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID (20)

Hooking SharePoint APIs with Android
Hooking SharePoint APIs with AndroidHooking SharePoint APIs with Android
Hooking SharePoint APIs with Android
Kris Wagner
 
Office 365 api vs share point app model
Office 365 api vs share point app modelOffice 365 api vs share point app model
Office 365 api vs share point app model
BIWUG
 
Security enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & KeycloakSecurity enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & Keycloak
Charles Moulliard
 
Webinar - Office 365 & PowerShell : A Match Made in Heaven
Webinar - Office 365 & PowerShell : A Match Made in HeavenWebinar - Office 365 & PowerShell : A Match Made in Heaven
Webinar - Office 365 & PowerShell : A Match Made in Heaven
Sébastien Levert
 
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
Sébastien Levert
 
Android Intermediatte IAK full
Android Intermediatte IAK fullAndroid Intermediatte IAK full
Android Intermediatte IAK full
Ahmad Arif Faizin
 
Android intermediatte Full
Android intermediatte FullAndroid intermediatte Full
Android intermediatte Full
Ahmad Arif Faizin
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
lanslote
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIs
Tom Johnson
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
Kiril Iliev
 
Introduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIIntroduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST API
Rob Windsor
 
2013 - Back to the Future with Client/Server Development
2013 - Back to the Future with Client/Server Development 2013 - Back to the Future with Client/Server Development
2013 - Back to the Future with Client/Server Development
Chris O'Connor
 
SPConnect2014 Office 365 APIs
SPConnect2014 Office 365 APIsSPConnect2014 Office 365 APIs
SPConnect2014 Office 365 APIs
Wes Hackett
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure AD
SharePointRadi
 
Introduction to Google App Engine
Introduction to Google App EngineIntroduction to Google App Engine
Introduction to Google App Engine
Kanda Runapongsa Saikaew
 
Charla desarrollo de apps con sharepoint y office 365
Charla   desarrollo de apps con sharepoint y office 365Charla   desarrollo de apps con sharepoint y office 365
Charla desarrollo de apps con sharepoint y office 365
Luis Valencia
 
Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365
Kashif Imran
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.
Mario Cardinal
 
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...
wesley chun
 
REST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterREST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in Codeigniter
Sachin G Kulkarni
 
Hooking SharePoint APIs with Android
Hooking SharePoint APIs with AndroidHooking SharePoint APIs with Android
Hooking SharePoint APIs with Android
Kris Wagner
 
Office 365 api vs share point app model
Office 365 api vs share point app modelOffice 365 api vs share point app model
Office 365 api vs share point app model
BIWUG
 
Security enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & KeycloakSecurity enforcement of Java Microservices with Apiman & Keycloak
Security enforcement of Java Microservices with Apiman & Keycloak
Charles Moulliard
 
Webinar - Office 365 & PowerShell : A Match Made in Heaven
Webinar - Office 365 & PowerShell : A Match Made in HeavenWebinar - Office 365 & PowerShell : A Match Made in Heaven
Webinar - Office 365 & PowerShell : A Match Made in Heaven
Sébastien Levert
 
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
Sébastien Levert
 
Android Intermediatte IAK full
Android Intermediatte IAK fullAndroid Intermediatte IAK full
Android Intermediatte IAK full
Ahmad Arif Faizin
 
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기
lanslote
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIs
Tom Johnson
 
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
Kiril Iliev
 
Introduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIIntroduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST API
Rob Windsor
 
2013 - Back to the Future with Client/Server Development
2013 - Back to the Future with Client/Server Development 2013 - Back to the Future with Client/Server Development
2013 - Back to the Future with Client/Server Development
Chris O'Connor
 
SPConnect2014 Office 365 APIs
SPConnect2014 Office 365 APIsSPConnect2014 Office 365 APIs
SPConnect2014 Office 365 APIs
Wes Hackett
 
Developing Apps with Azure AD
Developing Apps with Azure ADDeveloping Apps with Azure AD
Developing Apps with Azure AD
SharePointRadi
 
Charla desarrollo de apps con sharepoint y office 365
Charla   desarrollo de apps con sharepoint y office 365Charla   desarrollo de apps con sharepoint y office 365
Charla desarrollo de apps con sharepoint y office 365
Luis Valencia
 
Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365Develop iOS and Android apps with SharePoint/Office 365
Develop iOS and Android apps with SharePoint/Office 365
Kashif Imran
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.
Mario Cardinal
 
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...
wesley chun
 
REST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterREST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in Codeigniter
Sachin G Kulkarni
 

More from Ivan Sanders (20)

Real world business workflow with SharePoint designer 2013
Real world business workflow with SharePoint designer 2013Real world business workflow with SharePoint designer 2013
Real world business workflow with SharePoint designer 2013
Ivan Sanders
 
Practical Business Intelligence with SharePoint 2013
Practical Business Intelligence with SharePoint 2013Practical Business Intelligence with SharePoint 2013
Practical Business Intelligence with SharePoint 2013
Ivan Sanders
 
SharePoint 2013 Business Intelligence Demos to build your businesss 2.0
SharePoint 2013 Business Intelligence Demos to build your businesss 2.0SharePoint 2013 Business Intelligence Demos to build your businesss 2.0
SharePoint 2013 Business Intelligence Demos to build your businesss 2.0
Ivan Sanders
 
Self-Service Business Intelligence in SharePoint 2013
Self-Service Business Intelligence in SharePoint 2013Self-Service Business Intelligence in SharePoint 2013
Self-Service Business Intelligence in SharePoint 2013
Ivan Sanders
 
Practical businerss intelligence in share point 2013
Practical businerss intelligence in share point 2013Practical businerss intelligence in share point 2013
Practical businerss intelligence in share point 2013
Ivan Sanders
 
San Fernando Valley SharePoint UserGroup Jully 11, 2012
San Fernando Valley SharePoint UserGroup Jully 11, 2012San Fernando Valley SharePoint UserGroup Jully 11, 2012
San Fernando Valley SharePoint UserGroup Jully 11, 2012
Ivan Sanders
 
Enterprise Content Management in SharePoint 2010 inplace autotagging with ter...
Enterprise Content Management in SharePoint 2010 inplace autotagging with ter...Enterprise Content Management in SharePoint 2010 inplace autotagging with ter...
Enterprise Content Management in SharePoint 2010 inplace autotagging with ter...
Ivan Sanders
 
Creating Business Intelligence With Share Point 2010
Creating Business Intelligence With Share Point 2010Creating Business Intelligence With Share Point 2010
Creating Business Intelligence With Share Point 2010
Ivan Sanders
 
SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...
SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...
SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...
Ivan Sanders
 
SharePoint 2010 Application Lifecycle Management
SharePoint 2010 Application Lifecycle ManagementSharePoint 2010 Application Lifecycle Management
SharePoint 2010 Application Lifecycle Management
Ivan Sanders
 
SharePoint Saturday Houston 2012
SharePoint Saturday Houston 2012SharePoint Saturday Houston 2012
SharePoint Saturday Houston 2012
Ivan Sanders
 
Creating Business Intelligence with SharePoint 2010
Creating Business Intelligence  with SharePoint 2010Creating Business Intelligence  with SharePoint 2010
Creating Business Intelligence with SharePoint 2010
Ivan Sanders
 
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
Ivan Sanders
 
SharePoint Intelligence Introduction To Share Point Designer Workflows
SharePoint Intelligence Introduction To Share Point Designer WorkflowsSharePoint Intelligence Introduction To Share Point Designer Workflows
SharePoint Intelligence Introduction To Share Point Designer Workflows
Ivan Sanders
 
SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...
SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...
SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...
Ivan Sanders
 
SharePoint Saturday NYC - Business Intelligence
SharePoint Saturday NYC - Business IntelligenceSharePoint Saturday NYC - Business Intelligence
SharePoint Saturday NYC - Business Intelligence
Ivan Sanders
 
SharePoint Saturday Sacramento Business Intelligence with SharePoint 2010
SharePoint Saturday Sacramento  Business Intelligence with SharePoint 2010SharePoint Saturday Sacramento  Business Intelligence with SharePoint 2010
SharePoint Saturday Sacramento Business Intelligence with SharePoint 2010
Ivan Sanders
 
Ep structured share point development - v.4
Ep   structured share point development - v.4Ep   structured share point development - v.4
Ep structured share point development - v.4
Ivan Sanders
 
Developer application lifecycle process and tools - v.5
Developer application lifecycle process and tools - v.5Developer application lifecycle process and tools - v.5
Developer application lifecycle process and tools - v.5
Ivan Sanders
 
SharePoint Connections Coast to Coast Developer Boot Camp Crash Course v3
SharePoint Connections Coast to Coast Developer Boot Camp Crash Course v3SharePoint Connections Coast to Coast Developer Boot Camp Crash Course v3
SharePoint Connections Coast to Coast Developer Boot Camp Crash Course v3
Ivan Sanders
 
Real world business workflow with SharePoint designer 2013
Real world business workflow with SharePoint designer 2013Real world business workflow with SharePoint designer 2013
Real world business workflow with SharePoint designer 2013
Ivan Sanders
 
Practical Business Intelligence with SharePoint 2013
Practical Business Intelligence with SharePoint 2013Practical Business Intelligence with SharePoint 2013
Practical Business Intelligence with SharePoint 2013
Ivan Sanders
 
SharePoint 2013 Business Intelligence Demos to build your businesss 2.0
SharePoint 2013 Business Intelligence Demos to build your businesss 2.0SharePoint 2013 Business Intelligence Demos to build your businesss 2.0
SharePoint 2013 Business Intelligence Demos to build your businesss 2.0
Ivan Sanders
 
Self-Service Business Intelligence in SharePoint 2013
Self-Service Business Intelligence in SharePoint 2013Self-Service Business Intelligence in SharePoint 2013
Self-Service Business Intelligence in SharePoint 2013
Ivan Sanders
 
Practical businerss intelligence in share point 2013
Practical businerss intelligence in share point 2013Practical businerss intelligence in share point 2013
Practical businerss intelligence in share point 2013
Ivan Sanders
 
San Fernando Valley SharePoint UserGroup Jully 11, 2012
San Fernando Valley SharePoint UserGroup Jully 11, 2012San Fernando Valley SharePoint UserGroup Jully 11, 2012
San Fernando Valley SharePoint UserGroup Jully 11, 2012
Ivan Sanders
 
Enterprise Content Management in SharePoint 2010 inplace autotagging with ter...
Enterprise Content Management in SharePoint 2010 inplace autotagging with ter...Enterprise Content Management in SharePoint 2010 inplace autotagging with ter...
Enterprise Content Management in SharePoint 2010 inplace autotagging with ter...
Ivan Sanders
 
Creating Business Intelligence With Share Point 2010
Creating Business Intelligence With Share Point 2010Creating Business Intelligence With Share Point 2010
Creating Business Intelligence With Share Point 2010
Ivan Sanders
 
SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...
SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...
SharePoint Saturday Orlando 2012 Creating Business Intelligence with SharePoi...
Ivan Sanders
 
SharePoint 2010 Application Lifecycle Management
SharePoint 2010 Application Lifecycle ManagementSharePoint 2010 Application Lifecycle Management
SharePoint 2010 Application Lifecycle Management
Ivan Sanders
 
SharePoint Saturday Houston 2012
SharePoint Saturday Houston 2012SharePoint Saturday Houston 2012
SharePoint Saturday Houston 2012
Ivan Sanders
 
Creating Business Intelligence with SharePoint 2010
Creating Business Intelligence  with SharePoint 2010Creating Business Intelligence  with SharePoint 2010
Creating Business Intelligence with SharePoint 2010
Ivan Sanders
 
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...SharePoint Intelligence Real World Business Workflow With Share Point Designe...
SharePoint Intelligence Real World Business Workflow With Share Point Designe...
Ivan Sanders
 
SharePoint Intelligence Introduction To Share Point Designer Workflows
SharePoint Intelligence Introduction To Share Point Designer WorkflowsSharePoint Intelligence Introduction To Share Point Designer Workflows
SharePoint Intelligence Introduction To Share Point Designer Workflows
Ivan Sanders
 
SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...
SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...
SharePoint Intelligence Extending Share Point Designer 2010 Workflows With Cu...
Ivan Sanders
 
SharePoint Saturday NYC - Business Intelligence
SharePoint Saturday NYC - Business IntelligenceSharePoint Saturday NYC - Business Intelligence
SharePoint Saturday NYC - Business Intelligence
Ivan Sanders
 
SharePoint Saturday Sacramento Business Intelligence with SharePoint 2010
SharePoint Saturday Sacramento  Business Intelligence with SharePoint 2010SharePoint Saturday Sacramento  Business Intelligence with SharePoint 2010
SharePoint Saturday Sacramento Business Intelligence with SharePoint 2010
Ivan Sanders
 
Ep structured share point development - v.4
Ep   structured share point development - v.4Ep   structured share point development - v.4
Ep structured share point development - v.4
Ivan Sanders
 
Developer application lifecycle process and tools - v.5
Developer application lifecycle process and tools - v.5Developer application lifecycle process and tools - v.5
Developer application lifecycle process and tools - v.5
Ivan Sanders
 
SharePoint Connections Coast to Coast Developer Boot Camp Crash Course v3
SharePoint Connections Coast to Coast Developer Boot Camp Crash Course v3SharePoint Connections Coast to Coast Developer Boot Camp Crash Course v3
SharePoint Connections Coast to Coast Developer Boot Camp Crash Course v3
Ivan Sanders
 

Recently uploaded (20)

Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
How to Switch Hosting Providers in Vancouver Without Any Downtime
How to Switch Hosting Providers in Vancouver Without Any DowntimeHow to Switch Hosting Providers in Vancouver Without Any Downtime
How to Switch Hosting Providers in Vancouver Without Any Downtime
steve198109
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
data science data stoger Presentation1.pptx
data science data stoger Presentation1.pptxdata science data stoger Presentation1.pptx
data science data stoger Presentation1.pptx
sandeepsherkhane830
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
Virtualization Trends Streamlining Operations in Telecom with David Bernard ...
Virtualization Trends  Streamlining Operations in Telecom with David Bernard ...Virtualization Trends  Streamlining Operations in Telecom with David Bernard ...
Virtualization Trends Streamlining Operations in Telecom with David Bernard ...
David Bernard Ezell
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
What's going on with IPv6? presented by Geoff Huston
What's going on with IPv6? presented by Geoff HustonWhat's going on with IPv6? presented by Geoff Huston
What's going on with IPv6? presented by Geoff Huston
APNIC
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
final project for icpna b08 if someone want.pptx
final project for icpna b08 if someone want.pptxfinal project for icpna b08 if someone want.pptx
final project for icpna b08 if someone want.pptx
ESTEFANOANDREYGARCIA
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
How to Switch Hosting Providers in Vancouver Without Any Downtime
How to Switch Hosting Providers in Vancouver Without Any DowntimeHow to Switch Hosting Providers in Vancouver Without Any Downtime
How to Switch Hosting Providers in Vancouver Without Any Downtime
steve198109
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
data science data stoger Presentation1.pptx
data science data stoger Presentation1.pptxdata science data stoger Presentation1.pptx
data science data stoger Presentation1.pptx
sandeepsherkhane830
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
Virtualization Trends Streamlining Operations in Telecom with David Bernard ...
Virtualization Trends  Streamlining Operations in Telecom with David Bernard ...Virtualization Trends  Streamlining Operations in Telecom with David Bernard ...
Virtualization Trends Streamlining Operations in Telecom with David Bernard ...
David Bernard Ezell
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
What's going on with IPv6? presented by Geoff Huston
What's going on with IPv6? presented by Geoff HustonWhat's going on with IPv6? presented by Geoff Huston
What's going on with IPv6? presented by Geoff Huston
APNIC
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
final project for icpna b08 if someone want.pptx
final project for icpna b08 if someone want.pptxfinal project for icpna b08 if someone want.pptx
final project for icpna b08 if someone want.pptx
ESTEFANOANDREYGARCIA
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 

O365 DEVCamp Los Angeles June 16, 2015 Module 06 Hook into SharePoint APIs with ANDFROID

Editor's Notes

  • #7: Android Studio is the current state-of-the-art for Android development. It is built on top of the IntelliJ IDEA IDE, a popular Java IDE developed by JetBrains. The editor will feel familiar for users of JetBrain’s popular ReSharper plugin for Visual Studio.
  • #8: Gradle makes the world go round. Dependencies can be pulled from e.g. Maven Central or jCenter. Android Studio automatically keeps it’s own project files in sync with the Gradle build files, so adding a dependency to a project is as simple as adding a line to the appropriate build.gradle file. The above line of code adds a dependency on the Active Directory Authentication Library for Android, a library maintained by MSOpenTech. The dependency is automatically downloaded in the background, so you immediately get autocomplete on all types in that library.
  • #9: Use the Android SDK manager to download different SDK Levels. The hands-on-lab will be targeting API Level 21 (Android 5.0.1 Lollipop), but should run fine on devices running API Levels as low as 18 (Android 4.3.1 KitKat).
  • #10: This is the high-level architecture of our app and the services which it consumes. Authentication is provided directly by Azure AD, via OAuth. After authentication, we communicate with the O365 SharePoint instance via its REST APIs.
  • #12: In this section we will look at authenticating an Android app with Azure AD using the Active Directory Library for Android
  • #14: ADAL simplifies authentication with Azure AD. Provides support for user authentication via sign-in (UI) or refresh tokens. Can be found on GitHub at https://github.com/AzureAD/azure-activedirectory-library-for-android
  • #15: This does require you to have access to the Azure Active Directory for your O365 Instance. You can do this by Adding a new Active Directory to your Azure Subscription, and selecting the “Use existing directory” option. After completing this step, creating the Application is simple – we cover that in the lab.
  • #16: First we must update the build.gradle file to include the ADAL. Android Studio will prompt you to Sync the changes to the Gradle file – this downloads the dependency and puts it in the right place for the IDE to find it, enabling autocompletion etc.
  • #17: Next we update the AndroidManifest.xml file with some permissions that ADAL requires (Internet/network permissions) We must also register the AuthenticationActivity activity which does the heavy-lifting of the OAuth flow. ADAL launches this activity which allows the user to enter their credentials.
  • #18: These basic code snippets must be added to your Activity class. Step 4 is only required if you intend to call mContext.acquireToken which will automatically launch an instance AuthenticationActivity. The onActivityResult function is invoked when that activity completes with a result.
  • #19: acquireToken launches the Oauth UI, and prompts the user to sign in with their O365 SharePoint credentials. The returned AuthenticationResult instance contains an Access Token (which will expire) and a Refresh Token. The refresh token will also eventually expire, but only after a much longer time. The callback argument is an instance of the AuthenticationCallback interface. Generally this is done using a Java Anonymous Class. The callback is invoked by mContext.onActivityResult from the previous slide, so it is important to call that if you are using this function. Note: ADAL automatically caches the access token and refresh token securely, so you don’t have to! It uses the Android secure keychain to do so.
  • #20: The callback argument is an instance of the AuthenticationCallback interface. Generally this is done using a Java Anonymous Class. Generally you will invoke acquireToken only when the user first starts the application, and then use acquireTokenSilently from then on. The ADAL automatically caches the Access Token and Refresh Token securely in the Android Keychain, and acquireTokenSilently attempts the following: Return the current Access Token (if still valid) Acquire a new Access Token using the current Refresh Token (if still valid) If this function fails, you must prompt the user to sign in using acquireToken. This function returns a new Access Token.
  • #21: In this pattern full authentication is only done on application startup. The Splash Screen here is the gateway to your app – the user must authenticate to continue. The app launches and starts the default activity or splash screen. The user clicks “sign in” button, which invokes acquireToken() The AuthenticationActivity is launched and the OAuth flow takes place – the user authenticates with Azure AD. The authentication result (an Access Token and a Refresh Token) is cached securely. The Access Token is returned to the app. The splash screen logic resumes and launches the next Activity. Finally, the splash screen calls finish() to remove itself from the activity stack.
  • #22: Next we write some code to support re-entrancy into potentially any location within the app. The user may at any time dismiss our app, do some work and then return to our app after their token has expired. In this situation we may need to refresh the Access Token or re-authenticate (or we may not). The user initiates some action (e.g. Refresh the current view) We first call acquireTokenSilently() to acquire an access token. We need to pass a callback because this function may asynchronously refresh the token. If the cached token is still valid then acquireTokenSilently returns it immediately and we continue with the API call (this may happen completely synchronously). Otherwise, the ADAL attempts to refresh the token using a cached refresh token. This happens asynchronously and requires an internet connection. If successful, we continue with the API call. If the refresh operation fails, then we must prompt the user to let them know, and restart the app so that they may authenticate again. We can wrap all of this behaviour into a few helper methods.
  • #23: Demo the authentication flow in StartActivity. Demo the refresh token handling code in AuthUtil.ensureAuthenticated, DefaultAuthHandler and the two activites ListTasksActivity and EditTaskActivity.
  • #27: The O365 SDK takes care of setting headers, serialization etc. Queries are automatically executed asynchronously on a background thread, so library functions may be safely called from the UI thread. Can be found on GitHub at https://github.com/OfficeDev/Office-365-SDK-for-Android.
  • #28: To use the SDK… Create am OAuthCredentials object from the Access Token obtained using ADAL (you must already be authenticated to use this class). Create an instance of ListClient. This class allows you to query and update SharePoint lists. This library supports: Authentication via Azure AD with OAuthCredentials Basic authentication with BasicAuthenticationCredentials Cookie authentication with CookieCredentials
  • #29: This simple code queries sharepoint for all Lists with the title “My List”. The object returned is a Future, also known as a Promise, which will be resolved when the call completes and the data is available. This means that the getLists call is non-blocking and can be safely used from the UI thread. Warning! The final line calls ListenableFuture.get(), which blocks the current thread until the results are available. Do no use this on the UI thread!
  • #30: This simple code queries sharepoint for all list items in the list with the name “My List”. The object returned is a Future, also known as a Promise, which will be resolved when the call completes and the data is available. This means that the getListItems call is non-blocking and can be safely used from the UI thread. Warning! The final line calls ListenableFuture.get(), which blocks the current thread until the results are available. Do no use this on the UI thread!
  • #31: Demo the sharepoint data access code in TaskListItemDataSource. Note that these functions are blocking and can only safely be called from a background thread!