ios - Worklight: Push message formatting -


in worklight, have setup push message ios , works fine. testing purpose, when sending push via url call message title comes correctly while body (payload) part truncates spaces , shows words together.

for example:

http://mydomain/myapp/invoke?adapter=aapushadapter&procedure=sendpush&parameters=["aahad","general title 2", "this general message body 2"] 

then , title comes "general title 2" , body part comes "thisisgeneralmessagebody2"

my adapter declared as:

function sendpush(userid, msgtitle, msgcontents){     var usersubscription = wl.server.getusernotificationsubscription('aapushadapter.pusheventsource', userid);     if (usersubscription==null){         return { result: "no subscription found user :: " + userid };     }     wl.server.notifyalldevices(usersubscription, {         badge: 1,         sound: "sound.mp3",         activatebuttonlabel: "read",         alert: msgtitle,         payload: {             msg : msgcontents         }     });     return { result: "notification sent user :: " + userid }; } 

(1) how can preserve formatting ?

(2) if have send url how format , send message?

please suggest. thanks

if %20 not work, change spaces '|', , unencode in app. or hex encode whole string it's 1 continuous alphanumeric string.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -