Real Life ADF Mobile. 10 things that you don't get from the developer guide

Similar documents
Copyright 2014, Oracle and/or its affiliates. All rights reserved.

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Take Your Oracle Forms on the Road Using ADF Mobile. Mia Urman, OraPlayer & Denis Tyrell, Oracle Corporation

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Developing Cross Device Mobile Applications

Copyright 2014, Oracle and/or its affiliates. All rights reserved.

1Z0-441

Oracle Mobile Application Framework

Oracle Exam 1z0-441 Oracle Mobile Development 2015 Essentials Version: 6.0 [ Total Questions: 85 ]

EXTENDING YOUR HCM CLOUD SELF SERVICE IS AS SIMPLE AS

Strategies for Running Oracle Forms from Mobile Devices and Tablets.

Connect and Transform Your Digital Business with IBM

ADF Mobile Code Corner

ADF Mobile Code Corner

Copyright 2012, Oracle and/or its affiliates. All rights reserved.

Build a Mobile App in 60 Minutes with MAF

ADF Mobile Code Corner

Build a Mobile App in 60 Minutes with MAF

BUILDING HYBRID MOBILE APPS WITH ORACLE JET

Mobilize Your Users Now with Oracle Mobile Application Framework (MAF)

Administering Jive Mobile Apps

Mobile Application Development: Introducing ADF Mobile Native Client Framework

ADF Mobile : Data Services Java Beans. Ma Ping

<Insert Picture Here> ADF Mobile zentrale Applikationen auf jedem Smartphone

Mobile Application Development

CHAPTER. Introduction to Mobile Application Development

Is your JavaScript ready for the Enterprise? What does that even mean?

WebSphere Puts Business In Motion. Put People In Motion With Mobile Apps

Oracle Forms and Oracle APEX The Odd Couple

<Insert Picture Here> Advanced ADF Faces. Frank Nimphius Principal Product Manager

Introduction to Worklight Integration IBM Corporation

Oracle Corporation

Oracle Retail Accelerators for WebLogic Server 11g

Build Mobile Cloud Apps Effectively Using Oracle Mobile Cloud Services (MCS)

Liferay Security Features Overview. How Liferay Approaches Security

Salesforce Classic Mobile Guide for iphone

FAQs. A guide for school app administrators

<Insert Picture Here>

Barracuda Networks Android Mobile Application

1 Copyright 2011, Oracle and/or its affiliates. All rights reserved.

ADF Code Corner How-to declaratively build a master-detail behavior with DVT components. Abstract: twitter.com/adfcodecorner

Agylia Mobile Learning App Feature Summary

BPM + Mobile Building a hybrid mobile app for BPM IBM Corporation

The Tie That Binds: An Introduction to ADF Bindings

Mastering Oracle ADF Task Flows. Frank Nimphius Principal Product Manager Oracle JDeveloper / ADF

SCRIPT REFERENCE. UBot Studio Version 4. The Browser Commands

MOBILIZE YOUR ENTERPRISE WITH TELERIK SOLUTIONS

Application / Document Management. MaaS360 e-learning Portal Course 3

Active Endpoints. ActiveVOS Platform Architecture Active Endpoints

Copyright 2012, Oracle and/or its affiliates. All rights reserved. Insert Information Protection Policy Classification from Slide 13

CLIENT SERVER ARCHITECTURE:

Administering Jive Mobile Apps for ios and Android

Java Enterprise Edition

Deploying VMware Workspace ONE Intelligent Hub. October 2018 VMware Workspace ONE

User Guide. Version 1.0.2

Oracle Fusion Developer Guide (ISBN: ) Preview Chapter 1. The Quick Lerner s Guide to Oracle Fusion Web Application Development PREVIEW

1z0-479 oracle. Number: 1z0-479 Passing Score: 800 Time Limit: 120 min.

ADF Code Corner. 65. Active Data Service Sample Twitter Client. Abstract: twitter.com/adfcodecorner

Solving Mobile App Development Challenges. Andrew Leggett & Abram Darnutzer CM First

DESIGN TRANSFORMATIONAL IPAD APPS

ADF Hands-On. Understanding Task Flow Activities / 2011 ADF Internal Enterprise 2.0 Training. Abstract:

Pick A Winner! In What Tool Should I Develop My Next App?

Leveraging BlackBerry Services: Push and Notification Manager

I, J, K. Eclipse, 156

Quick Web Development using JDeveloper 10g

Android User Guide. User Guide 2.3

Configuration Tab. Cisco WebEx Messenger Administration Guide 1

DEVELOPING APPS FOR. Note: This ebook relies on and uses information from the Google Glass Developers site.

Solution register itself

