what is the proper way to save a firebase push notifications sent - php

I'm using firebase push notifications php api with android...
When I send a notification from firebase API, to android device, I also make a MySQL input, to register one copy of that, and work!
but...
What happen when the API sends too many push notifications?
There is no problem with my shared server?
I'm worried that my server will collapse for too many records for each push.
Right now It work like this...
Firebase API PHP send notification -> MySQL register that notification in one table -> Android Device recieve the notification.
but I don't think this is the right way...
so... the question is...
what is the proper way to save a firebase push notifications sent...?

Related

How to trigger Remote push notification using php when firebase data changed

Goal :- Detect database changes of firebase.
I am using firebase PHP CLIENT.
With using firebase php client i am able to
Connect to firebase node
Add / update and delete nodes.
List number of nodes.
Above functionality works perfectly.
But i want to achive functionlity of push notification when user goes offline in to the group as well as person to person chat.
Firebase database is real-time database so, how can i detect the changes of firebase database nodes so i can keep on watch on the message node changes and i should fire my push notification API from php.
The main functionality i want to achive is sending push notifications to group and person to person using firebase chat to mobile platform ( Ios and android ) .
Is there any alternatives avaialable for the same? OR any plugin which will does the same job?
Or in the another way is there any posibility to send push notifications using mobile end ( web independent ) ?
Any help would be appriciated.
Thanks in advance.

How to send Gcm notification to one app to other

I am wondering if it is possible to send push notifications to different Android applications. I can already send a push notification in same application but I want to send notification to different applications of mine. I have user application and driver application. I need to send push notification when user create order and driver get notification that "A new order is come" after driver accept. Acknowledgement notification get back to user.
I am using two different Google API for both Application, I think, its not good way...
Please give idea about this. ? thx
What you want is possible and not that strange at all, you have two applications registered for push in the developer console with two projects ids and want each of your Android application to be able to receive notifications from both ?
If thats what you want its possible you just need to register to both sender ids in the android applications check.
https://developer.android.com/google/gcm/adv.html#multi-senders
basically:
...
if (gcm == null) {
gcm = GoogleCloudMessaging.getInstance(context);
}
regid = gcm.register(SENDER_ID_ONE, SENDER_ID_TWO);
....
push notification with 2 different apps are possible,i make it one database for both apps for save token id, generate 2 push notification. its working fine

Apple Pushnotification Issue

I am new for apple push notification. I am currently working on ios app with chat funcationality. For this app, web-services are built in PHP.
There is a functionality, when user send a chat message to another user that time we send a push notification through PHP that web-service to message receiver user.
Notification working fine that I have checked.
Now issue is, sometimes push notification works fine but sometime its not.
So I want to know when ios push notification fails to send.
I have put write to log and log shows notification sent successfully.
Thanks in advance :)
You can use the Feedback service to get information about failed push notifications via APN:
https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/CommunicatingWIthAPS.html#//apple_ref/doc/uid/TP40008194-CH101-SW3
Looks like the link doesn't anchor to the section - so you will need to search for the entry
:( sry.
Hope that helps

How to send notifications from an Android Phone to a website?

I am currently working on my project like Parental control. I am trying to find a way , that if there is any procedure or way to send a notification from an android phone to a website whenever the android phone sends/receives an SMS and dials/receives a call. On website , a database will be maintained for these notifications.
You could send a get request or post request to a website.
Sending POST data in Android
Android - Sending HTTPS Get Request
Just some examples. You will probably be looking for a restful api. I haven't read this, but it looks viable:
http://www.9lessons.info/2012/05/create-restful-services-api-in-php.html
I think you want to maintain database, based on mobile even. You can create API call, that will send data to database while any activity happened on mobile. That api will store notification on DB.
On web you can create AJAX call that will check in DB, if any new notification come or not, if new record found you can show it on website.
This is what I think the best way to do so...

PHP and Android GCM push notification - How to store users

I have my Android client application that wait for a push message from the GCM Google server... on the server side, my web must store the registration ID of the device, in order to send the push notification to this specific device (calling the GCM Service with a specific PHP class).
The question is, how can I refresh the registration Id of the device every time It is registreted on the Google GCM servers? How can I associate to each users on the web app to a specific registration Id of the android app?
You can use PHpmyadmin tool to creat the data base and use the php script to open,store registration Id and close the db.

Categories