Android WebView with notification on new message - java

I have messaging php based application where users login and send messages to each other.
I created an android app that is a WebView pointing to that website to give and in-app feeling to my users.
Now I'd like to add a notification feature to the app which will notify users every time they receive a message.
Is it possible to do so with a WebView based application ?
Thanks

You could send a notification from the php using Google Cloud Messaging every time there is a new message for that user.
Take a look here http://developer.android.com/guide/google/gcm/index.html

Related

how to make real time notification in android using retrofit 2

I want to make real-time notification in my android app, but I don't know how to make it real-time and connected to the database
how to make my app can get/access data change from the database every time the database changing even when we didn't open the app
let's say every time admin sending notification, it will send data to database and it has column "read" and it will set to 0 and then user's app will immediately receive notification where the column "read" is 0, and when user opens the notification it will open an activity and change column "read" from database to 1.
You can use either firebase cloud messaging or user background notification service with web socket connection
There are many ways to achieve this type of real-time communication like,
Socket.
MQTT Protocol.
WebRTC.
Firebase Live Database.
Also, you can achieve this feature by sending notification from your admin panel to the user's mobile devices.
A common way is to implement Firebase(FCM) in your application and on your server. You can see how to implement FCM using this Offical documentation help Link https://firebase.google.com/docs/cloud-messaging/

Android webview with fcm

I have a website and I made FCM instant notifications with Google Firebase. Notifications working ok.
I want to make an android application that will just open the site as an application and publish it on Google Play.
I tried to do with a webviewer, the site work ok but I do not receive notifications and he don't ask for access.
Could someone give me some ideas to solve my problem?
You have to do a whole process to get Notification Push on your android application, you cannot receive (on the mobile app) the same way you receive the notification on your website.
See for more information : https://firebase.google.com/docs/cloud-messaging/android/client

How to add push notification to WebView App (both android and iOS)

Hi I am developing an webview app using Java and Objective-C. My client wants me to implement push notification in the app. But no push notification service (like firebase, OneSignal) is added in the website. is it possible to add push notification in the app??
Badly need some suggestions.. Thanks in advance..
You can still use Firebase when you dont want to add it to website.
i did it so :
FCM service on andoid registers device token to my MySQl server, my Webpage generates Push notifications, with PHP and Cron by selecting tokens from SQL.
When you want to create push notifications, then you need to add something to webpage anyway. (you have to generate message and also send them to devices who have installed your app. :). )
So :
FCM, MySQl, PHP/Java/js or something what selects message and token and sends them to FCM, FCM sends it to devices.

Facebook notification when event happens on my server

I'm new to FB API, and I'm completely lost through variety of them. I have Java web app, and FB login to it on my site. How can I send notification to user, when some event happens (for example, his good arrived, and we want to notify him)?
Should I use Cavans application, or Graph API? Is it possible?
https://developers.facebook.com/docs/games/notifications
Currently, only apps on Facebook.com can use App Notifications. Notifications are only surfaced on the desktop version of Facebook.com.
Meaning, App Notifications are for Page Apps or Canvas Apps and you can send them with an App Access Token to every user who authorized your App. I suggest reading the whole article in the Facebook docs, there are some important rules and a lot of important information.

How does the c2dm application push to the Android app?

I am new in Android and trying to develop an app with push notification. I have a small confusion on the architecture behind the c2dm, that after getting the authentication token and device reg_Id, the application server will send them along with the message, but how will the server will know to send the message to the c2dm server?
I am getting an error and even I am not able to add a google account on my emulator for synchronization. While doing this my emulator says com.android.calender not there.
Thanks in advance.
you have to call web service to sent push notification on particular device. And whatever the massage you want to pass on device is written in web service. you can make web service any any language like php or .net. Ask me if you have any query regarding push.

Categories