Department of Computer Science and Engineering The University of Texas at Arlington. Team: TimeKeepers. Project: Volunteer Tracking System

IBM Operational Decision Manager Version 8 Release 5. Configuring Operational Decision Manager on WebLogic

Overview. Principal Product Manager Oracle JDeveloper & Oracle ADF

Software Architecture Documentation for the JRC MYGEOSS app for Invasive Species project

ADF Region Interaction: External Train Navigation

Mail: Web: juergen-schuster-it.de

Oracle Developer Day

Salesforce Classic Guide for iphone

<Insert Picture Here> JavaFX Overview April 2010

What Is React Native?

Introduction to application management

Guide - Deploying for Production. apiman Final

Developing Exceptional Mobile and Multi-Channel Applications using IBM Web Experience Factory

MFA Instructions. Getting Started. 1. Go to Apps, select Play Store 2. Search for Microsoft Authenticator 3. Click Install

What Does Logout Mean?

Web Push Notification

70-482Q&As. Advanced Windows Store App Dev using HTML5 and JavaScript. Pass Microsoft Exam with 100% Guarantee

Mobile Experience. Release Notes. Version: 5.2.x

IBM Case Manager Mobile Version Users' Guide IBM SC

FUSION REGISTRY COMMUNITY EDITION SETUP GUIDE VERSION 9. Setup Guide. This guide explains how to install and configure the Fusion Registry.

Microsoft Graph API Deep Dive

MyTeleMed iphone User Guide

Getting ready to set up. Step 1. Note:

1. Configuring Azure and EBP for a simple demo

Product Data Sheet: Ignition 8 Industrial Application Platform. A Whole New View

RSA SecurID Ready Implementation Guide. Last Modified: December 13, 2013

OAuth 2 and Native Apps

SafeWebApp Android QuickStart

Workspace ONE Content for Android User Guide. VMware Workspace ONE UEM

Lab 3: Using Worklight Server and Environment Optimization Lab Exercise

Transcription:

Real Life ADF Mobile 10 things that you don't get from the developer guide DOAG Konferenz; November 19th 2013

Who Am I Luc Bors Principal Consultant AMIS, Netherlands Friends of Oracle & Java 5 Oracle ACE(D) Oracle Partner

10 Things One App... 10 Things... In 45 Minutes..Really?

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

Property Change Events Raised when individual attributes of a model object are changed Use setter method to update attributes

Provider Change Event Raised when attributes of type Collection are changed on a model object When a new row is created fireprovidercreate(providerkey, rowkey, newrow) New row is inserted in the UI without refreshing other parts of the page When a row is deleted fireproviderdelete(providerkey, rowkey) Row is deleted in the Iterator When the collection is refreshed fireproviderrefresh(providerkey) Iterator is refreshed Row currency is lost. providerchangesupport.fireproviderrefresh("stadiums");!

Device Interaction The Device Datacontrol Drag n Drop support Attributes as fields Operations as buttons

Camera interaction Take a picture import oracle.adf.model.datacontrols.device; DeviceManagerFactory.getDeviceManager().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

Be careful!! DESTINATIONTYPE_DATA_URL you will get the image as base64 encoded string Camera s are very good and picture quality is amazing. Encoding such images as base64 causes memory issues Don t blow up your app. ios you should set quality parameter to a value less then 50 to avoid memory issues On Android out-of-memory can be caused with default image settings. Make image smaller by setting targetwidth and targetheight Small sized images can be uploaded using web services.

Data Services Device Native Container HTML5 & JavaScript Presentation ADF Mobile AMX View ADF Controller Cordova Local HTML Java VM Business Logic ADF Model Web View Server HTML JDBC SQLite App Config Push Handler Credential Management, SSO & Access Control Configuration Server Server-Generated HTML APN/GCM Push Services SOAP & REST Services Device Services Encrypted SQLite DB Mobile Device Server

The Webservice Datacontrol Using Webservices

Using Webservices directly Just drag & drop the method from the Data Control

Using Webservices from Java Invoke directly from java. Does not use the binding layer 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 Mash-up data from multiple services

SOAP Webservice Web Service Data Control Patterns

REST Webservice Rest Service Adapter Patterns

SQLite Database Plain JDBC Patterns.

Obviously all the same Service Object Data Control Pattern Whatever back end data source you use.. It is completely transparent for UI

Feature Archives Feature Archives can be reused Deploy ADF Mobile app as FAR Consume features from FAR in other apps

Feature Archives Feature Archives Deployment Profile Connections Detail should be used (default is wrong?) Only if connection is available in consuming APP name only works

Springboard configuration in adfmf-application.xml Springboard & navigationbar

The Default Springboard

