Hello.
I have problems with understanding plugins for pushes. I have mobile application which can recieve push messages. Push messages i send to mobile only from my c# server.
I use Push class from ionic/cloud-angular to recieve push messages. I get DeviceToken from code
this.push.register().then((t: PushToken) => {
return this.push.saveToken(t);
})
And i have c# server with send push notification to my mobile apps throught ionic push api, like this:
string url = "https://api.ionic.io/push/notifications";
var httpRequest = (HttpWebRequest)WebRequest.Create(url);
var PushParams = new PushParams();
PushParams.tokens = DeviceToken ;
PushParams.profile = "prod";
PushParams.notification = new NotificationData() { message = "text" , title = "title"};
string json = serializer.Serialize(PushParams);
var httpResponse = (HttpWebResponse)httpRequest.GetResponse();
Push messages income correctlym, but very slowly. For exsample 1 hour…
After ionic said, then ionic cloud push wil not supported (http://blog.ionic.io/sunsetting-ionic-cloud-push-and-auth/), i start to find new solution.
And now I’m confused…
I want to send push throught firebase api like this
WebRequest tRequest;
** tRequest = WebRequest.Create(“https://fcm.googleapis.com/fcm/send”);**
** tRequest.Method = “post”;**
or by onesignal api https://documentation.onesignal.com/reference#create-notification
var request = WebRequest.Create(“https://onesignal.com/api/v1/notifications”) as HttpWebRequest;
What is difference betwen them?
And what plugin in mobile app can I use?
I find a lot of ionic plugin like
phonegap-plugin-push https://ionicframework.com/docs/native/push/
OneSignal plugin https://ionicframework.com/docs/native/onesignal/
cordova-plugin-firebase https://ionicframework.com/docs/native/firebase/
Why does so many plugin exists? What is difference betwen them?
Explain me please somebody…