Randy Dalrymple HillyRoad, LLC

Slides:



Advertisements
Similar presentations
Cross Platform Push with Azure
Advertisements

Staying in Sync with Cloud 2 Device Messaging. About Me Chris Risner Twitter: chrisrisner.
Attie Naude 14 May 2013 Windows Azure Mobile Services.
UNIT-e futures and UNIT-e Mobile Ben Potter Systems Architect.
Ellucian Mobile: Don’t text and drive, kids!
Push to ALL the iPhones with Azure Chris Risner Senior Technical Microsoft Azure.
W alkie Doggie is a web application that allows dog owners to help each other with their dog walks. It’s main feature is the walkies, which are the user’s.
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
Using free opensource tools to conduct surveys in vulnerable communities.
OPC Alarm.NET.
| Basel Discovering Windows Azure Mobile Services and Media Services Ken Casada
Google App Engine Google APIs OAuth Facebook Graph API
Managing Client Access
Module 4 Managing Client Access. Module Overview Configuring the Client Access Server Role Configuring Client Access Services for Outlook Clients Configuring.
MCSE Guide to Microsoft Exchange Server 2003 Administration Chapter Four Configuring Outlook and Outlook Web Access.
Google Cloud Messaging for Android (GCM) is a free service that helps developers send data from servers to their Android.
M i SMob i S Mob i Store - Mobile i nternet File Storage Platform Chetna Kaur.
Extending Forefront beyond the limit TMG UAG ISA IAG Security Suite
Kirill Principal Lead Program Manager High Scale Cross Platform Push Notifications.
WHO WILL BENEFIT FROM THIS TALK TOPICS WHAT YOU’LL LEAVE WITH Developers Interested in HTML5 Games Interested in Windows Azure Interested in Game Development.
Hwajung Lee.  Interprocess Communication (IPC) is at the heart of distributed computing.  Processes and Threads  Process is the execution of a program.
Building Mobile Phone Applications With Windows Azure Nick HarrisWindows Azure Technical Evangelist Microsoft Blog:
FCM Workflow using GCM.
Mobile + Cloud: Building Mobile Applications with Windows Azure Wade Wegner Blog:
IPS Infrastructure Technological Overview of Work Done.
Secure Mobile Development with NetIQ Access Manager
Windows Azure and iOS Chris Risner Windows Azure Technical Evangelist Microsoft
START Application Spencer Johnson Jonathan Barella Cohner Marker.
Building Azure Mobile Apps
Mobile Application Solution
Cloud Logistics for First Responders Service Overview April 25th 2014
MaaS360 MDM for iOS, Android & Windows Phone 7
REDCap Mobile Application
Organizational IT Stack
Connected Infrastructure
Android Mobile Application Development
Hydromet Cloud Presentation
File Management in the Cloud
R&D Discovering the Future
Application area Events Conferences Exhibitions
SAP Authentication 365 Run Simpler with SAP Digital Interconnect
TrueSight Operations Management 11.0 Architecture
Elevator Inspection System
Notifications and Services
Connected Infrastructure
Mobile Application Solution
Task Management System (TMS)
Building Cross-Platform Apps with Windows Azure Mobile Services
CMPE419 Mobile Application Development
Firebase Cloud messaging A primer
Persistence - Web Based Storage
How it works: Step 1 99% of CAD systems can do this without modification is sent to a unique address for your agency Example:
Security Guard Reporting Android App
Running on the Powerful Microsoft Azure Platform,
WEB API.
intro to notifications in iOS 10
Zicheng Wan and Yuan Gao CPSC 6820, Clemson University
Mobile Services and Cloud Scalability Enable Connections Between Brands and Customers MINI-CASE STUDY “It became clear that Microsoft Azure was the way.
Units with – James tedder
TechEd /15/2019 8:08 PM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
SharePoint Online Authentication Patterns
Building device & cloud apps
Android Introduction Platform Mihail L. Sichitiu.
Google Cloud Messaging (sort of)
Multi-Factor Authentication
CMPE419 Mobile Application Development
Sessions about to start – Get your rig on!
Message Passing Systems Version 2
Building Windows Store Apps with Windows Azure Mobile Services
Message Passing Systems
Presentation transcript:

Randy Dalrymple HillyRoad, LLC Android Messaging Randy Dalrymple HillyRoad, LLC

