PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → [WM19] Using Push notification from non Windev to Windev Android app ?
[WM19] Using Push notification from non Windev to Windev Android app ?
Débuté par Danny Lauwers, 25 nov. 2014 17:37 - 4 réponses
Posté le 25 novembre 2014 - 17:37
Hi,

We have an Android app and we can send Google Push notifications from a Windev program. This works very good.

But if we want to send those notifications via C# or any other non Windev client, the notification is not received.

Is it possible that Windev sends some extra data via the push notification that only Windev Mobile can decode ?.
If we send a push notification via C#, we get confirmation of Google that the messages are correctly received by Google. But they do not appear on the device ? It could be that they arrive in the back to a Windev Push notification Service, but the Windev App on the android device is not receiving them ?

Any idea on how to get this working to send a push notification from a non Windev platform to a Windev Android application that is using the build in WD19 Push Notification instructions.

Thanks
Danny
Posté le 25 novembre 2014 - 20:28
Hi Danny

that is clearly a non direct way, but a sure way of doing this is to use a webdev site (awp page) as a relay... The C# app talks to the awp page via httprequest, and the awp page sends the notification.

Otherwise, I suspect a formatting problem...

Best regards
Posté le 27 novembre 2014 - 09:12
Fabrice,

Thanks for your awser. It seems that this is a proprietary format (Support) and in a future version this could be changed to an open format !

So I have to work arround this issue for the moment.

Is there another workarround than creating an awp page ? Something that can be hooked or called from .NET directly ?

I tried to create a .NET library in windev, but the Notification variable is not supported.

Danny
Posté le 27 novembre 2014 - 10:07
Danny,
if it works from WD you could call this WD-code form your C# program.
- by running it as an exe with some commandline parameters
- or create a wd-service which monitors a database or map for 'messages to send'
- or maybe even create a .NET library in WD. According to pcsoft this is possible, but I never tried.
Posté le 27 novembre 2014 - 14:11
Hi Arie,

I have written a EXE with commandline parameters as a workarround.

The .NET Library did not work because the parameter of type 'Notification' was not available in .NET ??

Currently the workarround works.

The only thing I was looking for was how to return a process result to the calling application. Normally you have a sort of return value of your EXE. I have used RESULT in the Init code of the project, but I have yet to test if this actually returns something to the calling C# application.

Thanks
Danny