Commit 744e1bc6 authored by fredericogalvao's avatar fredericogalvao
Browse files

A few fixes and a lot of links.

parent d8d5e738
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -65,24 +65,24 @@ Some things that will increase the chance that your pull request is accepted:
- Describe your feature/bugfix and why it's needed/important in the pull request description.
- Describe your feature/bugfix and why it's needed/important in the pull request description.




### Editor Config
## Editor Config


The project uses [.editorconfig](http://editorconfig.org/) to define the coding
The project uses [.editorconfig](http://editorconfig.org/) to define the coding
style of each file. We recommend that you install the Editor Config extension
style of each file. We recommend that you install the Editor Config extension
for your preferred IDE. Consistenty is key.
for your preferred IDE. Consistenty is key.


### JSHint
## JSHint


The project uses [.jshint](http://jshint.com/docs) to define the JavaScript
The project uses [.jshint](http://jshint.com/docs) to define the JavaScript
coding conventions. Most editors now have a JSHint add-on to provide on-save
coding conventions. Most editors now have a JSHint add-on to provide on-save
or on-edit linting.
or on-edit linting.


#### Install JSHint for vim
### Install JSHint for vim


1. Install [jshint](https://www.npmjs.com/package/jshint).
1. Install [jshint](https://www.npmjs.com/package/jshint).
1. Install [jshint.vim](https://github.com/wookiehangover/jshint.vim).
1. Install [jshint.vim](https://github.com/wookiehangover/jshint.vim).


#### Install JSHint for Sublime
### Install JSHint for Sublime


1. Install [Package Control](https://packagecontrol.io/installation)
1. Install [Package Control](https://packagecontrol.io/installation)
1. Restart Sublime
1. Restart Sublime
+13 −0
Original line number Original line Diff line number Diff line
# API
# API


- [.init()](#pushnotificationinitoptions)


- [push.on()](#pushonevent-callback)
  - [push.on('registration')](#pushonregistration-callback)
  - [push.on('notification')](#pushonnotification-callback)
  - [push.on('error')](#pushonerror-callback)
- [push.off()](#pushoffevent-callback)
- [push.unregister()](#pushunregistersuccesshandler-errorhandler)
- [push.setApplicationIconBadgeNumber()](#pushsetapplicationiconbadgenumbersuccesshandler-errorhandler-count---ios-only)
- [push.getApplicationIconBadgeNumber()](#pushgetapplicationiconbadgenumbersuccesshandler-errorhandler---ios-only)
- [push.finish()](#pushfinishsuccesshandler-errorhandler---ios-only)

## PushNotification.init(options)
## PushNotification.init(options)


Initializes the plugin on the native side.
Initializes the plugin on the native side.
+9 −2
Original line number Original line Diff line number Diff line
# Installation
# Installation


- [Android details](#android-details)
  - [Compilation](#compilation)
  - [Co-existing with Facebook Plugin](#co-existing-with-facebook-plugin)
  - [Common errors](#common-errors)
    - [minSdkVersion === 14](#minsdkversion--14)
	- [Multidex](#multidex)

This requires phonegap/cordova CLI 5.0+ ( current stable v1.4.4 )
This requires phonegap/cordova CLI 5.0+ ( current stable v1.4.4 )


```
```
@@ -40,9 +47,9 @@ You will need to ensure that you have installed the following items through the


For more detailed instructions on how to install the Android Support Library visit [Google's documentation](https://developer.android.com/tools/support-library/setup.html).
For more detailed instructions on how to install the Android Support Library visit [Google's documentation](https://developer.android.com/tools/support-library/setup.html).


### Co-existing with FaceBook Plugin
### Co-existing with Facebook Plugin


There are a number of Cordova FaceBook Plugins available but the one that we recommend is [Jeduan's fork](https://github.com/jeduan/cordova-plugin-facebook4) of the original Wizcorp plugin. It is setup to use Gradle/Maven and the latest FaceBook SDK properly.
There are a number of Cordova Facebook Plugins available but the one that we recommend is [Jeduan's fork](https://github.com/jeduan/cordova-plugin-facebook4) of the original Wizcorp plugin. It is setup to use Gradle/Maven and the latest Facebook SDK properly.


To add to your app:
To add to your app:


+22 −2
Original line number Original line Diff line number Diff line
- [Android Behaviour](#android-behaviour)
  - [Images](#images)
  - [Sound](#sound)
  - [Stacking](#stacking)
  - [Inbox Stacking](#inbox-stacking)
  - [Action Buttons](#action-buttons)
  - [Led in Notifications](#led-in-notifications)
  - [Vibration Pattern in Notifications](#vibration-pattern-in-notifications)
  - [Priority in Notifications](#priority-in-notifications)
  - [Picture Messages](#picture-messages)
  - [Background Notifications](#background-notifications)
- [iOS Behaviour](#ios-behaviour)
  - [Sound](#sound-1)
  - [Background Notifications](#background-notifications-1)
- [Windows Behaviour](#windows-behaviour)
  - [Notifications](#notifications)
  - [Setting Toast Capable Option for Windows](#setting-toast-capable-option-for-windows)
  - [Disabling the default processing of notifications by Windows](#disabling-the-default-processing-of-notifications-by-windows)


# Android Behaviour
# Android Behaviour


## Images
## Images
@@ -109,7 +129,7 @@ In order for your your notification to play a custom sound you will need to add


*Note:* when you specify the custom sound file name omit the file's extension.
*Note:* when you specify the custom sound file name omit the file's extension.


### Stacking
## Stacking


By default when using this plugin on Android each notification that your app receives will replace the previous notification in the shade.
By default when using this plugin on Android each notification that your app receives will replace the previous notification in the shade.


@@ -306,7 +326,7 @@ Then send the follow JSON from APNS:
}
}
```
```


### Background Notifications
## Background Notifications


On iOS if you want your `on('notification')` event handler to be called when your app is in the background you will need to do a few things.
On iOS if you want your `on('notification')` event handler to be called when your app is in the background you will need to do a few things.