Hi,
I am trying to use the nativescript-push-plugin with Telerik platform (for now on Android). At the end of my login procedure (includes authenticating the user with Telerik platform) I call the method below.
```
import {Injectable} from '@angular/core';
import {ConfigProvider} from '../providers/config';
var Everlive = require('everlive-sdk');
@Injectable()
export class BackendProvider {
public telerik:any;
public devicePushSettings:any;
constructor (public config: ConfigProvider) {
this.telerik = new Everlive({
appId: this.config.telerik.appId,
scheme: "https"
});
this.devicePushSettings = {
iOS: {
badge: 'true',
sound: 'true',
alert: 'true'
},
android: {
projectNumber: this.config.telerik.googleFirebaseSenderId
},
notificationCallbackIOS: ((event) => {
console.log('receivedPushNotification: '+event.payload.title);
}),
notificationCallbackAndroid: ((event) => {
console.log('receivedPushNotification: '+event.payload.title);
})
};
};
public registerPushDevice() {
var pushPlugin = require("nativescript-push-notifications");
/* register pushPlugin with Telerik platform */
this.telerik.push.register(this.devicePushSettings, () => {
console.log("Successful registration in Telerik Platform. You are ready to receive push notifications.");
}, (error) => {
console.log('Failed to register push device in Telerik Platform');
console.dump(error);
});
}
```
This results in in an error `{ "code": "MODULE_NOT_FOUND" }`. The thing is that AFAIK the pushNotification module is found properly, because if I register with firebase directly it works just fine:
```
public registerPushDevice() {
var pushPlugin = require("nativescript-push-notifications");
/* register pushPlugin with Firebase directly */
pushPlugin.register({ senderID: this.config.telerik.googleFirebaseSenderId }, (data) => {
console.log("Successful registration in Firebase. You are ready to receive push notifications.");
}, (error) => {
console.log('Failed to register push device in Firebase');
console.dump(error);
});
}
```
Any idea what might be going on? I already updated the everlive-sdk to the latest v1.9.2 but it didn't help either. I did update the `build.gradle` and `google-services.json` according to the docs (I guess otherwise the Firebase registration would not work). Also I removed and re-added the android platform to rule out any issues with that.
Thanks!