Subscribe user in OneSignal via proxy in QT app - qt

IP address of OneSignal is now in registry of prohibited sites of Russia.
I have Android and iOS app using OneSignal for push notifications. Before I can send notification to specific device, this device has to be subscribed by using OneSignal SDK. After that I can take playerid to specify device for which I want to send a notification.
Because of IP address block I cannot use SDK directly. But I suppose that it's possible to setup a proxy, so all api requests of SDK will go throw it.
App is written using Qt, QML and Java/Objective-C.
I've tried QNetworkProxy using provided example with some free proxies from here. But I've got errors not just requesting OneSignal SDK but my server api as well.
So the question is how to setup proxy in QT app (using qt, qml, java whatever) to make all OneSignal SDK API requests go throw it to bypass OneSignal IP addresses blocking?

Related

How to subscribe to events over http in firebase messaging service?

As far as I understand for different mobile devices, firebase messaging service uses different protocols like web push, ans, google play services. But is there a way to notify non mobile device using this service?
Delivery of messages over Firebase Cloud Messaging is only supported to the SDKs listed in the documentation here, currently iOS, Android and Web. There is no documentation for the wire protocol that is used to deliver messages to these clients.
Also see these previous questions asking for delivery to Windows, macOS, and Linux:
How to receive push notifications from Firebase cloud messaging on Windows
Is it possible to develop flutter windows desktop with fcm push notification?
integration firebase messaging with mac os apps ? (Notifications)
Can we use FireBase cloud Messaging to send or receive messages or both ways using C++ on Windows Desktop/Console or Linux console appliction?

Firebase push notification device to device

I am coding a React Native app and I using Firebase push notification service.
In my app, users can send message for each other and I want to notify them when they get message.
I found one way for native android I can code for react native it is not problem just I want to know if there is better way. I can make post to directly to Firebase service with using Http post.
This is the link which way I found: https://blog.usejournal.com/send-device-to-device-push-notifications-without-server-side-code-238611c143
I want to push notification to specific device without server, is there another way to do this?
Sending a message to a device with Firebase Cloud Messaging requires that you specify the FCM server key. As its name implies, this key is supposed to only be used in trusted environments, as knowing it allows one to send any message they want to all users of the app. For this reason it is not possible to secure send messages directly from one device to another device with FCM.
Instead you will have to run code in a trusted environment, such as your development machine, a server you control, or Cloud Functions. Your client-side application code invokes the server-side code, that ensures the call is authorized, and then calls the FCM API.
For more on this see:
How to send one to one message using Firebase Messaging
How to send device to device messages using Firebase Cloud Messaging?

Push notifications API for Appcelerator

Is there way to send push-nofications in Appcelerator not from console (https://platform.axway.com/)?
For example does Appcelerator have custom API to send push-notifications? e.g. our server sends request to appcelerator API and it sends push-nofication to devices.
There are tons of free and open source modules out there with which you can set it up yourself. Some rely on services like Onesignal, others are completely open.
Keep in mind, for iOS you don't need a module, you just get the token (as per docs) and then you just send it to your backend and it works.
A good module for Android with which you can use your own backend is Ti.Goosh
Yes you can use axway REST API to send your push notifications.
https://docs.appcelerator.com/platform/latest/#!/guide/Push_Notifications

Is Firebase client SDK necessary for simple APNS?

I have a project that currently sends PNs through APNS and I'm investigating using Firebase for this purpose. I would prefer that the push notifications be sent through APNS and Firebase merely acts as a wrapper/intermediate around APNS. I'm not using any other feature of Firebase(storage, persistent connections, messaging, etc) either.
All guides/examples on this topic seem to integrate the Firebase SDK and relevant config files but I don't see the need for any client side change if the notifications are going to go through APNS.
Do I really need the Firebase SDK for simply sending PNs? If yes, for what reason?
You only need the Firebase SDK if you intend to use the service.
The behavior of FCM, as you know it, is that when you send a message with FCM, it forwards the message towards APNs, which in turn would send it to the iOS device.
If you're already fine using APNs alone for the push notifications, then you technically don't need the Firebase SDK.

GCM: Message sent on a topic does not reach the browser

My setup include a webapp, a backend server and an android app.
I want to be able to chat between my android app and webapp.
Init:
Android app has subscribed to the topic /topics/chatGroupName
Similarly on browser, I get the registrationToken and send it to my server where I use code similar in https://github.com/ToothlessGear/node-gcm/pull/211/files (addToTopicNoRetry) to subscribe the browser to the topic: /topics/chatGroupName
When I send a message from the web, I use my backend server to send a GCM message on a topic like /topics/chatGroupName and the android app receives this message.
But when I send GCM message from Android app on this topic /topics/chatGroupName, I dont get any notification on the browser app.
Even my https://iid.googleapis.com/iid/info/REGISTRATION_TOKEN?details=true shows that this registration token has already subscribed to /topics/chatGroupName
Firebase has now released javascript library that supports FCM push notifications with support for topics.
Ref: https://firebase.google.com/docs/cloud-messaging/js/client

Resources