SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
ADF Mobile : Push Notifications 
DOAG ADF Spotlight Webinar, June 6th 2014
Who Am I 
• Luc Bors 
• Principal Consultant 
• AMIS, Netherlands
Agenda 
• ADF Mobile Overview Architecture 
• Push Notifications Overview 
• Push Notifications Cloud Messaging Part 
• Push Notifications Provider Part 
• Push Notifications ADF Mobile Part
Push Notifications
Push Notifications 
•
Example 
• Select device 
• Send message • Get notified
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)
Push Notification
Setup GCM 
• Google Cloud Project 
• Google Cloud Messaging API is 
enabled 
• API key
Setup APNS 
• iOS Developer account 
• App Id and Provisioning profile 
– Make sure to check the Push Notification Service when you create the new App Id 
• SSL Certificate
Create a Provider Application
Prepare Provider Application 
• Add gcm-server.jar (for GCMS) 
• Add javaPNS.jar (for APNS)
Code Behind the Button 
• Class to push a message to a device. 
public void pushNow(ActionEvent actionEvent) { 
….. Logic to get selected row… 
String target = (String)curr.getAttribute("DeviceToken"); 
String type = (String)curr.getAttribute("DeviceType"); 
if (type.equalsIgnoreCase("Android")) { 
pushMsgAmdroid(target, this.message); 
} else { 
pushMsgIos(target, this.message); 
}
Server Side for Android 
• Sending the message 
String sound = "default"; 
Message message = 
new Message.Builder() 
.delayWhileIdle(true) 
.addData("alert", msg) 
.addData("sound",sound) 
.addData("FeatureName", "Sessions") 
.addData("SessionId", "12") 
.build(); 
Result result; 
try { 
result = sender.sendNoRetry(message, regId); 
}
Server Side for iOS 
• Sending the message 
/* Build a blank payload to customize */ 
PushNotificationPayload payload = PushNotificationPayload.complex(); 
/* Custom the payload */ 
payload.addAlert(msg); 
payload.addBadge(1); 
payload.addCustomDictionary("FeatureName", "Sessions"); 
payload.addCustomDictionary("SessionId", "12"); 
Push.payload(payload, KEYSTORE_LOCATION, KEYSTORE_PASSWORD, false, 
target);
Preparing ADF Mobile 
• Register Application Life Cycle Listener 
• LifeCycleListener must implement 
oracle.adfmf.application.PushNotificationConfig interface. 
– This interface provides the registration configuration for push notifications
ApplicationLifeCycleListener 
• 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()); 
}
The PushNotificationListener 
• 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"); 
} 
}
Token Registration 
• Use a webservice to send the Token to the provider Application 
• Provider stores token and uses it when sending notifications (remember 
the “code behind the button” 
public void pushNow(ActionEvent actionEvent) { 
….. Logic to get selected row… 
String target = (String)curr.getAttribute("DeviceToken"); 
String type = (String)curr.getAttribute("DeviceType"); 
if (type.equalsIgnoreCase("Android")) { 
pushMsgAmdroid(target, this.message); 
} else { 
pushMsgIos(target, this.message); 
}
All is there. 
• Cloud Services are setup 
• Provider app is created 
• Device Token can be sent to and stored at provider app 
• LETS PUSH ! And work with the notification
Push Notifications 
•
onMessage() 
Working with the Notification 
public void onMessage(Event event) { 
AdfELContext adfELContext = AdfmfJavaUtilities.getAdfELContext(); 
JSONBeanSerializationHelper jsonHelper = 
new JSONBeanSerializationHelper(); 
try {PayloadServiceResponse serviceResponse = 
(PayloadServiceResponse)jsonHelper.fromJSON( 
PayloadServiceResponse.class, event.getPayload()); 
ValueExpression notificationPayloadBinding = 
AdfmfJavaUtilities.getValueExpression( 
"#{applicationScope.notificationSessionId}", String.class); 
notificationPayloadBinding.setValue( 
AdfmfJavaUtilities.getAdfELContext() 
, serviceResponse.getSessionId()); 
AdfmfContainerUtilities.gotoFeature( 
"com.tamcapp.mobilebook.ses.ConferenceSessions"); 
}
Badging 
// also, lets decrease the application icon badge by one 
int currentBadge = 
AdfmfContainerUtilities.getApplicationIconBadgeNumber(); 
if (currentBadge > 0) { 
AdfmfContainerUtilities.setApplicationIconBadgeNumber( 
currentBadge - 1); 
}
In the feature… 
• Use FeatureLifeCycleListener 
– Activate() Method 
public void activate() { 
Boolean notified = 
(Boolean)AdfmfJavaUtilities.evaluateELExpression( 
"#{applicationScope.notified}"); 
if(notified.booleanValue({ 
AdfmfContainerUtilities.invokeContainerJavaScriptFunction( 
AdfmfJavaUtilities.getFeatureName(), 
"adf.mf.api.amx.doNavigation”, 
new Object[] { "featureActivated" });} 
}
DEMO
Push Notification - Summary 
• Configuration can be complicated (Especially on iOS) 
• Listeners, Listeners, Listeners 
– ApplicationLifeCycle 
– PushNotification 
– FeatureLifeCycle 
• Send Notification (optional with Payload) 
• onMessage() 
– Get Payload 
– Call feature 
• In Feature 
– Work with payload
Luc Bors, AMIS, The Netherlands 
Luc.Bors@amis.nl 
LucBors@gmail.com 
Follow me on : @lucb_

Weitere ähnliche Inhalte

Was ist angesagt?

Rapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebaseRapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebasePeter Friese
 
Lecture 11. Microsoft mobile services
Lecture 11. Microsoft mobile servicesLecture 11. Microsoft mobile services
Lecture 11. Microsoft mobile servicesMaksym Davydov
 
Supercharge Your Pages - New Ways to Extend the Confluence Editor
Supercharge Your Pages - New Ways to Extend the Confluence EditorSupercharge Your Pages - New Ways to Extend the Confluence Editor
Supercharge Your Pages - New Ways to Extend the Confluence EditorAtlassian
 
Build Amazing Add-ons for Atlassian JIRA and Confluence
Build Amazing Add-ons for Atlassian JIRA and ConfluenceBuild Amazing Add-ons for Atlassian JIRA and Confluence
Build Amazing Add-ons for Atlassian JIRA and ConfluenceK15t
 
Creating a Custom PowerApp Connector using Azure Functions
Creating a Custom PowerApp Connector using Azure FunctionsCreating a Custom PowerApp Connector using Azure Functions
Creating a Custom PowerApp Connector using Azure FunctionsMurray Fife
 
Making connected apps with BaaS (Droidcon Bangalore 2014)
Making connected apps with BaaS (Droidcon Bangalore 2014)Making connected apps with BaaS (Droidcon Bangalore 2014)
Making connected apps with BaaS (Droidcon Bangalore 2014)Varun Torka
 
MBL302 Using the AWS Mobile SDKs - AWS re: Invent 2012
MBL302 Using the AWS Mobile SDKs - AWS re: Invent 2012MBL302 Using the AWS Mobile SDKs - AWS re: Invent 2012
MBL302 Using the AWS Mobile SDKs - AWS re: Invent 2012Amazon Web Services
 
How To Manage API Request with AXIOS on a React Native App
How To Manage API Request with AXIOS on a React Native AppHow To Manage API Request with AXIOS on a React Native App
How To Manage API Request with AXIOS on a React Native AppAndolasoft Inc
 
How to disassemble one monster app into an ecosystem of 30
How to disassemble one monster app into an ecosystem of 30How to disassemble one monster app into an ecosystem of 30
How to disassemble one monster app into an ecosystem of 30fiyuer
 
Python Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - AppenginePython Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - AppenginePython Ireland
 
Updates on the Data Center Apps Program
Updates on the Data Center Apps ProgramUpdates on the Data Center Apps Program
Updates on the Data Center Apps ProgramAtlassian
 
Integrate CI/CD Pipelines with Jira Software Cloud
Integrate CI/CD Pipelines with Jira Software CloudIntegrate CI/CD Pipelines with Jira Software Cloud
Integrate CI/CD Pipelines with Jira Software CloudAtlassian
 
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 +  = ❤️ (Firebase for Apple Developers) at Swift LeedsPeter Friese
 
React native introduction
React native introductionReact native introduction
React native introductionInnerFood
 
Lecture 11 Firebase overview
Lecture 11 Firebase overviewLecture 11 Firebase overview
Lecture 11 Firebase overviewMaksym Davydov
 

Was ist angesagt? (20)

Rapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and FirebaseRapid Application Development with SwiftUI and Firebase
Rapid Application Development with SwiftUI and Firebase
 
Lecture 11. Microsoft mobile services
Lecture 11. Microsoft mobile servicesLecture 11. Microsoft mobile services
Lecture 11. Microsoft mobile services
 
Supercharge Your Pages - New Ways to Extend the Confluence Editor
Supercharge Your Pages - New Ways to Extend the Confluence EditorSupercharge Your Pages - New Ways to Extend the Confluence Editor
Supercharge Your Pages - New Ways to Extend the Confluence Editor
 
Build Amazing Add-ons for Atlassian JIRA and Confluence
Build Amazing Add-ons for Atlassian JIRA and ConfluenceBuild Amazing Add-ons for Atlassian JIRA and Confluence
Build Amazing Add-ons for Atlassian JIRA and Confluence
 
Creating a Custom PowerApp Connector using Azure Functions
Creating a Custom PowerApp Connector using Azure FunctionsCreating a Custom PowerApp Connector using Azure Functions
Creating a Custom PowerApp Connector using Azure Functions
 
MVS: An angular MVC
MVS: An angular MVCMVS: An angular MVC
MVS: An angular MVC
 
Making connected apps with BaaS (Droidcon Bangalore 2014)
Making connected apps with BaaS (Droidcon Bangalore 2014)Making connected apps with BaaS (Droidcon Bangalore 2014)
Making connected apps with BaaS (Droidcon Bangalore 2014)
 
MBL302 Using the AWS Mobile SDKs - AWS re: Invent 2012
MBL302 Using the AWS Mobile SDKs - AWS re: Invent 2012MBL302 Using the AWS Mobile SDKs - AWS re: Invent 2012
MBL302 Using the AWS Mobile SDKs - AWS re: Invent 2012
 
How To Manage API Request with AXIOS on a React Native App
How To Manage API Request with AXIOS on a React Native AppHow To Manage API Request with AXIOS on a React Native App
How To Manage API Request with AXIOS on a React Native App
 
How to disassemble one monster app into an ecosystem of 30
How to disassemble one monster app into an ecosystem of 30How to disassemble one monster app into an ecosystem of 30
How to disassemble one monster app into an ecosystem of 30
 
Python Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - AppenginePython Ireland Nov 2009 Talk - Appengine
Python Ireland Nov 2009 Talk - Appengine
 
Updates on the Data Center Apps Program
Updates on the Data Center Apps ProgramUpdates on the Data Center Apps Program
Updates on the Data Center Apps Program
 
Rails Best Practices
Rails Best PracticesRails Best Practices
Rails Best Practices
 
Integrate CI/CD Pipelines with Jira Software Cloud
Integrate CI/CD Pipelines with Jira Software CloudIntegrate CI/CD Pipelines with Jira Software Cloud
Integrate CI/CD Pipelines with Jira Software Cloud
 
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 +  = ❤️ (Firebase for Apple Developers) at Swift Leeds
 
React native introduction
React native introductionReact native introduction
React native introduction
 
Cloudformation101
Cloudformation101Cloudformation101
Cloudformation101
 
AWS CloudFormation Masterclass
AWS CloudFormation MasterclassAWS CloudFormation Masterclass
AWS CloudFormation Masterclass
 
Amazon Rekognition Workshop
Amazon Rekognition WorkshopAmazon Rekognition Workshop
Amazon Rekognition Workshop
 
Lecture 11 Firebase overview
Lecture 11 Firebase overviewLecture 11 Firebase overview
Lecture 11 Firebase overview
 

Andere mochten auch

Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Mike Willbanks
 
Doag wysiwyg
Doag wysiwygDoag wysiwyg
Doag wysiwygLuc Bors
 
ADF Essentials (KScope14)
ADF Essentials (KScope14)ADF Essentials (KScope14)
ADF Essentials (KScope14)Luc Bors
 
ΑΡΧΕΣ ΣΧΕΔΙΑΣΜΟΥ ΕΚΠΑΙΔΕΥΤΙΚΟΥ ΥΛΙΚΟΥ
ΑΡΧΕΣ ΣΧΕΔΙΑΣΜΟΥ ΕΚΠΑΙΔΕΥΤΙΚΟΥ ΥΛΙΚΟΥΑΡΧΕΣ ΣΧΕΔΙΑΣΜΟΥ ΕΚΠΑΙΔΕΥΤΙΚΟΥ ΥΛΙΚΟΥ
ΑΡΧΕΣ ΣΧΕΔΙΑΣΜΟΥ ΕΚΠΑΙΔΕΥΤΙΚΟΥ ΥΛΙΚΟΥArchontia Mantzaridou
 
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...Luc Bors
 
Real life forms to adf
Real life forms to adfReal life forms to adf
Real life forms to adfLuc Bors
 
Oracle ADF Mobile OGh (Oracle User Group Netherlands)
Oracle ADF Mobile OGh (Oracle User Group Netherlands)Oracle ADF Mobile OGh (Oracle User Group Netherlands)
Oracle ADF Mobile OGh (Oracle User Group Netherlands)Luc Bors
 
How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF Luc Bors
 
Real life-maf-2015
Real life-maf-2015Real life-maf-2015
Real life-maf-2015Luc Bors
 
In the hunt of 100% delivery rate with mobile push notifications
In the hunt of 100% delivery rate with mobile push notificationsIn the hunt of 100% delivery rate with mobile push notifications
In the hunt of 100% delivery rate with mobile push notificationsJan Haložan
 
Visio-REPS_Referral_Workflow
Visio-REPS_Referral_WorkflowVisio-REPS_Referral_Workflow
Visio-REPS_Referral_WorkflowMike Lampe
 
10 Shifts Changing Consumer Behavior / Germany
10 Shifts Changing Consumer Behavior / Germany10 Shifts Changing Consumer Behavior / Germany
10 Shifts Changing Consumer Behavior / GermanyKyle Lacy
 
Gearing up for mobile push notifications
Gearing up for mobile push notificationsGearing up for mobile push notifications
Gearing up for mobile push notificationsKeith Moore
 
Introducing Amazon Pinpoint – Targeted Push Notifications for Mobile Apps
Introducing Amazon Pinpoint – Targeted Push Notifications for Mobile AppsIntroducing Amazon Pinpoint – Targeted Push Notifications for Mobile Apps
Introducing Amazon Pinpoint – Targeted Push Notifications for Mobile AppsAmazon Web Services
 

Andere mochten auch (17)

Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)Push to Me: Mobile Push Notifications (Zend Framework)
Push to Me: Mobile Push Notifications (Zend Framework)
 
Doag wysiwyg
Doag wysiwygDoag wysiwyg
Doag wysiwyg
 
ADF Essentials (KScope14)
ADF Essentials (KScope14)ADF Essentials (KScope14)
ADF Essentials (KScope14)
 
ΑΡΧΕΣ ΣΧΕΔΙΑΣΜΟΥ ΕΚΠΑΙΔΕΥΤΙΚΟΥ ΥΛΙΚΟΥ
ΑΡΧΕΣ ΣΧΕΔΙΑΣΜΟΥ ΕΚΠΑΙΔΕΥΤΙΚΟΥ ΥΛΙΚΟΥΑΡΧΕΣ ΣΧΕΔΙΑΣΜΟΥ ΕΚΠΑΙΔΕΥΤΙΚΟΥ ΥΛΙΚΟΥ
ΑΡΧΕΣ ΣΧΕΔΙΑΣΜΟΥ ΕΚΠΑΙΔΕΥΤΙΚΟΥ ΥΛΙΚΟΥ
 
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
AMIS UX Event 2014: Mobile ADF; From Design To Device; The Tools that make it...
 
Real life forms to adf
Real life forms to adfReal life forms to adf
Real life forms to adf
 
Oracle ADF Mobile OGh (Oracle User Group Netherlands)
Oracle ADF Mobile OGh (Oracle User Group Netherlands)Oracle ADF Mobile OGh (Oracle User Group Netherlands)
Oracle ADF Mobile OGh (Oracle User Group Netherlands)
 
How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF
 
Profesiones
ProfesionesProfesiones
Profesiones
 
Ppt pk
Ppt pkPpt pk
Ppt pk
 
Real life-maf-2015
Real life-maf-2015Real life-maf-2015
Real life-maf-2015
 
In the hunt of 100% delivery rate with mobile push notifications
In the hunt of 100% delivery rate with mobile push notificationsIn the hunt of 100% delivery rate with mobile push notifications
In the hunt of 100% delivery rate with mobile push notifications
 
Visio-REPS_Referral_Workflow
Visio-REPS_Referral_WorkflowVisio-REPS_Referral_Workflow
Visio-REPS_Referral_Workflow
 
10 Shifts Changing Consumer Behavior / Germany
10 Shifts Changing Consumer Behavior / Germany10 Shifts Changing Consumer Behavior / Germany
10 Shifts Changing Consumer Behavior / Germany
 
Gearing up for mobile push notifications
Gearing up for mobile push notificationsGearing up for mobile push notifications
Gearing up for mobile push notifications
 
Introducing Amazon Pinpoint – Targeted Push Notifications for Mobile Apps
Introducing Amazon Pinpoint – Targeted Push Notifications for Mobile AppsIntroducing Amazon Pinpoint – Targeted Push Notifications for Mobile Apps
Introducing Amazon Pinpoint – Targeted Push Notifications for Mobile Apps
 
Front series A deck
Front series A deckFront series A deck
Front series A deck
 

Ähnlich wie MAF push notifications

Cnam azure 2014 mobile services
Cnam azure 2014   mobile servicesCnam azure 2014   mobile services
Cnam azure 2014 mobile servicesAymeric Weinbach
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...mharkus
 
Pandora FMS: Windows Phone 7 Agent
Pandora FMS: Windows Phone 7 AgentPandora FMS: Windows Phone 7 Agent
Pandora FMS: Windows Phone 7 AgentPandora FMS
 
Developing for android wear
Developing for android wearDeveloping for android wear
Developing for android wearThomas Oldervoll
 
Cómo tener analíticas en tu app y no volverte loco
Cómo tener analíticas en tu app y no volverte locoCómo tener analíticas en tu app y no volverte loco
Cómo tener analíticas en tu app y no volverte locoGemma Del Olmo
 
A serverless IoT story from design to production and monitoring
A serverless IoT story from design to production and monitoringA serverless IoT story from design to production and monitoring
A serverless IoT story from design to production and monitoringCodeValue
 
A serverless IoT Story From Design to Production and Monitoring
A serverless IoT Story From Design to Production and MonitoringA serverless IoT Story From Design to Production and Monitoring
A serverless IoT Story From Design to Production and MonitoringMoaid Hathot
 
Develop for Windows 10 (Preview)
Develop for Windows 10 (Preview)Develop for Windows 10 (Preview)
Develop for Windows 10 (Preview)Dan Ardelean
 
2015 dan ardelean develop for windows 10
2015 dan ardelean   develop for windows 10 2015 dan ardelean   develop for windows 10
2015 dan ardelean develop for windows 10 Codecamp Romania
 
Introduction to iOS 9 (Xamarin Evolve 2016)
Introduction to iOS 9 (Xamarin Evolve 2016)Introduction to iOS 9 (Xamarin Evolve 2016)
Introduction to iOS 9 (Xamarin Evolve 2016)Craig Dunn
 
Webinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and JavaWebinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and JavaMongoDB
 
CloudBrew: Windows Azure Mobile Services - Next stage
CloudBrew: Windows Azure Mobile Services - Next stageCloudBrew: Windows Azure Mobile Services - Next stage
CloudBrew: Windows Azure Mobile Services - Next stageTeemu Tapanila
 
Micro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMicro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMichael Dawson
 
Building an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and FirebaseBuilding an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and FirebaseMarina Coelho
 
Evolving your Data Access with MongoDB Stitch
Evolving your Data Access with MongoDB StitchEvolving your Data Access with MongoDB Stitch
Evolving your Data Access with MongoDB StitchMongoDB
 
Cloudbase.io MoSync Reload Course
Cloudbase.io MoSync Reload CourseCloudbase.io MoSync Reload Course
Cloudbase.io MoSync Reload Coursecloudbase.io
 
Implementing and Visualizing Clickstream data with MongoDB
Implementing and Visualizing Clickstream data with MongoDBImplementing and Visualizing Clickstream data with MongoDB
Implementing and Visualizing Clickstream data with MongoDBMongoDB
 

Ähnlich wie MAF push notifications (20)

Cnam azure 2014 mobile services
Cnam azure 2014   mobile servicesCnam azure 2014   mobile services
Cnam azure 2014 mobile services
 
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
GDG GeorgeTown Devfest 2014 Presentation: Android Wear: A Developer's Perspec...
 
Android For All The Things
Android For All The ThingsAndroid For All The Things
Android For All The Things
 
Firebase overview
Firebase overviewFirebase overview
Firebase overview
 
Pandora FMS: Windows Phone 7 Agent
Pandora FMS: Windows Phone 7 AgentPandora FMS: Windows Phone 7 Agent
Pandora FMS: Windows Phone 7 Agent
 
Developing for android wear
Developing for android wearDeveloping for android wear
Developing for android wear
 
Cómo tener analíticas en tu app y no volverte loco
Cómo tener analíticas en tu app y no volverte locoCómo tener analíticas en tu app y no volverte loco
Cómo tener analíticas en tu app y no volverte loco
 
A serverless IoT story from design to production and monitoring
A serverless IoT story from design to production and monitoringA serverless IoT story from design to production and monitoring
A serverless IoT story from design to production and monitoring
 
A serverless IoT Story From Design to Production and Monitoring
A serverless IoT Story From Design to Production and MonitoringA serverless IoT Story From Design to Production and Monitoring
A serverless IoT Story From Design to Production and Monitoring
 
Develop for Windows 10 (Preview)
Develop for Windows 10 (Preview)Develop for Windows 10 (Preview)
Develop for Windows 10 (Preview)
 
2015 dan ardelean develop for windows 10
2015 dan ardelean   develop for windows 10 2015 dan ardelean   develop for windows 10
2015 dan ardelean develop for windows 10
 
Introduction to iOS 9 (Xamarin Evolve 2016)
Introduction to iOS 9 (Xamarin Evolve 2016)Introduction to iOS 9 (Xamarin Evolve 2016)
Introduction to iOS 9 (Xamarin Evolve 2016)
 
Webinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and JavaWebinar: Building Your First App with MongoDB and Java
Webinar: Building Your First App with MongoDB and Java
 
CloudBrew: Windows Azure Mobile Services - Next stage
CloudBrew: Windows Azure Mobile Services - Next stageCloudBrew: Windows Azure Mobile Services - Next stage
CloudBrew: Windows Azure Mobile Services - Next stage
 
Micro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMicro app-framework - NodeLive Boston
Micro app-framework - NodeLive Boston
 
Micro app-framework
Micro app-frameworkMicro app-framework
Micro app-framework
 
Building an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and FirebaseBuilding an Android app with Jetpack Compose and Firebase
Building an Android app with Jetpack Compose and Firebase
 
Evolving your Data Access with MongoDB Stitch
Evolving your Data Access with MongoDB StitchEvolving your Data Access with MongoDB Stitch
Evolving your Data Access with MongoDB Stitch
 
Cloudbase.io MoSync Reload Course
Cloudbase.io MoSync Reload CourseCloudbase.io MoSync Reload Course
Cloudbase.io MoSync Reload Course
 
Implementing and Visualizing Clickstream data with MongoDB
Implementing and Visualizing Clickstream data with MongoDBImplementing and Visualizing Clickstream data with MongoDB
Implementing and Visualizing Clickstream data with MongoDB
 

Mehr von Luc Bors

Talk to me Goose: Going beyond your regular Chatbot
Talk to me Goose: Going beyond your regular ChatbotTalk to me Goose: Going beyond your regular Chatbot
Talk to me Goose: Going beyond your regular ChatbotLuc Bors
 
Extending Oracle SaaS Using Oracle Cloud UX Rapid Development Kit
Extending Oracle SaaS Using Oracle Cloud UX Rapid Development KitExtending Oracle SaaS Using Oracle Cloud UX Rapid Development Kit
Extending Oracle SaaS Using Oracle Cloud UX Rapid Development KitLuc Bors
 
NO CODE : Or How to Extend Oracle SaaS with Oracle Visual Builder Cloud Service
NO CODE : Or How to Extend Oracle SaaS with Oracle Visual Builder Cloud ServiceNO CODE : Or How to Extend Oracle SaaS with Oracle Visual Builder Cloud Service
NO CODE : Or How to Extend Oracle SaaS with Oracle Visual Builder Cloud ServiceLuc Bors
 
Real life-maf-2015-k scope-final
Real life-maf-2015-k scope-finalReal life-maf-2015-k scope-final
Real life-maf-2015-k scope-finalLuc Bors
 
Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)Luc Bors
 
OgH Data Visualization Special Part III
OgH Data Visualization Special Part IIIOgH Data Visualization Special Part III
OgH Data Visualization Special Part IIILuc Bors
 
OgH Data Visualization Special Part II
OgH Data Visualization Special Part IIOgH Data Visualization Special Part II
OgH Data Visualization Special Part IILuc Bors
 
OgH Data Visualization Special Part I
OgH Data Visualization Special Part IOgH Data Visualization Special Part I
OgH Data Visualization Special Part ILuc Bors
 
Oracle day 2014-mobile-customer-case
Oracle day 2014-mobile-customer-caseOracle day 2014-mobile-customer-case
Oracle day 2014-mobile-customer-caseLuc Bors
 
oow2013-adf-mo-bi-le
oow2013-adf-mo-bi-leoow2013-adf-mo-bi-le
oow2013-adf-mo-bi-leLuc Bors
 
Goodbye Nightmare : Tops and Tricks for creating Layouts
Goodbye Nightmare : Tops and Tricks for creating LayoutsGoodbye Nightmare : Tops and Tricks for creating Layouts
Goodbye Nightmare : Tops and Tricks for creating LayoutsLuc Bors
 
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADF
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADFDont Reinvent the Wheel: Tips and Tricks for reuse in ADF
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADFLuc Bors
 
ADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
ADF Mobile : Best Practices for Developing Applications with Oracle ADF MobileADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
ADF Mobile : Best Practices for Developing Applications with Oracle ADF MobileLuc Bors
 
ADF Mobile - an intro for Developers
ADF Mobile - an intro for DevelopersADF Mobile - an intro for Developers
ADF Mobile - an intro for DevelopersLuc Bors
 
An ADF Special Report
An ADF Special Report An ADF Special Report
An ADF Special Report Luc Bors
 
...and thus your forms automagically disappeared
...and thus your forms automagically disappeared...and thus your forms automagically disappeared
...and thus your forms automagically disappearedLuc Bors
 
Odtug2011 adf developers make the database work for you
Odtug2011 adf developers make the database work for youOdtug2011 adf developers make the database work for you
Odtug2011 adf developers make the database work for youLuc Bors
 

Mehr von Luc Bors (17)

Talk to me Goose: Going beyond your regular Chatbot
Talk to me Goose: Going beyond your regular ChatbotTalk to me Goose: Going beyond your regular Chatbot
Talk to me Goose: Going beyond your regular Chatbot
 
Extending Oracle SaaS Using Oracle Cloud UX Rapid Development Kit
Extending Oracle SaaS Using Oracle Cloud UX Rapid Development KitExtending Oracle SaaS Using Oracle Cloud UX Rapid Development Kit
Extending Oracle SaaS Using Oracle Cloud UX Rapid Development Kit
 
NO CODE : Or How to Extend Oracle SaaS with Oracle Visual Builder Cloud Service
NO CODE : Or How to Extend Oracle SaaS with Oracle Visual Builder Cloud ServiceNO CODE : Or How to Extend Oracle SaaS with Oracle Visual Builder Cloud Service
NO CODE : Or How to Extend Oracle SaaS with Oracle Visual Builder Cloud Service
 
Real life-maf-2015-k scope-final
Real life-maf-2015-k scope-finalReal life-maf-2015-k scope-final
Real life-maf-2015-k scope-final
 
Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)Reaching out from ADF Mobile (ODTUG KScope 2014)
Reaching out from ADF Mobile (ODTUG KScope 2014)
 
OgH Data Visualization Special Part III
OgH Data Visualization Special Part IIIOgH Data Visualization Special Part III
OgH Data Visualization Special Part III
 
OgH Data Visualization Special Part II
OgH Data Visualization Special Part IIOgH Data Visualization Special Part II
OgH Data Visualization Special Part II
 
OgH Data Visualization Special Part I
OgH Data Visualization Special Part IOgH Data Visualization Special Part I
OgH Data Visualization Special Part I
 
Oracle day 2014-mobile-customer-case
Oracle day 2014-mobile-customer-caseOracle day 2014-mobile-customer-case
Oracle day 2014-mobile-customer-case
 
oow2013-adf-mo-bi-le
oow2013-adf-mo-bi-leoow2013-adf-mo-bi-le
oow2013-adf-mo-bi-le
 
Goodbye Nightmare : Tops and Tricks for creating Layouts
Goodbye Nightmare : Tops and Tricks for creating LayoutsGoodbye Nightmare : Tops and Tricks for creating Layouts
Goodbye Nightmare : Tops and Tricks for creating Layouts
 
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADF
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADFDont Reinvent the Wheel: Tips and Tricks for reuse in ADF
Dont Reinvent the Wheel: Tips and Tricks for reuse in ADF
 
ADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
ADF Mobile : Best Practices for Developing Applications with Oracle ADF MobileADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
ADF Mobile : Best Practices for Developing Applications with Oracle ADF Mobile
 
ADF Mobile - an intro for Developers
ADF Mobile - an intro for DevelopersADF Mobile - an intro for Developers
ADF Mobile - an intro for Developers
 
An ADF Special Report
An ADF Special Report An ADF Special Report
An ADF Special Report
 
...and thus your forms automagically disappeared
...and thus your forms automagically disappeared...and thus your forms automagically disappeared
...and thus your forms automagically disappeared
 
Odtug2011 adf developers make the database work for you
Odtug2011 adf developers make the database work for youOdtug2011 adf developers make the database work for you
Odtug2011 adf developers make the database work for you
 

Kürzlich hochgeladen

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 

Kürzlich hochgeladen (20)

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 

MAF push notifications

  • 1. ADF Mobile : Push Notifications DOAG ADF Spotlight Webinar, June 6th 2014
  • 2. Who Am I • Luc Bors • Principal Consultant • AMIS, Netherlands
  • 3. Agenda • ADF Mobile Overview Architecture • Push Notifications Overview • Push Notifications Cloud Messaging Part • Push Notifications Provider Part • Push Notifications ADF Mobile Part
  • 6. Example • Select device • Send message • Get notified
  • 7. 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)
  • 9. Setup GCM • Google Cloud Project • Google Cloud Messaging API is enabled • API key
  • 10. Setup APNS • iOS Developer account • App Id and Provisioning profile – Make sure to check the Push Notification Service when you create the new App Id • SSL Certificate
  • 11. Create a Provider Application
  • 12. Prepare Provider Application • Add gcm-server.jar (for GCMS) • Add javaPNS.jar (for APNS)
  • 13. Code Behind the Button • Class to push a message to a device. public void pushNow(ActionEvent actionEvent) { ….. Logic to get selected row… String target = (String)curr.getAttribute("DeviceToken"); String type = (String)curr.getAttribute("DeviceType"); if (type.equalsIgnoreCase("Android")) { pushMsgAmdroid(target, this.message); } else { pushMsgIos(target, this.message); }
  • 14. Server Side for Android • Sending the message String sound = "default"; Message message = new Message.Builder() .delayWhileIdle(true) .addData("alert", msg) .addData("sound",sound) .addData("FeatureName", "Sessions") .addData("SessionId", "12") .build(); Result result; try { result = sender.sendNoRetry(message, regId); }
  • 15. Server Side for iOS • Sending the message /* Build a blank payload to customize */ PushNotificationPayload payload = PushNotificationPayload.complex(); /* Custom the payload */ payload.addAlert(msg); payload.addBadge(1); payload.addCustomDictionary("FeatureName", "Sessions"); payload.addCustomDictionary("SessionId", "12"); Push.payload(payload, KEYSTORE_LOCATION, KEYSTORE_PASSWORD, false, target);
  • 16. Preparing ADF Mobile • Register Application Life Cycle Listener • LifeCycleListener must implement oracle.adfmf.application.PushNotificationConfig interface. – This interface provides the registration configuration for push notifications
  • 17. ApplicationLifeCycleListener • 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()); }
  • 18. The PushNotificationListener • 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"); } }
  • 19. Token Registration • Use a webservice to send the Token to the provider Application • Provider stores token and uses it when sending notifications (remember the “code behind the button” public void pushNow(ActionEvent actionEvent) { ….. Logic to get selected row… String target = (String)curr.getAttribute("DeviceToken"); String type = (String)curr.getAttribute("DeviceType"); if (type.equalsIgnoreCase("Android")) { pushMsgAmdroid(target, this.message); } else { pushMsgIos(target, this.message); }
  • 20. All is there. • Cloud Services are setup • Provider app is created • Device Token can be sent to and stored at provider app • LETS PUSH ! And work with the notification
  • 22. onMessage() Working with the Notification public void onMessage(Event event) { AdfELContext adfELContext = AdfmfJavaUtilities.getAdfELContext(); JSONBeanSerializationHelper jsonHelper = new JSONBeanSerializationHelper(); try {PayloadServiceResponse serviceResponse = (PayloadServiceResponse)jsonHelper.fromJSON( PayloadServiceResponse.class, event.getPayload()); ValueExpression notificationPayloadBinding = AdfmfJavaUtilities.getValueExpression( "#{applicationScope.notificationSessionId}", String.class); notificationPayloadBinding.setValue( AdfmfJavaUtilities.getAdfELContext() , serviceResponse.getSessionId()); AdfmfContainerUtilities.gotoFeature( "com.tamcapp.mobilebook.ses.ConferenceSessions"); }
  • 23. Badging // also, lets decrease the application icon badge by one int currentBadge = AdfmfContainerUtilities.getApplicationIconBadgeNumber(); if (currentBadge > 0) { AdfmfContainerUtilities.setApplicationIconBadgeNumber( currentBadge - 1); }
  • 24. In the feature… • Use FeatureLifeCycleListener – Activate() Method public void activate() { Boolean notified = (Boolean)AdfmfJavaUtilities.evaluateELExpression( "#{applicationScope.notified}"); if(notified.booleanValue({ AdfmfContainerUtilities.invokeContainerJavaScriptFunction( AdfmfJavaUtilities.getFeatureName(), "adf.mf.api.amx.doNavigation”, new Object[] { "featureActivated" });} }
  • 25. DEMO
  • 26. Push Notification - Summary • Configuration can be complicated (Especially on iOS) • Listeners, Listeners, Listeners – ApplicationLifeCycle – PushNotification – FeatureLifeCycle • Send Notification (optional with Payload) • onMessage() – Get Payload – Call feature • In Feature – Work with payload
  • 27. Luc Bors, AMIS, The Netherlands Luc.Bors@amis.nl LucBors@gmail.com Follow me on : @lucb_