SlideShare a Scribd company logo
Mobile First 
Oracle’s ADF Mobile Framework 
AMIS Enterprise to Mobility Oracle ADF Conference, Nieuwegein, May 21st 2014
Who Am I 
• Luc Bors 
• Principal Consultant 
• AMIS, Netherlands
Agenda 
• ADF Mobile Overview 
• Preparing for Development 
• Creating your ADF Mobile Application 
• Building the UI 
• Data (and) Services 
• Device Interaction 
• Push Notifications 
• Stuff I cannot talk about (but Chris can)
Oracle ADF Mobile 
• Build Once, Run on Multiple-Platforms – Phones, Tablets, iOS, Android, … 
• Java for business logic 
• HTML5/JavaScript user interface 
• Consistent business logic & data model 
• Disconnected: SQLite with encryption 
• Full access to native device features 
• Modular, reusable application components 
• JDeveloper and soon Eclipse
Native Mobile User Experience 
• Device native user experience 
• Spring board and tab bar for feature navigation 
• Advanced HTML5-based UI 
• Full animation, gesture, and touch interaction support 
• Interactive Data Visualization Components 
• Device Interaction using Cordova
ADF Mobile Overview 
Device 
Native 
Container 
SQLite 
Database 
Java 
VM 
Configuration 
Server 
Business 
Logic 
Model 
JDBC 
Apache 
Cordova 
SQLite 
Web 
View 
Server 
HTML 
HTML5 
and 
Javascript 
Presentation 
AMX 
View 
Local 
HTML 
Controller 
Push 
Handler 
Server 
Generated 
HTML 
APN/GCM 
Push 
Services 
SOAP 
and 
REST 
Services 
Device 
Services 
App 
Config 
Credential 
Management 
SSO 
and 
Access 
Control
Development Environment 
• Development Machine: 
– Mac is required if you intend to support iOS devices 
• Mobile development SDKs and simulators 
– Used by JDeveloper to compile device native 
binaries 
• Mobile developer program membership 
– Needed to deploy to an actual device 
• Install JDev and download/install the 
ADF Mobile extension 
• Configure ADF Mobile extension preferences
JDeveloper Configuration
ADF Mobile Deployment
ADF Mobile Application Config 
• Feature configuration 
– Constraints 
– Content 
– Feature Level Preferences 
– Security 
• Application configuration 
– Configuration (ALCL) 
– Available Features 
– Application Level Preferences 
– Security
ADF Mobile Features 
•
ADF mobile – UI content 
• Local AMX File 
– JSF-like file built visually in JDeveloper 
– Generated into HTML/JS on device at RT 
– Based on HTML5 
• Remote URL 
– ADF Trinidad for Smartphones 
– ADF Faces on Tablets 
– Any third-party site 
• Local HTML File 
– Hand-coded HTML5 pages
AMX View and Controller 
Device 
Native 
Container 
SQLite 
Database 
Java 
VM 
Configuration 
Server 
Business 
Logic 
Model 
JDBC 
Apache 
Cordova 
SQLite 
Web 
View 
Server 
HTML 
HTML5 
and 
Javascript 
Presentation 
AMX 
View 
Local 
HTML 
Controller 
Push 
Handler 
Server 
Generated 
HTML 
APN/GCM 
Push 
Services 
SOAP 
and 
REST 
Services 
Device 
Services 
App 
Config 
Credential 
Management 
SSO 
and 
Access 
Control
Building AMX Pages 
•
Building AMX Pages
Using Layout Components
Swimming-lanes 
• Make all ‘content’ available in a continuously 
scrolling swimlane 
• Use panelGroupLayout 
– Width 100% 
<amx:panelGroupLayout layout="horizontal” 
inlineStyle="width:100%;">"
Device info and Properties 
• Device info 
• Device Properties
Work With Form Factors 
• Respond to Form Factors 
• Conditionally Render Different content
Gesture Support 
• You can configure Button, Link, and List Item components to react to the 
following gestures: 
• Swipe to the right 
• Swipe to the left 
• Swipe up 
• Swipe down 
• Tap-and-hold
Gesture examples 
• The Swipe Gesture 
<amx:actionListener binding="#{mybean.DoX}" 
• The Tap Gesture 
type="swipeRight"/> 
<amx:showPopupBehavior popupid="pop1" 
type="tapHold“ />
Navigation (Declarative) 
• Declarative Navigation 
– Button/Link/ListItem 
<amx:listItem id="li1" action="detail" showLinkIcon="true">" 
<amx:setPropertyListener id="x" from="#{row.rowKey}” 
to="#{pageFlowScope.myBean.currentStadium}" " 
type="action"/>"
Navigation (Programmatic) 
• Declarative Navigation 
– Button/Link/ListItem 
• Programmatic Navigation 
– JavaCode 
AdfmfContainerUtilities.invokeContainerJavaScriptFunction(" 
AdfmfJavaUtilities.getFeatureName(), " 
"adf.mf.api.amx.doNavigation", " 
new Object[] { ”detail" }); 
} "
Controlling your application 
• Springboard configuration in adfmf-application.xml
The Default Springboard
The Custom SpringBoard
Configuring the springboard
Feature Archives 
• Feature Archives can be reused 
• Deploy ADF Mobile app as FAR 
• Consume features from FAR in other apps
Server HTML (Remote URL) 
Device 
Native 
Container 
SQLite 
Database 
Java 
VM 
Configuration 
Server 
Business 
Logic 
Model 
JDBC 
Apache 
Cordova 
SQLite 
Web 
View 
Server 
HTML 
HTML5 
and 
Javascript 
Presentation 
AMX 
View 
Local 
HTML 
Controller 
Push 
Handler 
Server 
Generated 
HTML 
APN/GCM 
Push 
Services 
SOAP 
and 
REST 
Services 
Device 
Services 
App 
Config 
Credential 
Management 
SSO 
and 
Access 
Control
Remote URLs 
• For embedding existing web pages in your 
ADF Mobile app. 
• For instance: 
– News Website 
– Existing enterprise app Mobile Browser Pages 
• Note: 
– Best use Optimized Mobile Browser Pages 
– Apache Trinidad components 
– Oracle recommends using ADF Mobile browser
Feature as Remote URL 
• Create New Feature as 
Remote URL 
• Create URL Connection
Whitelisting 
• Why do we need to do this ? 
• Mobile device is 
redirected to m.uefa.com
Device Interaction 
Device 
Native 
Container 
SQLite 
Database 
Java 
VM 
Configuration 
Server 
Business 
Logic 
Model 
JDBC 
Apache 
Cordova 
SQLite 
Web 
View 
Server 
HTML 
HTML5 
and 
Javascript 
Presentation 
AMX 
View 
Local 
HTML 
Controller 
Push 
Handler 
Server 
Generated 
HTML 
APN/GCM 
Push 
Services 
SOAP 
and 
REST 
Services 
Device 
Services 
App 
Config 
Credential 
Management 
SSO 
and 
Access 
Control
Device Interaction 
• The Device Datacontrol 
• Drag n Drop support 
• Attributes as fields 
• Operations as buttons 
• Or as a link
Behind the scenes 
• Now where is the catch ?
Camera interaction 
• Take a picture …………… 
import oracle.adf.model.datacontrols.device; 
DeviceManager dm = DeviceManagerFactory.getDeviceManager(); 
if (dm.hasCamera){ 
dm.getPicture( 
100, 
DeviceManager.CAMERA_DESTINATIONTYPE_FILE_URI, 
DeviceManager.CAMERA_SOURCETYPE_CAMERA, 
false, 
DeviceManager.CAMERA_ENCODINGTYPE_PNG, 
200, 
200); 
• …… or get one from the Library 
} 
DeviceManager.CAMERA_SOURCETYPE__PHOTOLIBRARY
Data (and) Services 
Device 
Native 
Container 
SQLite 
Database 
Java 
VM 
Configuration 
Server 
Business 
Logic 
Model 
JDBC 
Apache 
Cordova 
SQLite 
Web 
View 
Server 
HTML 
HTML5 
and 
Javascript 
Presentation 
AMX 
View 
Local 
HTML 
Controller 
Push 
Handler 
Server 
Generated 
HTML 
APN/GCM 
Push 
Services 
SOAP 
and 
REST 
Services 
Device 
Services 
App 
Config 
Credential 
Management 
SSO 
and 
Access 
Control
Using Webservices 
• The Webservice Datacontrol for SOAP-XML and REST-XML
Using Webservices directly 
• Just drag & drop the method from the Data Control
Using Webservices from Java 
• Invoke directly from java. 
• Does not use the page Definition 
• Uses Framework utilityMethod 
• AdfmfJavaUtilities.invokeDataControlMethod() 
• Datacontrol must be in available in DataBindings.cpx
Advantages 
• Provides more flexibility to shape model to mobile UI 
• Perform client side validation 
• Minimize the number of round trips 
• Offline caching à Pay attention to Stevens Presentation later today ! 
• Mash-up data from multiple services
Patterns… 
• SOAP/REST XML Webservice 
– Needs WebServiceDataControl and invokeDataControlMethod()
Patterns… 
• REST-JSON Webservice 
– Needs URL Connection and RestServiceAdapter
Patterns…. 
• SQLiteDatabase 
– Needs Plain JDBC
Obviously all the same…… 
• Service Object Data Control Pattern 
– Whatever “back end” data source you use….. 
– It is completely transparent for your UI
Push Notifications 
Device 
Native 
Container 
SQLite 
Database 
Java 
VM 
Configuration 
Server 
Business 
Logic 
Model 
JDBC 
Apache 
Cordova 
SQLite 
Web 
View 
Server 
HTML 
HTML5 
and 
Javascript 
Presentation 
AMX 
View 
Local 
HTML 
Controller 
Push 
Handler 
Server 
Generated 
HTML 
APN/GCM 
Push 
Services 
SOAP 
and 
REST 
Services 
Device 
Services 
App 
Config 
Credential 
Management 
SSO 
and 
Access 
Control
Push Notifications 
•
Push Notifications 
• Subscribe to Messaging Service 
• Receive token 
• Register with Enterprise app 
• Enterprise app Pushes message to 
Messaging Service 
• Messaging Service delegates 
message to device(s)
Start The ADF Mobile App 
• ApplicationLifeCycleListener 
– In the Start() Method create a new PushNotificationListener() 
public void start() { 
// Add code here... 
EventSource evtSource = 
EventSourceFactory.getEventSource( 
NativePushNotificationEventSource. 
NATIVE_PUSH_NOTIFICATION_REMOTE_EVENT_SOURCE_NAME); 
evtSource.addListener(new PushNotificationListener()); 
}
Open the application 
• In the PushNotificationListener 
– OnOpen() // receive token 
– OnMessage() // handle notification 
– OnError() 
public void onOpen(String token) { 
// Invoked during the Push Notification registration process. 
// The parameter "token" contains the token received from APNs or GCMs 
// that uniquely identifies a specific device-application combination. 
ValueExpression ve = AdfmfJavaUtilities.getValueExpression( 
"#{applicationScope.deviceToken}", String.class); 
if (token != null){ 
ve.setValue(AdfmfJavaUtilities.getAdfELContext(), token); 
} 
else{ 
ve.setValue(AdfmfJavaUtilities.getAdfELContext(), "dummy Token"); 
} 
}
Working with the Notification 
public void onMessage(Event event) { 
PayloadServiceResponse serviceResponse = 
(PayloadServiceResponse)jsonHelper.fromJSON( 
PayloadServiceResponse.class, event.getPayload()); 
String message = serviceResponse.getCustomMessage(); 
ValueExpression notificationPayloadBinding = 
AdfmfJavaUtilities.getValueExpression( 
"#{applicationScope.notificationSessionId}", String.class); 
ValueExpression ve = AdfmfJavaUtilities.getValueExpression( 
"#{applicationScope.notified}", Boolean.class); 
ve.setValue(AdfmfJavaUtilities.getAdfELContext(), Boolean.TRUE); 
// also, lets decrease the application icon badge by one 
int currentBadge = 
AdfmfContainerUtilities.getApplicationIconBadgeNumber(); 
if (currentBadge > 0){ 
AdfmfContainerUtilities. 
setApplicationIconBadgeNumber(currentBadge - 1); 
} 
AdfmfContainerUtilities.gotoFeature( 
"com.tamcapp.mobilebook.ses.ConferenceSessions"); 
} 
}
Example 
• Select device 
• Send message 
• Get notified
Nothing more I can say……

