PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WM] - What permissions should be set for PUSH notification?
[WM] - What permissions should be set for PUSH notification?
Débuté par Yogi Yang, 28 sep. 2016 06:40 - 2 réponses
Posté le 28 septembre 2016 - 06:40
Hello,

I have developed an Android based app in which I want to register the app for receiving PUSH notification from a web server which is built in PHP.

I have used NotifPushEnable (for registering my mobile to receive PUSH notification) and NotifPushProcedure (for processing received PUSH notification).

But unfortunately when a message is pushed from web server it is not reaching to my app.

For this I think I will have to add a few permissions but I don't know as to which I have to add, so if someone has experience in this please guide me.

TIA

Yogi Yang
Posté le 28 septembre 2016 - 10:18
Yogi,

Permissions are added automatically. What version of WM are you using. In PHP you need to use a certain format (now in the help of WM21) in the data that you push from your webserver.

Standard Android Push notifications are not received by WM applications, the data part needs to contain a JSON structure with specific fields inside.

http://doc.windev.com/en-US/…

When this data structure uses the correct information, the push notification is picked up by the WM application and you registred procedure is called with the notification info.
You also have to make sure that your Google API ID is in the project settings like described in the help.

You can test Push Notifications with the WinDev Push application (Example). There you can enter all the parameters and can test push some info.

Hope you get it working !
Danny
Posté le 30 septembre 2016 - 07:28
Hello Danny,

Thanks for the link. It is quite useful.

As for version of WM I am using WM20.

I modified the php code as per the documentation still the push notification is not getting received.

I think I am making some very obvious mistake but am not able to put my finger on :confused:

TIA

Yogi Yang