How do I use FCM with codeigniter sql webpage? - php

I am trying to implement a notification features on my android apps using firebase FCM on a sql db. My question is, I have a web page for admin to input the data. Is it possible to have whenever the admin updated the data, it would notify all the user's device? If so how do I do it? I am using codeigniter for the webpage.
I am still a beginner in programming and would appreciate all the help you guys can give.

In order to receive msg-notification from firebase, you have to do some 2 steps :
Using your web-admin page to send msg to FCM backend using Firebase Admin SDK.
Register user'device with google FCM backend.

Related

I need to send a message to android app after the customer bought something in my php shop

I need to send something to tell the android app that a customer just clicked the buy button in the page. The online store is written in php, and is embedded into android app by webview.
Usually I will write api to android, and they will just call the php url, then my php can communicate with the front end. However, in this case, it seems that the android has to provide me some kind api to call, so I can send my data to him.
Or is there a way android can set a listener to check if the buy button is clicked?
You can achieve this using 2 ways.
1) Create a java-script in your PHP code and from android Webview you
can call that java-script to check whether button clicked or not. You can refer this for implementation.
2) You can use Firebase Cloud Messaging Or anyother 3rd party Push
Notification services. But for my opinion FCM is best and you don't
need to pay for it. You can refer this for implementation.

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 Mobile Application Link For iOS and Android In SMS API from PHP?

I have query about SMS API. I am aware about the SMS Gateway Integration Using SMS API
But my question is how to redirect the user to the respective marketplaces (Google Play and iOS app store) from the link sent via SMS gateway
Well I found some solution for redirecting users to there respective marketplaces.
Solution 1
Use third party tools which give you a single link to send via SMS and when user click on that link they will redirect to there market places.
below are some link which help you to get that Single link for your Mobile Application.
One Link
Branch Metrics
many more
Solution 2
Make a web page where you have to check user's device and Conditions to redirect user to there application store. Send Web Page Link in SMS.
Hope this will help Some one.

How to retrieve Registration ID on Android Device in WinDev Mobile 20?

I'm new to WinDev Mobile. In the project that I'm working on, there is a need for implementing Push Notification with use of GCM.
The notification will be sent from PHP script running on our web server.
For this, it is necessary that the mobile app registers with Google Cloud Messaging (GCM) . This seems to work, But I'm getting the Registration ID like this as a String type.
!‘‰åpWx£Üx½ZÌì–´äUü;jÚÿ†Pȧ#úùrjIìÑtð*æW‹1ç‰Yæµß;Ar‘ýãU»ç
I've to do this because I'm not able to send Buffer content to MySQL. For communicating between mobile app and MySQL I'm using c_PHP4WM 7.0 webservice.
In MySQL the field name is pn_reg_no and its datatype is text. Is this correct?
Try to convert that string with function StringToUTF8()

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...

Categories