Skip to content
This repository was archived by the owner on Feb 7, 2019. It is now read-only.

Commit 9c6cfb4

Browse files
committed
Add link to using with telerik backend services
1 parent 509cb28 commit 9c6cfb4

1 file changed

Lines changed: 11 additions & 4 deletions

File tree

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The code for the Push Plugin for NativeScript.
55
- [Getting started](#getting-started)
66
- [API Reference](#api)
77
- [Troubleshooting](#troubleshooting)
8+
- [Using with Telerik Backend Services](#using-with-telerik-backend-services)
89

910

1011
## Getting started
@@ -15,7 +16,7 @@ The code for the Push Plugin for NativeScript.
1516

1617
or use an existing one.
1718

18-
- Add the Push Plugin (from NPM). This will install the push plugin in node_module, in the root of the project. When adding a new platform (or using an existing one) the plugin will be added there as well.
19+
- Add the Push Plugin (from NPM). This will install the push plugin in node_module, in the root of the project. When adding a new platform (or using an existing one) the plugin will be added there as well. Go to the application folder and add the push plugin:
1920

2021
tns plugin add nativescript-push-notifications
2122

@@ -30,12 +31,12 @@ The code for the Push Plugin for NativeScript.
3031
tns library add android C:\Users\your_user_name\AppData\Local\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\libs
3132

3233

33-
- Add sample code in app/main-view-model.js in the function HelloWorldModel() like this one to subscribe and receive messages (Enter your google project id in the options of the register method):
34+
- Add sample code in app/main-view-model.js in the function HelloWorldModel() like this one to subscribe and receive messages (Enter your google project number in the options of the register method):
3435

3536
```javascript
3637
var pushPlugin = require("nativescript-push-notifications");
3738
var self = this;
38-
pushPlugin.register({ senderID: 'your-google-project-id' }, function (data){
39+
pushPlugin.register({ senderID: '<ENTER_YOUR_PROJECT_NUMBER>' }, function (data){
3940
self.set("message", "" + JSON.stringify(data));
4041
}, function() { });
4142

@@ -127,7 +128,7 @@ The code for the Push Plugin for NativeScript.
127128

128129
var settings = {
129130
// Android settings
130-
senderID: GOOGLE_PROJECT_ID, // Android: Required setting with the sender/project id
131+
senderID: '<ENTER_YOUR_PROJECT_NUMBER>', // Android: Required setting with the sender/project number
131132
notificationCallbackAndroid: function(message) { // Android: Callback to invoke when a new push is received.
132133
alert(JSON.stringify(message));
133134
},
@@ -311,3 +312,9 @@ In case the application doesn't work as expected. Here are some things you can v
311312
### iOS
312313

313314
- Error "Error registering: no valid 'aps-environment' entitlement string found for application" - this means that the certificates are not correctly set in the xcodeproject. Open the xcodeproject, fix them and you can even run the application from xcode to verify it's setup correctly. The bundle identifier in xcode should be the same as the "id" in the package.json file in the root of the project.
315+
316+
## Using with Telerik Backend Services
317+
318+
In order to use the plugin with Telerik Backend Services take a look at the official sample:
319+
320+
[Telerik Backend Services NativeScript Push Sample](https://github.com/NativeScript/sample-push-plugin)

0 commit comments

Comments
 (0)