NativeScript + Push Notifications
-
Upload
lohith-goudagere-nagaraj -
Category
Technology
-
view
1.377 -
download
3
Transcript of NativeScript + Push Notifications
Let's talk NativeScriptThis changes
everything!
By
About Me
Technical EvangelistMicrosoft MVP (ASP.NET/IIS)
@kashyapahttp://www.kashyapas.com
http://www.telerikhelper.net
Lohith G N
http://www.telerik.com
Agenda
• NativeScript
• Push Notification
• Telerik Backend
• NativeScript + Push
You're Welcome!
NativeScript
{}
Native iOS / Andoid / Windows Phone*
Apps Built with JavaScript + CSS + XMLSingle Code Base *Coming
Soon
What?{N} is built from ground up
No DOM
No Cross-Compilation
No Plugins Required
{N} is straight-up JS | Running as Native App
Under the hood{N} works over an abstraction - a very smart one
Runs JavaScript in a Virtual Machine
JavaScriptCore VM on
iOS V8 VM on Android
JavaScriptCore* VM on Win Mobile 10 *Tentati
ve
You write JavaScript{N} utilizes a bridge
Has full access to Native APIs- That's all of iOS + Android APIs!
Uses Reflection to look up Native APIs List of APIs for each Platform Metadata pre-generatedInjected into App package @ Build time
Plug & Play?{N} is very flexible
Allows reuse of skills & assets
Use native libraries for each platform
Use JS libraries without DOM dependency
Shared UI styles through CSS
Full TypeScript Support
How do I start?{N} Command Line Interface makes
it easy Grab the NativeScript CLI:npm install -g nativescript
tns create MyApptns platform add android
Create Project & Add Platforms:
tns run androidtns run android --emulator
Run Project on Device or Emulator:
Choice of IDE?{N} aims to give you flexibility
Sublime Text | With complete Workflow
VS Code | Best for
TypeScript Most other
JS/CSS text editors
Demo
Why {N} again?
Push Notifications
What is Push Notification• Send Some Data to your App
• Convenient, Battery Friendly
• App need not be running
• Used as Marketing Campaigns, Promos, etc
Architectural Overview
APNS
WNS
Android/iOS/WP
Procedure• Register Your App with respective
Notification Service
• Use an App Server to communicate with Notification Server
• Handle Push Notification message on your device
DemoRegistering with GCM
Telerik BackendThink of it as an App Server
Push in Telerik Backend• Effortless Integration with
iOS/WP/Android
• Isolates Platform Differences• Different notification servers• Different devices• Different OS Versions
• Powerful Targeting
• Easy device integration• Hybrid or Native
DemoTelerik Backend Push Settings
Push with NativeScript
Process
• Create a NativeScript App
• Include NativeScript Push Plugin
• Register the device with your App Server
• Listen for Push Notification callback
• Handle Push Notification
DemoNativeScript + Push Notification
By
Native X-Platform Mobile with JS
NativeScript Blog | @NativeScript
Go build your dream app!