Giter VIP home page Giter VIP logo

xtremepush_phonegap's Introduction

PhoneGap: Getting Started with XtremePush

With the XtremePush module for PhoneGap you can add XtremePush to both iOS and Android apps built with PhoneGap.

Platform Specific Information

XtremePush supports push notifications for iOS devices via Apples's Push Notification Service (APNs for short). And push notifications for Android devices via Google’s GCM (Google Cloud Messaging for Android) service. This page contains PhoneGap specific instructions but It is also recommended you read the native documentation for these platforms. This includes the quick start guides:

These docs deal with important topics like:

Both platforms also have documentation on setting up advanced features when integrating XtremePush into your Application:

Advanced features include: tagging of events, custom push notification handling and location services.

XtremePush PhoneGap SDK Setup

First, download the current XtremePush PhoneGap SDK here. Inside of the ZIP you will find the following directories:

  • Example_Apps/ : This folder contains a sample app for each OS supported. The apps are in a folder named after the OS they are related to, for example the iOS example app is in the ios/ folder.
  • www/: This folder contains the javascript part of the plugin. OS specific portion of the plugin in a folder named after that OS i.e. src/iOS/ or src/Android/.

Full integration guides are given for iOS and Android below.

Integrate Xtremepush to your PhoneGap iOS Project

  1. Navigate to you iOS PhoneGap project in platforms/ios directory.
  2. Download the XtremePush iOS library here and add it to your iOS project following these instructions
  3. Navigate to your application directory, and type command: cordova plugin add https://github.com/xtremepush/XtremePush_Phonegap

Tagging your app to enable deeper audience analysis and segmentation

XtremePush has two methods for tagging activity in your app one for tagging page impressions and one for tagging any other activity.

To tag page impression add the following method where your page loads:

// Send impression to server to track page impressions
XTremePush.hitImpression(successCallback, failCallback, "your_impression_name");

To tag any other events send a tag to server using the following method:

// E.g. you might want to tag a button press
XTremePush.hitTag(successCallback, failCallback, "your_tag_name");

Phonegap Example iOS App

  1. When you have downloaded the latest plugin version (here) it comes with example apps.

  2. Extract the archive, it contains the folder XtremePush_phonegap/ and the iOS example app can be found in Example_Apps/ios/

  3. To experiment with this sample app open it in Xcode. It is a simple app with all the XtremePush library methods mapped to a series of buttons:

Phonegap example app

  1. You can see how the plugin has been configured in the test app in key locations such as: the plugin folders, app delegate, cordova_plugins.js, config.xml, index.js and index.html (see image below).

Test app in Xcode

Integrate Xtremepush to your PhoneGap Android Project

  1. Add XtremePush Android Library to your Project. Please follow instructions.
  2. Navigate to your application directory, and type command: cordova plugin add https://github.com/xtremepush/XtremePush_Phonegap

PhoneGap Example Android App

  1. When you have downloaded the latest plugin version (here it comes with example apps.

  2. Extract the archive, it contains the folder XtremePush_phonegap/ and the Android example app can be found in Example_Apps/android/

  3. To experiment with this sample app open it in your IDE. It is a simple app with all the XtremePush library methods mapped to a series of buttons:

Phonegap example app

  1. You can see how the plugin has been configured in the test app in key locations such as: the src/ folder, assets/www/ folder or res/xml/config.xml.

xtremepush_phonegap's People

Contributors

dimko1 avatar kevatxtreme avatar collinskev avatar catchmartin avatar

Watchers

James Cloos avatar  avatar

xtremepush_phonegap's Issues

iOS 8 OS not Supported

This plugin does not support the iOS 8 OS. I am not getting the device token when running the plugin in iOS 8 device but I get the token and notification both when run the plugin in iOS 7 OS device. It would be very helpful if the support for iOS 8 OS is also provided.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.