Wednesday, 15 June 2011

android - Is there a way to keep parse from intercepting my notifications when using "alert" key? -



android - Is there a way to keep parse from intercepting my notifications when using "alert" key? -

i using parse send , handle notifications android , ios. don't want handle part sending notification differently either ios or android because not easy determine device or operating scheme user using. user have both , utilize app on both ecosystems, want sent out notifications work on both android , ios.

so far have succeeded, both device types notification. thing android , parse is, parse pretty stubborn. when "alert" or "title" key used, parse displays notification before broadcastreceiver gets handle it.

i did research , understanding, changing key "alert" else trick. problem is, have utilize "alert" no matter maintain working on iphones. there else , maintain broadcastreceiver without parse intercepting notification?

is there way alter "alert" key , still maintain functionality under ios/iphones?

thanks in advance.

i able address issue making 2 different calls parse.push.send() in cloudcode ios , android.

// ios query.equals("devicetype", "ios"); info = {"alert":"some alert", "data":{other params here}}; parse.push.send({ where: query, data: info } // android query.equals("devicetype", "android"); info = {"data":{"alert":"some alert", other params here}, "action":"com.mycompany.custombroadcastreceiver_actionid"}; parse.push.send({ where: query, data: info }

for android, moving "alert" (and "title" if applicable) top level parameters within info params maintain parse's pushservice intercepting force notif , creating own status bar notification.

you can disable parse's receiver , implement notifications through custom broadcast receiver (identified "action" parameter). kind of hack, need custom notifs, , there doesn't seem way circumvent parse's pushservice intercepting them if have alert or title set.

android ios notifications parse.com

No comments:

Post a Comment