Alert Notifications from Asp.net to Android - android

HOW I TRIED:
I have a scenario in which teacher would upload an assignment alert on the server with following thing:
Title
Description
Downloadable Links
created date
Deadline
and the student would get these detail on an Android. I have done this work (the communication between server and client side using WCF webservices). All the data is showing in the ListView on client Side which are uploaded on the server.
WHAT I WANT
A push notification of that alerts on a particular dates e.g (if the teacher uploads an alert on 14 April then the user on the client side would get a push notification on the same date).
DealLine push notification of that alert on a particular dates e.g (the user would get a dealline notification of that assignment on a particular deal line)
I have studied about the GCM. is the best way to send a push notification on an android device. But I don;t think that the GCM is the appropriate solution of my problem? or I just simply go for the Android Notifications?
Does anyone suggest me the how can I do this work? Any appropriate solution for this, or I would have to use any third party library for this work? any tutorial that similar with this problem? THanks in Advance.

Related

FCM differences between Android and iOS about data messages

I'm using Firebase Cloud Messaging to send data payload and display notification in my Android and iOS apps. I'm integrating this in my iOS app and I'm in front of a curious thing.
Short story:
My notification server only send data messages (I mean JSON messages containing "data" field and with no "notification" field). In my Android app this is not a problem because I receive the message even if my app is in background in my Service implementation and I manually build a notification that I display. But in iOS case, how can I receive message when my app is in background to do the same? I mean if I add a "notification" field to my request I see the notification pop on my screen (when app is in background) and I can get data (located in the "data" field) after a click when my app is in foreground.
But can I have data when my app is in the background to manually display a notification?
Important precision:
The content of the displayed notification should be built app side and not server side because the server doesn't have enough informations, this is why I can't send the "notification" field in my payload message.
Thanks
EDIT: I solve (in part) this problem using this link. Shortly, I enabled both Background fetch and Remote notifications under Background Modes (and added content_available : true in the payload). Then I can process data received in didReceiveRemoteNotification: But now it still one thing: how make it works when my app is killed?
EDIT 2: I found something that could be the thing : that. Modifying the payload of a remote notification implies to handle incoming notifications before there are displayed. I'll try.
EDIT 3: Firebase doesn't support the mutable-content key required to make my solution found at EDIT 2 working. Discussion about that is here. So... Any idea?
I do not think it is possible to trigger "stock" notification on iOS from code the same way you do on Android using NotificationBuilder.
The only option available is to use hybrid messages with both notification and data payloads.
Check their doc for more information on hybrid messages.
On 16/02/14, Firebase added compliance with the "mutable-content" key. So that solved my problem and, I think, many people's problems.
Personal thinking:
I consider that 6 months late for this feature is really too much. I hope that future releases'll be up to date with iOS (as well as Android) releases.

Push notification for XMPP Chat App for offline users in Group

Everyone....!!
Greetings..!!
I am working on XMPP based Chat app . I have used XMPPFramework by Robbie Hanson https://github.com/robbiehanson/XMPPFramework
i have used OpenFire as XMPP Server
I am facing problem to get Push Notification for Group Chat when user is offline.
Currently I am able to get Push Notification for One to One Chat when user is offline . (For this I have created a PHP WebService which fetches the information from ofOffline Table every 60 sec)
But As there are no Offline messages Tables for Group Chat.
Can anyone suggest me How can I get push notification to group when user is offline in group
I need to manage this from Both Android n iOS Chat App
for Android i am using
https://github.com/siacs/Conversations
Look into ejabberd_mod_offline_post
First config the Room must be a Member-Only room, and add all users as members right after you created it, so that be able to get a total.
Add above model into ejabberd models.
Implement a Callback Service to handle the callback post.
The idea is when User go offline
In one-to-one case, offline_message_hook will be raised
In MUC case, muc_filter_message will be raised, and any one not Presence-Available is offline.
The best example would be AMP implementation in the Tigase. It is based on a MessageAmp plugin and AMP component.
The MessageAmp plugin intercepts messages. If it detects that the user is not logged in, it forwards the message to AMP component to store it in an offline storage. In your case, you could have your own Message plugin which, if it detects that the user is offline, could forward the message to your Push component (iOS push or Android push, SMS push or something else).
And all the logic responsible for actual pushing notification to the device should be implemented in that component.
Try checking this MUC - Light and use the mod_zeropush module to modify a bit to handle single and group push from the muc-light.
Its more like whats app , although you may not achieve 100% results as you expect but less complex than the tradition XEP-0045.

