How to customize push notifications in Bluemix - android

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.

Related

Not sure how to design in app notifications from interactions (likes, share, etc...)

I am developing an Android application in Kotlin that can be thought of as similar to Instagram.
I am designing how to implement my in-app notifications. By "in-app notifications" I mean interactions such as likes, publication sharing, new chat message, etc.
For the moment, I do want foreground notifications. The notifications would not involve any view component.
The proposed flow would be:
Interaction action from Client_1 (like, share, message) triggers an Event_A in the server.
Event_A produces a state change and generates a notification to Client_2.
Client_2 receives the notification
a. Display a badge in the notification icon bar.
b. Generates a new item in the notifications list when Client_2 open it.
I make this clarification because, while searching this, I've seen "in-app notifications" are related to campaigns, publicity, new features, etc.
So far, I though two possible implementations but not sure if they are the right ones.
1 - Web Sockets
My app already uses Web Sockets for handling chat messages. However, so far, the connection is only open when the user enters to the chat view.
I consider easy to implement but this implies having an open connection the entire time the user is on the app and may be an unnecessary load for the server and an increment on Web Socket's time session.
2 - SNS + FCM
I've found that AWS SNS and FCM (Firebase Cloud Messaging) is a common approach for handling notifications.
However, reading the Firebase's documentation and examples, I understand it's mostly used for the other kind of in-apps notifications (campaigns, publicity, new features, etc).
In this FCM's documentation, it defines two types of messages: Notification Messages and Data Messages. I understand, Data Messages would be more appropiate for my use case.
Don't know it is worth the complexity of configuring FCM and handling the token's lifecycle.
So, my questions are:
Are the above scenarios good approaches? Is there any other way to achieve this?
Which is the correct term for this kind of notifications?
FCM is just normal push messaging. It can be used for any type of data. It's just a general method for a server to push data to an app, even if the app isn't running at the moment. So it's the right answer. The problem with web sockets is it won't work if your app is shut down either by the user or by the system.

Alarm system in Android

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.

Can I set the "Difference push receive setting in firebase?"

I am now trying to make a mobile app push notification service on Firebase. But the function description is not quite specific as I expected.
I want to know these functions are available on Firebase. If not, It would be pleasure If you tell me other tool.
User can select the push message types they want to receive.(Ex. Receive sale information push, Do not receive game event push)
Instantly send auto push messages when user triggered certain condition.(Ex. Send appreciate push message when user closed their first app-open)
Thank you
Can not tell in much description here:
1. User can select the push message types they want to receive.(Ex.
Receive sale information push, Do not receive game event push)
You can use FCM's channeling feature,
You can set different channels.
Show the list of channels to user.
User can subscribe to the required channel.
User will receive the specific channel notification only.
Please refer : Notification Channel
2. Instantly send auto push messages when user triggered certain condition.(Ex. Send appreciate push message when user closed their first app-open)
You have manage this thing in your front end and backend logic.
Like on app close send request to the backend (can use onDestroy method )server and then the backend server will send notification.
Hope this will help you.
For Feature 1:
You can achieve this without even doing anything. Just send all notifications to everyone. However, use different Notification Channels. Users, can then choose to turn on/off certain notification channels using the Android system features (in relatively newer versions of android).
Another way could be to send these notifications to different FCM Topics. Give the users a settings pages, where there can select what kinds of notifications they would like to receive. In response to their selections, subscribe or unsubscribe them to the respective FCM Topic.
For Feature 2:
There could be several hundred ways of doing this. Can provide better advice if you could provide more information about your requirement.
If you talk about your example requirement
(Send appreciate push message when user closed their first app-open)
You can do it without any server, or push messaging scheme. Just keep track of the first_open event inside the app using Shared Preferences. Once you detect a first_open event, just compose a notification inside of the app locally, and show it whenever you like.

Amazon SNS Push Service - used for friends request in android app

I have a question concerning the design of my app. I have different users, which I want to socially bound as friends. This requires a proper notification for the other user as well as accepting the request.
My question is how to do it with AWS? I have users stored in Cognito Identity Pool. Should I use push notifications informing the user about friend request? If so, how to send a push notification from one android device to the other?
If not, how else should I design it? And if I want to implement notifications inside the App is Push service still valid (encoding by Lambda, something like this?) or should I use something different?
Kind regards,
Grzegorz
In general you don’t want your app to have permissions to send push notifications directly to other devices. Assuming you have each users device tokens, using a Lambda function as you mentioned to send an SNS push notification to the potential friend's device which could then trigger a flow which could allow them to accept and link as friends (depending on how your friend flow works).
You can find some helpful SNS documentation at http://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html. Mobile Hub can help you get started quickly, and will create an app that can receive push notifications, and trig (https://console.aws.amazon.com/mobilehub). You can also use Mobile Hub to add Lambda to your mobile app.

Push Notification from one android device to another

Here I am developing an android app which deals with housing complex.
In this app their are 2 kinds of users:
Builder/Complex Owner
Flat Owner.
Now here the Builder/Complex Owner can send push notification to flat owners.
How can I achieve that? Please help.
Here I cannot use G.C.M as G.C.M. is used for server side push messaging.
Not sure if there is any other way. What you could do is to let the app send a push notification request to the server, then the server would issue the push notification through G.C.M. If you don't have a server available you could do it through text messages but be sure to have a good text messaging plan. You could possibly also use an existing service (for example Facebook) and send the messages through their API.
EDIT:
To do it via text messages: SMS receive with no notification. Again, make sure that you have a good text messaging plan if doing this. Sending an SMS to ten different people will count as ten different SMS messages.. If you have a lot of users it would probably be cheaper to get hold of an SMS server. But then again, you should just use G.C.M.
It is possible to send device to device push notification using gcm.See this link.

Categories

Resources