Push notification in android using SignalR - android

I am working on an android application and basically, I want to send a push notification when the user is connected to a local server as well as when connected to the internet.
I see SignalR as an option, but as I am new to this, I want to know can signalR be used to send Push notification like FCM? Also, can it work if the user is offline and receive it when he comes online or gets connected to the local server?

Related

How can I test push notifications using Testcafe

My organisation is looking at implementing 2 step authentication using push notifications sent to a mobile app on Android or IOS and I am struggling to automate the associated scenarios within our Testcafe testsuite, which include
enabling 2SA and connecting the mobile device via QR code scan from the web page and push confirmation
Login, where push notification is sent to the mobile device automatically after success username/password authentication
disabling 2SA via an automatically sent push notification to the mobile device
Is it possible to automate these scenarios using Testcafe, maybe using some mobile emulator or 'catching' the notifications at the API? To my knowledge, Testcafe is foremost targeted at browser testing and can also do API calls, but not consuming API messages without an associated call.
If you mean mobile push notifications (not web push notifications via Push API), there is no way TestCafe can access them since these notifications are native.

How to push notification to mobile (Android)

I have a question about Push Notification,from odoo to android
i want something like this
https://www.youtube.com/watch?v=TDa8KLGQt2I
I am searching for information about custom push notification. I want to implement a tunnel between server(odoo) and devices (Android ). When it comes a time server should send information to device (App).

Standalone push notification server implementation

I want to implement my own push notification server, more than a need for the product I want to know How it can be implemented.
I read documents for XMPP servers like tigase, ejabberd and openfire. I know that XMPP servers can handle online messages really straight forward, just like sending notifications as chat messages. Here is what I think is true:
Hypothesis: Having an OTT (i.e. Telegram), you can send notifications or chat messages by the XMPP client (the mobile app) and an XMPP server (i.e. ejabberd), or think of a pub/sub app that gets server status changes on a mobile device is using ejabberd as XMPP server and another XMPP client as an app on mobile.
My question is, if the hypothesis that I mentioned above is right, a push notification server would be a message queuing server to queue Pub/Sub messages for offline users and an XMPP server to send notifications/messages to online users.
Is it right? I can have my own GCM-like server by having a message broker to handle the queues and an XMPP server to handle message sending?
You can definitely use an XMPP server like ejabberd to implement your own push notification service on Android. You need to have an application that stays constantly connected and will use the local Android API to display notification on the mobile when receiving a message.
On Android, receiving a notification is clearly separated from displaying it. It means you can receive it by any mean you like, but still display it as a standard notifications, even if it did not come to your device through GCM

Send notification from Android app to any other device

I am developing an Android application that can send notifications (not "push") to any other Android device. Apart from Google Cloud Messaging (GCM) are there any alternatives to do so?
I do not plan to use GCM. My only requirement is to send the notification from my app to any other device via either Bluetooth or WiFi.
I have tried using the basic Notification API for Android but I could not send a notification to other device. It shows me a local notification.
this may helps https://www.firebase.com/docs/java-quickstart.html
firebase sync the devices and whatever you send it to server it automatically pushes that in other device

push notification to get device location

Hi i want to use push notification on android device and get device location for more information
I want to write application for android that when server want to get android device location push a notification timely to the device and the application on the device send device location to server timely.
I can't use Cloud to device messaging service because this service need that user first online and after user is online send server notification with C2DM service!.But i want to send notification to device and get device location any time server wants.
For any sort of push notification to be made possible, your client will need to be online. An offline client cant accept push notifications until it is online.
A C2DM push can be initiated by the server. No need for client to start it. The server just needs to send a message to the C2DM server and notification will be sent.
What you basically need to do is, on receiving the notification from C2DM server, make your C2DM base receiver call a function, which retrieves the clients location data using LocationManager and send it to the server.
EDIT for MQTT:
i havent done this much myself but it can be used for push service
You need:
an MQTT broker which runs on the server side, like the mosquitto broker which is Open Source.
an MQTT client library which you include in your Android app, enabling your app to connect, subscribe, and publish messages. refer this http://mqtt.org/software
to come up with a way of uniquely identifying users or devices, and then use that as a topic so that you can individually publish a message to one device.

Categories

Resources