Initial Problem Our app depends on sending daily status (I'm OK) Need to send status message between phones Must be cross-platform (Android/iOS) Cannot presume proximity (can be anywhere)

Prior Solution Android-only product works with SMS Android exposes interface to SMS inbox + events Quick, easy, ROBUST solution Fails completely with iOS (SMS interface hidden) → Will not work cross-platform

Additional Constraints Must not require application server (I don't have one) Must be low/no-cost RELIABILITY!

Options Considered Use Existing Solutions Dedicated server SMS (works only with Android) WhatsApp/Telegram (no API available) Dedicated server Violates constraint → Discard

Options Considered (Cont) Push Messaging Worth a look Other Chat Database

Mobile Push Messaging Internet-based Each platform (Apple, Google, Microsoft, etc.) has its own dedicated server Google: Firebase Cloud Messaging (FCM) Apple: Apple Push Messaging Server (APNS) Messages sent synchronously to device (more or less) Messages can originate from anywhere (other device, server, console)

More Mobile Push Messaging Often used for mass marketing/promotion Token provides device ID/app ID Payload is JSON dictionary format Relies on persistent, dedicated socket connection Google uses the Google Play Services socket for all services (Push, Maps, etc.) → Android device MUST have Google Play Services installed and running for push messaging

Google Firebase

Messaging Architecture 5 Application Server 5 Apple Push Notification Server (APN) Firebase/ Google Cloud Messaging Server 1 6 3 2 3 2 4 4 6 1 1. Register with messaging server 2. Receive token & connect to socket 3. Log in with token 4. Send push message 5. Request push notification 6. Receive push notification iOS Client Android Client

Application Server Role Authenticate user Handle push token for device Determine appropriate push server Accept push request from device Request push notification from push server Can use HTTP or XMPP (Preferred by APNS) APNS requires secure, persistent connection Handle errors/retries

Find Application Server BaaS Search criteria: Must provide complete solution Must be economical for small-scale deployment Should scale if product is successful Several products considered, but few are viable

Candidates Product Requires App Server Cost Satisfactory AWS Yes Free/Low No Firebase + Patch Free Applozic High after 30 days PubNub $149/mo for >100 users Layer Low Magnet High after 90 days AZStack Urban Airship QuickBlox Free for <20K users

QuickBlox Messaging Part of communications suite supporting messaging, chat, video chat, etc. Company based in London, UK Free tier Up to 20K users Allows 20 msg/sec. Beyond that, data ignored Libraries/sample apps for Android, iOS

QuickBlox Messaging Implementation Register application with Google, Apple Google is MUCH easier!!! Create QuickBlox account and register application Integrate QuickBlox framework in application

Google Console

QuickBlox Console

Problem 1: QB Integration Options Bare web API Most efficient, but most work (threading, etc.) Use QB framework Must analyze/understand framework more fully Sample app (includes framework) Easiest to implement quickly → Use this one!

Problem 2: How to Handle User ID QB User ID must be unique Users are unaware of underlying QB framework Users know each other only by name and phone number → Create anonymous QB User ID using phone number

Android QB Integration Required app functions Test for internet connection Create user ID for QuickBlox framework Register for remote notification Retrieve recipients' user IDs when sending message Send push message Handle received push message

Push Sample App Integration

MainActivity @Override protected void onResume() { super.onResume(); try { if (!Utils.isNetworkConnected(getApplicationContext())) { Utils.showAlert("No Internet", "Check your internet connection.", MainActivity.this); } else { qbManager = new QBManager(this.getApplicationContext()); qbManager.createSession(); } } catch (Exception e) { // sometimes throws exception even when connected Utils.showAlert("No Internet", "Check your internet connection.", MainActivity.this); } mSharedPreferences = getSharedPreferences(Utils.PREFS, MODE_PRIVATE); String org = mSharedPreferences.getString(Utils.PREF_IS_ORGANIZER, null); if (org == "true") { createChatGroup(); } }

MainActivity

QBManager

MainActivity

MainActivity

CoreGcmPushListenerService public abstract class CoreGcmPushListenerService extends GcmListenerService { private static final String TAG = CoreGcmPushListenerService.class.getSimpleName(); @Override public void onMessageReceived(String from, Bundle data) { String message = data.getString(GcmConsts.EXTRA_GCM_MESSAGE); Log.v(TAG, "From: " + from); Log.v(TAG, "Message: " + message); if (ActivityLifecycle.getInstance().isBackground()) { showNotification(message); } logCheckInMessage(message); sendPushMessageBroadcast(message); protected abstract void showNotification(String message); protected abstract void sendPushMessageBroadcast(String message); protected abstract void logCheckInMessage(String message);

Results Messaging implemented in Android (appx. 35 hrs) and iOS (appx. 30 hrs) Successfully sent push messages between Android, iOS However.......

More Results Messaging not sufficiently reliable for safety/security application Google, Apple servers maintain 1-element queue per application iOS does not handle silent push cleanly During testing, Apple server offline for 24 hours We need to try something else—Chat, DB or something else!

Misc: QuickBlox Statistics

Misc: QuickBlox Console Push

Selected References https://www.raywenderlich.com/126098/top-5-parse-alternatives http://www.androidbegin.com/blog/list-best-android-backend-service-baas-provider/ http://stackoverflow.com/questions/11508613/how-does-push-notification-technology-work-on-android https://firebase.google.com/docs/cloud-messaging/server https://www.whatsapp.com/faq/android/28000012 http://pushproviders.com/ https://aws.amazon.com/sns/ https://firebase.google.com/ https://layer.com/ https://www.applozic.com/price.html http://quickblox.com/developers/SimpleSample-messages_users-android