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

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()

Related

How do I use FCM with codeigniter sql webpage?

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.

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

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

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