Android WebView app with notifications - android

I am making WebView app for a news website. I need help with setting notifications.
Steps that I have already done:
Set webView app.
Configure for firebase.
Defined basic MyMessageService and MyMessageIdService.
Tested push notification that I sent from Firebase to a device.
My question is: how to set my app to receive notification when new news is posted, or when a comment is made on liked news?
Thanks!

To send notifications on demand you have to do some things first:
collect the firebase tokens of all the devices that are using your
app.
save all these tokens against users or profiles
develop custom app server that will help you to send the
notifications on devices using these firebase tokens.
to develop your app server you can use the code from androidhive.
link to code of app server
for any further query you can ask in comment.
hope this help you.

Related

how to send remote notification in nativescript

We have a requirement to send notification to the Mobile App Users on periodic basis. (Say Every day morning 6 AM). We are using Nativescript to develop the Mobile Application.
Can someone help to confirm if this can be achieved? if yes, Any sample code/plugin/directions will be highly appreciated.
Thanks!!
If you want to do it from within your app, this might help (not using myself)
https://github.com/EddyVerbruggen/nativescript-local-notifications
Another solution could be to generate scheduled notifications from your server and push them to your app via FCM. In which case you could use this plugin https://github.com/NativeScript/push-plugin (I'm using this)
Yes, possible. Checkout the nativescript-plugin-firebase or nativescript-push. You will have all the details documented in the ReadMe along with sample code.
You might setup a job in your server which would fetch all the list of users and their device tokens you want to send push notification to, pass it on to FCM.

Laravel 5.2 with GCM push notification

I am trying to build a chat application.
I am using laravel 5 as back end and android device as my front end.
I am following this tutorial. They are using slim framework, But I am using laravel 5. I need to include GCM(Google Push Notification) into laravel so I am using this package click here. But they have give a variable deviceToken. I don't know how they are generating and sending push notification.
Any help would be appreciated. Thank you.
The device token is generated with JavaScript. You have to ask the client in the browser if he/she allows you to send him/her notifications. If he/she clicks yes, a device token is generated. You have to send it via ajax to laravel and store it in the database. Then you can use it to send your notifications.
I would suggest you fcm instead of gcm. Both are from google, but the one from firebase seems to be the future one.
You can find a package here: https://github.com/brozot/Laravel-FCM

Android Dev: sending push notification(message/link) from server(.net) to all devices having the app

I am new to the push notification subjet for android and I have an application with a .net web server as well as a remote database. I want to send a notification to all users which opens in a new intent. I have read about GCM and other third party platforms, but I was confused when they mention device registration ID, as I do not know how to get all the ids of all devices installing the app I am developping. Any straightforward tutorial or code helping me solve the confusion please.
Thank you in advance.
May be this can not provide complete answer to your question asked. But still it can help you.
GCM process works in this way.
at the first launch, your application will get the registration id from Google GCM server and give it to application server. Now the application server has all the registration ids in which your app is running.
Now you can easily dispatch push message for all devices.

Mobile Push Notification using Web App

1- I want to write a simple web app (not native) used to send my clients news via push notification on ios, android, etc.
I found pusher.com, but the demo is not working.
It could be great if I can link it to my rss url, so they can get notified whenever a new record is added.
2- I want to add shortcut of my app on client devices.
Thanks
You can use GCM for android, and APNS for iOS, and there are many tutorials of these. Especially, iOS very strict rule for push notification, or your app will be rejected.

PushNotifications - How to Implement

I am a newbie in android. I have developed few applications, but all are plain and simple, just used the built in features of android.
I was asked about push notifications, in one of my interviews and I decided to have a look at what Push Notifications are. I understand the concept of Push Notifications(I think), but whenever I read the term "Server", it's freaking me out.
I understand all the client side coding, but I don't get how to implement the server side coding. I have seen some people use XMPP, MQTT, etc., What are those? Here is my scenario and what I want to know..
Scenario ::: Let's say I have a website, with a table (the values are retrieved from database), where I update a few columns every day. I want these updates to be reflected in my android application. So, as I have read, push notifications can tell the application that there are updates available. Good. I am fine till here..
When the application gets the notification, should my application, contact the website and get the latest information? or will the updated information sent through Push Notification? I guess, my application would be contacting the website and get the information. Now, how do I get the data from the website? Should I get the source of the page and do some kind of parsing or something?
I will be asking more questions, as the experts clear my questions...
Sorry, if my questions are too naive, but this is the only place that can help me...
Push Notifications means Google Cloud Messaging for Android (GCM) is a service that allows you to send data from your server to your users' Android-powered device.
You can refer to this documentation
Google Cloud Messaging for Android
GCM: Getting Started
And there is also Demo App Tutorial given
in your case you need to create HTTP web service for getting data from the server.so when you get notification about update on server side.you just need to call this web service and get the data you need to update

Categories

Resources