Closed somefakeuser closed 9 years ago
I'm working in a fix to the Google Play Services version conflict. Plans to be released today.
Regards,
Arley
Hi Arley,
that would be awesome :)
Best,
The problem was finally solved! You can use the version of PushClient module attached. Remember to do a "clean" in your project before building again (after updating the module).
Any questions or problems return me.
[ attachment removed ]
Hey,
thanks for this - it’s working now :-) Small question - Is it normal that the callback is fiert threetimes? (android)
Best,
No, it's not normal. Check if you did not registered the callback event multiple times.
Regards,
Arley
Hey,
short question - You don’t have any example with a working android-notification, do you? :)
best,
Hey,
thanks for that - alerady saw this. :)
Maybe i have to be more specific: I need to show a notification(android) when the application is in background or/and closed. So far i’m not able to do so - if you have anything regarding this it would be really nice and a huge help for me.
best,
There's no special requirements.
When my module detects the received notification it "automatically" shows an alert in android notification tray, similar to the existing iOS behavior.
The payload data sent through parse there is at last an "alert" attribute? It's the only requirement!
Take a look at the available attributes documented in my sample code.
Regards,
Arley
hmm i saw the attributes, but at which point i have to use them?
Which push notification provider you are using to send your payload data?
Using any provider or creating your own server, you will set the payload data to be sent (usually defined in JSON format), which may contain the special attributes that are documented.
My sample project uses the Parse.com provider (powerfull and easy).
Maybe can help: http://developer.android.com/google/gcm/index.html http://www.zinniakhan.com/2014/07/check-google-cloud-messaging-gcm-client.html
Regards,
Arley
Ah ok- seems legit.
I’m using Kinvey.com for this purpose - i think it’s simmilar to parse.
I am now doing something like this on my serverside script.
var androidPayload = {title : "title", alert : "test", ticker : "Ticker" };
push.sendPayload(doc, iOSAps, iOSExtras, androidPayload);
But on Android nothing happens, if the app is in background. (ios works without any problem) (On Foreground all data is „arrived“ correctly)
Best,
Take a look at the received data in foreground, check its content and share with me.
JSON.stringify(event.data)
Try: var androidPayload = {"alert":"test"};
Regards,
Arley
This is the result of „background“ (so the data is arriving correctly i think, there’s just no notification)
[INFO] : {"type":"PushClient_Callback","source":{"bubbleParent":true,"apiName":"Ti.Module","invocationAPIs":[],"_events":{"PushClient_Success":{},"PushClient_Error":{},"PushClient_Callback":{}}},"data":{"msg":"{\"alert\":\"test\"}","gcm":{"handlerId":0,"messageType":"gcm"},"collapse_key":"do_not_collapse","from":"251626472384"},"mode":3,"bubbles":false,"success":true,"code":0,"cancelBubble":false}
Result of Foreground:
{"type":"PushClient_Callback","source":{"bubbleParent":true,"apiName":"Ti.Module","invocationAPIs":[],"_events":{"PushClient_Success":{},"PushClient_Error":{},"PushClient_Callback":{}}},"data":{"msg":"{\"alert\":\"test\"}","gcm":{"messageType":"gcm"},"collapse_key":"do_not_collapse","from":"251626472384"},"mode":1,"bubbles":false,"success":true,"code":0,"cancelBubble":false}
Thanks in advance.
The data received is in wrong format.
Your payload data is within an strange "msg" attribute.
This is the problem! Check your provider.
Regards,
Arley
Hey,
after some review togehter with kinvey, one question: Do you maybe could recompile the module for me adjusted the string coming in for android to match this?
I don't have much experience with this side of titanium development and it would be a great help. If not i have to try it by myself.
Best,
Attached is a new PushClient module version with an new "kinvey compatibility" feature.
Is everything working now!
Regards,
Arley
[ attachment removed ]
Hi,
i had purchased your module and have a problem to set it up correctly. So i hope, that you can help me out. :)
Info: I am using Titanium 3.4 and the titanium map-module. (beside others) On the first run with your module i can’t compile, cause your Module is using an older version of google-play-services.jar than the maps module. —> So i copied the maps jar file to the libs folder of the module - seems to be the solution.
But now i am receiving a new error and i have no idea how to solve this.
Do you have any idea how to solve this? Cause the module looks really nice to me and i’m really wanna to use it. :&