Push notification integration in meteor

I am having two applications one is for admin and another is for users.I want to implement push notification in it so that when ever user rate the offer in application then Admin can get notification of it with user phone-number and rating count.I found one good example of push notification but unable to implement in my application as its storing data in local mongoDb not in main so that my other application do not get the stored value in order to hit push notification.I am stuck at this point. can any one provide me a simple approach/process to achieve my goal.I am really new to meteor and have not much knowledge about it.
To implement Push-Notification I am taking reference of :-
1) https://github.com/richsilv/meteor-cordova-notifications/
2) https://github.com/richsilv/cordova-notifications-demo
Any help will be greatly appreciated.
Thanks.
I highly recommend using Parse:
https://parse.com/docs
They make push notifications super easy, and for an affordable price.

Phonegap PushPlugin with a badge number and grouping feature

I have used pushPlugin to recieve push notification in my phonegap android application. Everything is working correctly. Only issue is when multiple messages are present in the notification bar, the last message overrides the previous message. I would like to group all the messages under the app as whatsApp does.
I tried adding notId parameter and setting it to random number from my server side code. Doing this actually displays multiple notifications but does not group then.
I would also like to know how to add badge number to my app. Basically a number which will tell the user that so many number of notifications are come. As it is in whatsApp (ex. 2 messages received). I have added this plugin to handle that, but I am not sure whether it has to be done in phonegap or will i have to modify java code (plugin) to achieve this.
I know this topic is addressed previously here but there is no answer to it. hence i have raised a new question. Any help would be appreciated.
I do think (although I totally am not sure) that WhatsApp doesn't actually show separate notifications, instead it concatenates the non-read messages on server before sending just one new notification that overwrites the current as you said. For example, if you initially have one message not read causing this notification
WhatsApp
Hey dude!
and then you receive another message, the notification sent is
WhatsApp
2 new messages from 2 contacts
or if the sender is the same contact
WhatsApp
Hey dude!\n
What is up?
You could use the pushNotification.setApplicationIconBadgeNumber(successHandler, errorHandler, event.badge);if you only needed iOS support but as it doesn't support the Android for that feature you need to use something else and that plugin you mentioned looks good for it. Seems like it is quite easy to use like this (after it is installed)
cordova.plugins.notification.badge.set(3);

push notification in android own app using soap webservice

i have developed successfully one listview using soap webservice.here i have to insert 2 item on my database means that time (2 new item is inserted) the notification message is automatically comes to the top, clicking the notification will take you directly to the app and display listview with the 2 new items also.it is perform even my app is closed also like gmail.in gmail got any new message means that time the notification message is displayed,clicked that notification message means directly go to inbox and view that message. How can i implement this.
you can use GCM for this,
Google Cloud Messaging for Android (GCM) is a service that helps
developers send data from servers to their Android applications on
Android devices. This could be a lightweight message telling the
Android application that there is new data to be fetched from the
server (for instance, a movie uploaded by a friend), or it could be a
message containing up to 4kb of payload data (so apps like instant
messaging can consume the message directly). The GCM service handles
all aspects of queueing of messages and delivery to the target Android
application running on the target device
This document describes how to write an Android application and the server-side logic, using the helper libraries (client and server) provided by GCM.
Check these links,
http://developer.android.com/guide/google/gcm/gs.html
http://developer.android.com/guide/google/gcm/demo.html
http://www.basic4ppc.com/forum/basic4android-getting-started-tutorials/19226-android-push-notification-gcm-framework-tutorial.html
http://fundroiding.wordpress.com/2012/06/29/google-cloud-messaging-for-android-gcm-simple-tutorial/
for client side app you can find the code here
https://github.com/marknutter/GCM-Cordova
SOAP Service messqges are get only when the device requests something from the server. If you would like to use SOAP, you need to request from the server if there is a new item each amount of time (which is not really good practice). Then, if a new item is there, you can request the item by SOAP and insert this item in your array list and refresh the table.
A nicer way of doing is to use GCM (Google Cloud Messaging for Android): http://developer.android.com/guide/google/gcm/index.html
There, you can create a server side app where you will notify your device whenever a new order is inserted. You have a method onMessage() wher you can handle the message and insert it in your list.
It depends of what do you want exactly, the question can be developped more in details.

Categories

Resources