Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Phonegap for Enterprise

You're reading from   Phonegap for Enterprise Master the art of building secure enterprise mobile applications using PhoneGap

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781783554751
Length 192 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Kerri Shotts Kerri Shotts
Author Profile Icon Kerri Shotts
Kerri Shotts
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. PhoneGap and Enterprise Mobility FREE CHAPTER 2. Building the Data Store and Business Logic 3. Securing PhoneGap Apps 4. Building the Middle-Tier 5. Communicating between Mobile and the Middle-Tier 6. Application Events and Storage 7. Push Notifications 8. Building the Presentation Tier A. Useful Resources Index

Integrating Boxcar with PhoneGap/Cordova


At this point, we can create a PhoneGap/Cordova project and integrate it with Boxcar. We've got a sample project at /ch7 in the code package; all it does is respond to Push Notifications by displaying an alert. You're welcome to use our code as a base, or perform the following steps to integrate Boxcar with your app:

  1. Create your project using the Cordova CLI as normal (however, use the app ID you used when setting up Push Notifications):

    cordova create ./ch7 com.packtpub.pgech7 TaskerCH7
  2. Add the iOS and Android platforms:

    cordova platform add ios android
  3. Add the necessary plugins; Boxcar requires the following two plugins:

    cordova plugin add org.apache.cordova.device
    cordova plugin add https://github.com/boxcar/PushPlugin
  4. Copy the Boxcar.js file from the Boxcar SDK and place it in your project's www directory.

    Tip

    We had to make several changes to the Boxcar.js file in order to function as needed for our purposes. We've submitted these features and bug fixes...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image