More Related Content

PDF
Oracle MAF real life OOW.pptx
PDF
ADF Mobile: 10 Things you don't get from the developers guide
PDF
jQuery Mobile and JavaScript
PDF
Rich Portlet Development in uPortal
PDF
ADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
PDF
How to disassemble one monster app into an ecosystem of 30
KEY
Javascript Frameworks for Well Architected, Immersive Web Apps
PDF
Medium TechTalk — iOS
Oracle MAF real life OOW.pptx
ADF Mobile: 10 Things you don't get from the developers guide
jQuery Mobile and JavaScript
Rich Portlet Development in uPortal
ADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
How to disassemble one monster app into an ecosystem of 30
Javascript Frameworks for Well Architected, Immersive Web Apps
Medium TechTalk — iOS

What's hot (20)

PDF
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
PDF
HTML5 and CSS3 refresher
PPT
Atlas Php
PDF
Real Life MAF (2.2) Oracle Open World 2015
PPTX
Externalizing Authorization in Micro Services world
PDF
StrongLoop Node.js API Security & Customization
PPTX
World Azure Day Mobile Services Presentation
PPTX
Distributed Parcel Tracking/Management System Overview
PDF
Hastening React SSR - Web Performance San Diego
PPTX
.NET Fest 2017. Matteo Pagani. Prism and Xamarin Forms: create cross-platform...
PDF
Local storage in Web apps
PDF
HTML5: the new frontier of the web
PDF
Intro to emberjs
PDF
WAI-ARIA
PPTX
SPSNH 2014 - The SharePoint & jQueryGuide
PPTX
Session 5#
PDF
Serverless Apps with AWS Step Functions
PPTX
Advanced SharePoint Web Part Development
PPTX
Client side development with knockout.js
KEY
Templates
Building Multi-Tenant and SaaS products in PHP - CloudConf 2015
HTML5 and CSS3 refresher
Atlas Php
Real Life MAF (2.2) Oracle Open World 2015
Externalizing Authorization in Micro Services world
StrongLoop Node.js API Security & Customization
World Azure Day Mobile Services Presentation
Distributed Parcel Tracking/Management System Overview
Hastening React SSR - Web Performance San Diego
.NET Fest 2017. Matteo Pagani. Prism and Xamarin Forms: create cross-platform...
Local storage in Web apps
HTML5: the new frontier of the web
Intro to emberjs
WAI-ARIA
SPSNH 2014 - The SharePoint & jQueryGuide
Session 5#
Serverless Apps with AWS Step Functions
Advanced SharePoint Web Part Development
Client side development with knockout.js
Templates
Ad