The Custom SpringBoard

Configuring the springboard Do Not set AllowDeviceAccess to False for Springboard Feature!

Navigation 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 Declarative Navigation Button/Link/ListItem Programmatic Navigation JavaCode AdfmfContainerUtilities.invokeContainerJavaScriptFunction(! AdfmfJavaUtilities.getFeatureName(),! "adf.mf.api.amx.donavigation",! new Object[] { detail" }); }!

Navigation Drawback No access to setpropertylistener Solution if you need that functionality: Set the value in java Code ValueExpression ve =! AdfmfJavaUtilities.getValueExpression(! "#{pageflowscope.mybean.currentstadium}!, String.class);! ve.setvalue(adfmfjavautilities.getadfelcontext()!, getcurrentstadium());!

Smart Navigation Search Stadiums What if resultset only contains one row? if (s_stadiums.size()==1){! // only one stadium! Lets navigate AdfmfContainerUtilities.invokeContainerJavaScriptFunction(! AdfmfJavaUtilities.getFeatureName(),! "adf.mf.api.amx.donavigation",! new Object[] { "detail" });! }!

Preserve Current Row Inside the <amx:listitem> element of the list page, you need to add a <amx:setpropertylistener> element to store the row key in a pageflowscope variable. In the page definition of the detail page, you need to add a setcurrentrowwithkey action, which uses the pageflowscope variable to set the current row. In the page definition of the detail page, you need to add an invokeaction executable for the setcurrentrowwithkey action to ensure the current row is automatically set when entering the detail page.

Preserve Current Row (A-Team) Easiest way: Download and install extension adf-mobile-persistence-sample-install.zip Extension contains StatefulIteratorBeanDcDefinition <AdapterDataControl id="playerservice FactoryClass="oracle.adf.model.adapter.DataControlFactoryImpl ImplDef= "oracle.ateam.sample.mobile.model.bean.statefuliteratorbeandcdefinition!. Definition= "com.blogspot.lucbors.soccer.mobile.model.service.playerservice BeanClass= "com.blogspot.lucbors.soccer.mobile.model.service.playerservice"! }! NOTE: This will be the way ADF Mobile will do it in future versions

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}" type="swiperight"/> The Tap Gesture <amx:showpopupbehavior popupid="pop1" type="taphold />

Use case example

Ingredients A (Web) service and datacontrol A Page with Listview An ActionListener with type SwipeDown Smart Java Code to call service conditionally <amx:listview var="row! value="#{bindings.alllocations.collectionmodel}"! fetchsize="#{bindings.alllocations.rangesize}! id="lv1">! <amx:listitem id="li1">! <amx:actionlistener type="swipedown! binding="#{pageflowscope.locationsbackingbean.checkforupdates} >!!

Change the data

Swimming-lanes No Horizontal scrollbar All data available Use panelgrouplayout Width 100% <amx:panelgrouplayout layout="horizontal inlinestyle="width:100%;">!

Push Notification (GCM) Subscribe to GCM Receive token Register with Enterprise app Enterprise app Pushes message to GCM GCM delegates message to device(s)

Server Side Class to push a message to a device. import com.google.android.gcm.server.constants; import com.google.android.gcm.server.message; import com.google.android.gcm.server.result; import com.google.android.gcm.server.sender; public class PushMessageBean { public String message; private Sender sender = new Sender( <somesenderkey>"); public static final String ERROR_NOT_REGISTERED="NotRegistered ; private Message createmessage(string msg) { String sound = "default"; Message message = new Message.Builder().collapseKey("1").delayWhileIdle(true).addData("alert", msg).adddata("sound", sound).build(); return message;}

Server Side Send Code public void pushnow(actionevent actionevent) { // Add event code here DCBindingContainer bindings = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry(); DCIteratorBinding iter = bindings.finditeratorbinding("gcmsubscribersiterator"); Row curr = iter.getcurrentrow(); String target = (String)curr.getAttribute("DeviceToken"); String type = (String)curr.getAttribute("DeviceType"); if(type.equalsignorecase("android")){ Message message = createmessage(this.message); Result result = null; sendsinglemessage(target, message); }

Example Select device Send message Get notified +

GCM Demo

Summary One App... 10 Things... In 45 Minutes.. Really! 1. Whitelisting 2. Provider Refresh 3. Pictures 4. Data Service Pattern 5. Feature Archives 6. Springboard 7. Prog Navigation 8. Keep current Row 9. Pull to Refresh 10. Push Notifications

User Experience Patterns and Guidelines WIKI

Luc Bors, AMIS, The Netherlands Luc.Bors@amis.nl LucBors@gmail.com Follow me on : @lucb_