I need to create an alarm system in android that controls when a value reaches a predetermined limit send me a notification.
I have no idea where to start, I saw tutorials for onesignal, firebase and android, I could implement an example with onesignal and from the onesignal page I can send a notification and receive it from my application, but what I don't know how to follow is how to connect with my database and get the value that indicates that I have to send an alert.
Can someone tell me what to look for? How to guide me?
Best regards.
You need to send push notification to an Android client, for example when the product price is lowered to 50 USD. So you need to check the changed price and when the price is changed and the new price is suitable for informing your Android client, you can use OneSignal Create Notification API. Of course you can use another tool like Firebase etc. You can send push notification via OneSignal API, Create Notification method from any platform. You can check it and if this scenario is good enough for your requirement then you can try it.
Related
I am developing a mobile application which requires a push notification to notify the user when a certain condition is met. I am new to this and I discovered multiple ways to implement a push notification.
However, I am unsure of which one is best to be implemented. I am new to mobile app development so I am unsure of how to differ both of them.
From my understanding, androidx NotificationCompat is easier to be used but my SV suggests me to use Firebase Cloud Messaging instead.
Short answer:
NotificationCompat is the helper class for the developer to access in android.app.Notification.
Firebase Cloud Message(FCM) is a cross-platform messaging solution that lets you reliably send messages at no cost.
I can't help you make a final decision, I just list the positive and negative options of them, hope can help you.
For FCM
To notify the end-user of the new message which you want them to know(eg. bouns/upgrade, even though the cycling message at 18:30 every day, etc).
Help the developer to track the lifecycle of the notification(how many were opened? how many were canceled, etc..)
Help the developer to Customize the Notification Styles, and can also preview them in the console of the FCM.
Can also implement your own background and send your customized message to the background center of the FCM with XMPP
Can also send message to the part of the user
With some topic(eg: send message to the user who enters some page or use some function)
With some age(eg: send message to the user who ages between 29 and 25 years old)
For NotificationCompact
use for local, hard control from your backend.
others...
Can I use Onesignal to send a notification of order changes to an Android device then if the user already opened the application on order's page/view the notification will be not shown but the order status on that page will be changed?
If yes, can I know the reference of documentation/tutor? If no, what are alternative ways to do it?
I have a project using Onesignal to send the notifications to the android devices. Currently just Simple notif, but my boss asked me to make the mobile app can auto change status order without user action. I'm a backend engineer, not an android dev so I don't know what really works of Onesignal in android. I just know Onesignal can be used to send the notification but what about data process after notification sent?
This is what I understood: Your app has some kind of market or something from which people can order stuff. So, you want to know if OneSignal can send automated notifications as the order status changes?
If I have got it correct, my best guess will be, no. OneSignal can only manually send out notifications. The closest one can get with OneSignal to automations is scheduling notifications to be sent later. To achieve your purpose, your Android devs will probabaly have to write some code on their own and integrate it some way with the order status and all. Or else, your boss will have to appoint a few people who can track the order of the people and manually send out notifications to them using OneSignal (but, identifying the correct device might not be so easy).
That's my guess. But, OneSignal's support team is pretty nice. They might take a few days to answer, but, it's worth asking them if they can help your developers integrate the order status and OneSignal's notifications in some way.
I want to notify android users(students) whenever they got failing grades. I tried using Firebase notification, but what I can do about it is to manually type messages in my firebase account and send it to users. I want to send notification to specific users automatically depending on the condition in my codes. Thanks in advance.
I suggest you to start with Firebase Notification
Less code and reliable
You can start with code sample
https://firebase.google.com/docs/samples/#android
and find the Cloud Messaging sample
You can also archive this by using Realtime Database that will provide data changed listener every time data is added/updated. And you can take this advantage of the listener to notify your Notification in Android
The latest launch of Firebase notifications feature allows to manually give the time and content of notification. Is it possible to automate it so that notification is received every time a particular variable is changed in the Firebase database?
Thanks for the reply Hamid. I didn't want to get into the technicalities of GCM therefore I implemented the notifications using a service. This service listen on the Firebase database and sends a notification whenever new data is added there.
I think you would have to setup a GCM (Switched to FCM now) server that handles all that. But I also do wish that there was a simple way of setting that up without needing to build a full server.
There is a friendlyping application that helped me set the XPMM server.
I think the current Firebase Notifications are very much in its early days. It doesn't provide many of the functionalities of Batch.com or Parse Server... yet.
I'm trying to configure NodeRED to send notifications to the Android apps on devices of a specific user and people who are registered as his family in the logic. I have never dealt with push notifications and I don't know what to look for so steps or even keywords to look up is appreciated.
It depends. Generally you can now see flows of your notification service. In the Node-RED flow editor, double-click the notification node to open the Edit function node dialog box. You should edit the payload object to customize the message notification.
Here there is an example that could be useful for you http://www.ibm.com/developerworks/library/wa-nodered-push-app/
I suggest using tags to group this 'family' of users together. After creating the tag, you will need some logic on the Android side to identify if the user is part of that family. If they are, you can subscribe them to the appropriate tag, then you can send a notification to all subscribers of that tag with one REST call. See the Bluemix doc Enabling tag-based notifications for more info.
As a general note, you can also send notifications to single users if you have their device ID. The device ID is included in the response after registering with the Push Notifications service and should be saved somewhere if you plan on using it for very specific push notifications. Something to consider, let me know if this helps.