Viewers also liked (11)

PPTX
Government
PPT
SpeakAsia Presentation
ODP
Python dev tool introduction
PPS
Career Showcase
PPTX
Changing lives through food.pdf
PDF
Kanguru burger
PDF
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADF
PDF
Oracle ADF Mobile OGh (Oracle User Group Netherlands)
PPTX
Real life-maf-2015
PDF
Reaching out from ADF Mobile (ODTUG KScope 2014)
PDF
Continuous Delivery 持續交付
Government
SpeakAsia Presentation
Python dev tool introduction
Career Showcase
Changing lives through food.pdf
Kanguru burger
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADF
Oracle ADF Mobile OGh (Oracle User Group Netherlands)
Real life-maf-2015
Reaching out from ADF Mobile (ODTUG KScope 2014)
Continuous Delivery 持續交付
Ad

Similar to amis-adf-enterprise-mobility (20)

PDF
ADF Mobile: 10 Things you don't get from the developers guide - Luc Bors
PDF
ADF Mobile: Best Practices for Developing Applications with Oracle ADF Mobile...
PPTX
Connecting Xamarin Apps with IBM Worklight in Bluemix
 
KEY
Intro To webOS
PPTX
Ibm xamarin gtruty
PPTX
HTML5 on Mobile
PPTX
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
PPTX
ADF Mobile - an intro for Developers
PPTX
ADF and JavaScript - AMIS SIG, July 2017
KEY
An Introduction to webOS
PPTX
iOS and Android apps automation
PDF
The future of web development write once, run everywhere with angular js an...
PPTX
The future of web development write once, run everywhere with angular.js and ...
PPTX
Cross platform mobile app development with Xamarin
PPTX
Intro to node and mongodb 1
PDF
Building iPad apps with Flex - 360Flex
PDF
AWS Step Functions을 활용한 서버리스 앱 오케스트레이션
PPT
SUE AGILE Framework (English)
PPTX
An Application Centric Approach to Devops
PPTX
App innovationcircles xamarin
ADF Mobile: 10 Things you don't get from the developers guide - Luc Bors
ADF Mobile: Best Practices for Developing Applications with Oracle ADF Mobile...
Connecting Xamarin Apps with IBM Worklight in Bluemix
 
