#1 2017-03-13 10:25:37

eduardoalfaro
Member
Registered: 2016-06-08
Posts: 37

OneSignal PUSH server 100% free and unlimited

Hello David,

I am trying to integrate OneSignal Push Server (100% free and unlimited) into AB. You have to register with your developer ID. OneSignal has a cordova plugin: https://documentation.onesignal.com/docs/cordova-sdk and I have integrated into AB on Cordova Custom plugin with onesignal-cordova-plugin. The plug-in it is working very good, but I have a doubt getting response from JSON.

The JavaScript is using the function JSON.stringify so you can question to the user within a PUSH notification, get the answer and use in your APP ;-D. I have store the result into a AB var with: window.App.RootScope.var_push_opened = JSON.stringify(jsonData);

The mainly problem is that none of the AB array actions cannot handle the JSON.stringify

This is the var containt for JSON.stringify(jsonData)

{"action":{"type":0},"notification":{"isAppInFocus":true,"shown":true,"androidNotificationId":-95396130,"displayType":1,"payload":{"notificationID":"1d4b8510-dd3e-4a76-a036-9ae73765","title":"titulo","body":"mensaje","lockScreenVisibility":1,"fromProjectNumber":"840278383294","priority":0,"rawPayload":"{\"google.sent_time\":1489392268319,\"custom\":\"{\\\"i\\\":\\\"1d4b8510-dd3e-4a76-a036-9ae73765e0ca\\\"}\",\"from\":\"840278383294\",\"alert\":\"mensaje\",\"title\":\"titulo\",\"google.message_id\":\"0:1489392268324753%476994fff9fd7ecd\",\"notificationId\":-95396130}"}}}

Do you have any example with JSON.stringify done for AB? Any idea o clue for this issue?

Thank you so much!!!
Eduardo

Offline

#2 2017-03-13 12:11:57

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: OneSignal PUSH server 100% free and unlimited

Hello Eduardo,

I am not sure if can understand very well. AB offers the StrSerialize action, which relies in the "JSON.stringify" JS function, and the StrUnserialize action, which relies in the "JSON.parse" JS function. Can these actions help you in some way?

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.