Intro To webOS
Ibm xamarin gtruty
HTML5 on Mobile
SenchaCon 2016: A Look Ahead: Survey Next-Gen Modern Browser APIs - Shikhir S...
ADF Mobile - an intro for Developers
ADF and JavaScript - AMIS SIG, July 2017
An Introduction to webOS
iOS and Android apps automation
The future of web development write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular.js and ...
Cross platform mobile app development with Xamarin
Intro to node and mongodb 1
Building iPad apps with Flex - 360Flex
AWS Step Functions을 활용한 서버리스 앱 오케스트레이션
SUE AGILE Framework (English)
An Application Centric Approach to Devops
App innovationcircles xamarin

More from Luc Bors (19)

PDF
Talk to me Goose: Going beyond your regular Chatbot
PDF
Extending Oracle SaaS Using Oracle Cloud UX Rapid Development Kit
PDF
NO CODE : Or How to Extend Oracle SaaS with Oracle Visual Builder Cloud Service
PDF
Real life-maf-2015-k scope-final
PDF
ADF Essentials (KScope14)
PDF
OgH Data Visualization Special Part III
PDF
OgH Data Visualization Special Part II
PDF
OgH Data Visualization Special Part I
PDF
MAF push notifications
PDF
Doag wysiwyg
PDF
Oracle day 2014-mobile-customer-case
PDF
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
PPTX
oow2013-adf-mo-bi-le
PDF
Goodbye Nightmare : Tops and Tricks for creating Layouts
PDF
Real life forms to adf
PPTX
How to Bring Common UI Patterns to ADF
PPTX
An ADF Special Report
PPTX
...and thus your forms automagically disappeared
PPTX
Odtug2011 adf developers make the database work for you
Talk to me Goose: Going beyond your regular Chatbot
Extending Oracle SaaS Using Oracle Cloud UX Rapid Development Kit
NO CODE : Or How to Extend Oracle SaaS with Oracle Visual Builder Cloud Service
Real life-maf-2015-k scope-final
ADF Essentials (KScope14)
OgH Data Visualization Special Part III
OgH Data Visualization Special Part II
OgH Data Visualization Special Part I
MAF push notifications
Doag wysiwyg
Oracle day 2014-mobile-customer-case
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
oow2013-adf-mo-bi-le
Goodbye Nightmare : Tops and Tricks for creating Layouts
Real life forms to adf
How to Bring Common UI Patterns to ADF
An ADF Special Report
...and thus your forms automagically disappeared
Odtug2011 adf developers make the database work for you

Recently uploaded (20)

PPTX
A Presentation on Touch Screen Technology
PDF
Hybrid model detection and classification of lung cancer
PDF
project resource management chapter-09.pdf
PPTX
Chapter 5: Probability Theory and Statistics
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Hindi spoken digit analysis for native and non-native speakers
PPTX
A Presentation on Artificial Intelligence
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Approach and Philosophy of On baking technology
PDF
August Patch Tuesday
PPTX
Tartificialntelligence_presentation.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Zenith AI: Advanced Artificial Intelligence
A Presentation on Touch Screen Technology
Hybrid model detection and classification of lung cancer
project resource management chapter-09.pdf
Chapter 5: Probability Theory and Statistics
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Assigned Numbers - 2025 - Bluetooth® Document
Hindi spoken digit analysis for native and non-native speakers
A Presentation on Artificial Intelligence
A comparative study of natural language inference in Swahili using monolingua...
Approach and Philosophy of On baking technology
August Patch Tuesday
Tartificialntelligence_presentation.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Getting Started with Data Integration: FME Form 101
WOOl fibre morphology and structure.pdf for textiles
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Transform Your ITIL® 4 & ITSM Strategy with AI in 2025.pdf
A comparative analysis of optical character recognition models for extracting...
NewMind AI Weekly Chronicles - August'25-Week II
Zenith AI: Advanced Artificial Intelligence

amis-adf-enterprise-mobility

  • 1. Mobile First Oracle’s ADF Mobile Framework AMIS Enterprise to Mobility Oracle ADF Conference, Nieuwegein, May 21st 2014
  • 2. Who Am I • Luc Bors • Principal Consultant • AMIS, Netherlands
  • 3. Agenda • ADF Mobile Overview • Preparing for Development • Creating your ADF Mobile Application • Building the UI • Data (and) Services • Device Interaction • Push Notifications • Stuff I cannot talk about (but Chris can)
  • 4. Oracle ADF Mobile • Build Once, Run on Multiple-Platforms – Phones, Tablets, iOS, Android, … • Java for business logic • HTML5/JavaScript user interface • Consistent business logic & data model • Disconnected: SQLite with encryption • Full access to native device features • Modular, reusable application components • JDeveloper and soon Eclipse
  • 5. Native Mobile User Experience • Device native user experience • Spring board and tab bar for feature navigation • Advanced HTML5-based UI • Full animation, gesture, and touch interaction support • Interactive Data Visualization Components • Device Interaction using Cordova
  • 6. ADF Mobile Overview Device Native Container SQLite Database Java VM Configuration Server Business Logic Model JDBC Apache Cordova SQLite Web View Server HTML HTML5 and Javascript Presentation AMX View Local HTML Controller Push Handler Server Generated HTML APN/GCM Push Services SOAP and REST Services Device Services App Config Credential Management SSO and Access Control
  • 7. Development Environment • Development Machine: – Mac is required if you intend to support iOS devices • Mobile development SDKs and simulators – Used by JDeveloper to compile device native binaries • Mobile developer program membership – Needed to deploy to an actual device • Install JDev and download/install the ADF Mobile extension • Configure ADF Mobile extension preferences
  • 10. ADF Mobile Application Config • Feature configuration – Constraints – Content – Feature Level Preferences – Security • Application configuration – Configuration (ALCL) – Available Features – Application Level Preferences – Security
  • 12. ADF mobile – UI content • Local AMX File – JSF-like file built visually in JDeveloper – Generated into HTML/JS on device at RT – Based on HTML5 • Remote URL – ADF Trinidad for Smartphones – ADF Faces on Tablets – Any third-party site • Local HTML File – Hand-coded HTML5 pages
  • 13. AMX View and Controller Device Native Container SQLite Database Java VM Configuration Server Business Logic Model JDBC Apache Cordova SQLite Web View Server HTML HTML5 and Javascript Presentation AMX View Local HTML Controller Push Handler Server Generated HTML APN/GCM Push Services SOAP and REST Services Device Services App Config Credential Management SSO and Access Control
  • 17. Swimming-lanes • Make all ‘content’ available in a continuously scrolling swimlane • Use panelGroupLayout – Width 100% <amx:panelGroupLayout layout="horizontal” inlineStyle="width:100%;">"
  • 18. Device info and Properties • Device info • Device Properties
  • 19. Work With Form Factors • Respond to Form Factors • Conditionally Render Different content
  • 20. Gesture Support • You can configure Button, Link, and List Item components to react to the following gestures: • Swipe to the right • Swipe to the left • Swipe up • Swipe down • Tap-and-hold
  • 21. Gesture examples • The Swipe Gesture <amx:actionListener binding="#{mybean.DoX}" • The Tap Gesture type="swipeRight"/> <amx:showPopupBehavior popupid="pop1" type="tapHold“ />
  • 22. Navigation (Declarative) • Declarative Navigation – Button/Link/ListItem <amx:listItem id="li1" action="detail" showLinkIcon="true">" <amx:setPropertyListener id="x" from="#{row.rowKey}” to="#{pageFlowScope.myBean.currentStadium}" " type="action"/>"
  • 23. Navigation (Programmatic) • Declarative Navigation – Button/Link/ListItem • Programmatic Navigation – JavaCode AdfmfContainerUtilities.invokeContainerJavaScriptFunction(" AdfmfJavaUtilities.getFeatureName(), " "adf.mf.api.amx.doNavigation", " new Object[] { ”detail" }); } "
  • 24. Controlling your application • Springboard configuration in adfmf-application.xml
  • 28. Feature Archives • Feature Archives can be reused • Deploy ADF Mobile app as FAR • Consume features from FAR in other apps
  • 29. Server HTML (Remote URL) Device Native Container SQLite Database Java VM Configuration Server Business Logic Model JDBC Apache Cordova SQLite Web View Server HTML HTML5 and Javascript Presentation AMX View Local HTML Controller Push Handler Server Generated HTML APN/GCM Push Services SOAP and REST Services Device Services App Config Credential Management SSO and Access Control
  • 30. Remote URLs • For embedding existing web pages in your ADF Mobile app. • For instance: – News Website – Existing enterprise app Mobile Browser Pages • Note: – Best use Optimized Mobile Browser Pages – Apache Trinidad components – Oracle recommends using ADF Mobile browser
  • 31. Feature as Remote URL • Create New Feature as Remote URL • Create URL Connection
  • 32. Whitelisting • Why do we need to do this ? • Mobile device is redirected to m.uefa.com
  • 33. Device Interaction Device Native Container SQLite Database Java VM Configuration Server Business Logic Model JDBC Apache Cordova SQLite Web View Server HTML HTML5 and Javascript Presentation AMX View Local HTML Controller Push Handler Server Generated HTML APN/GCM Push Services SOAP and REST Services Device Services App Config Credential Management SSO and Access Control
  • 34. Device Interaction • The Device Datacontrol • Drag n Drop support • Attributes as fields • Operations as buttons • Or as a link
  • 35. Behind the scenes • Now where is the catch ?
  • 36. Camera interaction • Take a picture …………… import oracle.adf.model.datacontrols.device; DeviceManager dm = DeviceManagerFactory.getDeviceManager(); if (dm.hasCamera){ dm.getPicture( 100, DeviceManager.CAMERA_DESTINATIONTYPE_FILE_URI, DeviceManager.CAMERA_SOURCETYPE_CAMERA, false, DeviceManager.CAMERA_ENCODINGTYPE_PNG, 200, 200); • …… or get one from the Library } DeviceManager.CAMERA_SOURCETYPE__PHOTOLIBRARY
  • 37. Data (and) Services Device Native Container SQLite Database Java VM Configuration Server Business Logic Model JDBC Apache Cordova SQLite Web View Server HTML HTML5 and Javascript Presentation AMX View Local HTML Controller Push Handler Server Generated HTML APN/GCM Push Services SOAP and REST Services Device Services App Config Credential Management SSO and Access Control
  • 38. Using Webservices • The Webservice Datacontrol for SOAP-XML and REST-XML
  • 39. Using Webservices directly • Just drag & drop the method from the Data Control
  • 40. Using Webservices from Java • Invoke directly from java. • Does not use the page Definition • Uses Framework utilityMethod • AdfmfJavaUtilities.invokeDataControlMethod() • Datacontrol must be in available in DataBindings.cpx
  • 41. Advantages • Provides more flexibility to shape model to mobile UI • Perform client side validation • Minimize the number of round trips • Offline caching à Pay attention to Stevens Presentation later today ! • Mash-up data from multiple services
  • 42. Patterns… • SOAP/REST XML Webservice – Needs WebServiceDataControl and invokeDataControlMethod()
  • 43. Patterns… • REST-JSON Webservice – Needs URL Connection and RestServiceAdapter
  • 44. Patterns…. • SQLiteDatabase – Needs Plain JDBC
  • 45. Obviously all the same…… • Service Object Data Control Pattern – Whatever “back end” data source you use….. – It is completely transparent for your UI
  • 46. Push Notifications Device Native Container SQLite Database Java VM Configuration Server Business Logic Model JDBC Apache Cordova SQLite Web View Server HTML HTML5 and Javascript Presentation AMX View Local HTML Controller Push Handler Server Generated HTML APN/GCM Push Services SOAP and REST Services Device Services App Config Credential Management SSO and Access Control
  • 48. Push Notifications • Subscribe to Messaging Service • Receive token • Register with Enterprise app • Enterprise app Pushes message to Messaging Service • Messaging Service delegates message to device(s)
  • 49. Start The ADF Mobile App • ApplicationLifeCycleListener – In the Start() Method create a new PushNotificationListener() public void start() { // Add code here... EventSource evtSource = EventSourceFactory.getEventSource( NativePushNotificationEventSource. NATIVE_PUSH_NOTIFICATION_REMOTE_EVENT_SOURCE_NAME); evtSource.addListener(new PushNotificationListener()); }
  • 50. Open the application • In the PushNotificationListener – OnOpen() // receive token – OnMessage() // handle notification – OnError() public void onOpen(String token) { // Invoked during the Push Notification registration process. // The parameter "token" contains the token received from APNs or GCMs // that uniquely identifies a specific device-application combination. ValueExpression ve = AdfmfJavaUtilities.getValueExpression( "#{applicationScope.deviceToken}", String.class); if (token != null){ ve.setValue(AdfmfJavaUtilities.getAdfELContext(), token); } else{ ve.setValue(AdfmfJavaUtilities.getAdfELContext(), "dummy Token"); } }
  • 51. Working with the Notification public void onMessage(Event event) { PayloadServiceResponse serviceResponse = (PayloadServiceResponse)jsonHelper.fromJSON( PayloadServiceResponse.class, event.getPayload()); String message = serviceResponse.getCustomMessage(); ValueExpression notificationPayloadBinding = AdfmfJavaUtilities.getValueExpression( "#{applicationScope.notificationSessionId}", String.class); ValueExpression ve = AdfmfJavaUtilities.getValueExpression( "#{applicationScope.notified}", Boolean.class); ve.setValue(AdfmfJavaUtilities.getAdfELContext(), Boolean.TRUE); // also, lets decrease the application icon badge by one int currentBadge = AdfmfContainerUtilities.getApplicationIconBadgeNumber(); if (currentBadge > 0){ AdfmfContainerUtilities. setApplicationIconBadgeNumber(currentBadge - 1); } AdfmfContainerUtilities.gotoFeature( "com.tamcapp.mobilebook.ses.ConferenceSessions"); } }
  • 52. Example • Select device • Send message • Get notified
  • 53. Nothing more I can say……