Closed simengjermundsen closed 9 years ago
Not sure this is possible with Parse, have you seen an example somewhere?
Yes. It is definitely possible. I have used Parse in many native apps before.
In Objective-C this is the method that is responsible for opening the alert view: [PFPush handlePush:userInfo];
If it is removed then the alert will not show. This is usually implemented inside
The handlePush-method is only kind of a fallback/test in case the data from the push notification is not handle in any other way.
Greetings, Simen
- sep. 2015 kl. 11.48 skrev Michael notifications@github.com:
Not sure this is possible with Parse, have you seen an example somewhere?
— Reply to this email directly or view it on GitHub https://github.com/distriqt/ANE-Parse/issues/9#issuecomment-138254618.
Some more info:
https://www.parse.com/questions/pfpush-handlepush https://www.parse.com/questions/pfpush-handlepush
- sep. 2015 kl. 11.48 skrev Michael notifications@github.com:
Not sure this is possible with Parse, have you seen an example somewhere?
— Reply to this email directly or view it on GitHub https://github.com/distriqt/ANE-Parse/issues/9#issuecomment-138254618.
Ah I see, I misunderstood what you meant.
This currently isn't possible with the ANE. We'll look into adding this in the next release.
Oh. Damn.
Then I cannot use it as it is now.
Please add this soon :) I cannot imagine many people sending push messages to only appear in a standard UIAlertView with a message? That seems kind of useless to me atleast…
Greetings, Simen
- sep. 2015 kl. 14.24 skrev Michael notifications@github.com:
Ah I see, I misunderstood what you meant.
This currently isn't possible with the ANE. We'll look into adding this in the next release.
— Reply to this email directly or view it on GitHub https://github.com/distriqt/ANE-Parse/issues/9#issuecomment-138282801.
You should be able to control it with the payload of the notifications though?
If you don't want the alert to show just don't put an alert
tag in the payload.
Oh. I thought the «alert» was the one that showed up as the title of the notification?
If I can send the notifications without the «alert» and still get all other bits working then everything is fine!
Simen
- sep. 2015 kl. 14.33 skrev Michael notifications@github.com:
You should be able to control it with the payload of the notifications though?
If you don't want the alert to show just don't put an alert tag in the payload.
— Reply to this email directly or view it on GitHub https://github.com/distriqt/ANE-Parse/issues/9#issuecomment-138285189.
But I cannot figure out how to do that… Any idea? Can I use some other parameter for the title of the notification? I am only able to display it using «alert»…
- sep. 2015 kl. 14.33 skrev Michael notifications@github.com:
You should be able to control it with the payload of the notifications though?
If you don't want the alert to show just don't put an alert tag in the payload.
— Reply to this email directly or view it on GitHub https://github.com/distriqt/ANE-Parse/issues/9#issuecomment-138285189.
I believe something like this should work, leaving out the 'loc-key' value:
{
"aps" : {
"alert" : {
"title": "some title",
"body": "message body"
}
},
"acme" : "foo"
}
Aha!
Seems like it might be working!
Thank you so much :)
Simen
- sep. 2015 kl. 14.43 skrev Michael notifications@github.com:
I believe something like this should work, leaving out the 'loc-key' value:
{ "aps" : { "alert" : { "title": "some title", "body": "message body" } }, "acme" : "foo" } — Reply to this email directly or view it on GitHub https://github.com/distriqt/ANE-Parse/issues/9#issuecomment-138287979.
Hmm… Sorry to bother you even more, but it does not seem to work anyway.
When sending «alert» as a string it shows the alert. When sending «alert» as an object with «title» and «body» i crashes the app as soon at it is trying to show the alert. I am pretty confident that it is not my handling of the data that causes this as all my functions are run before the crash happens.
Any way you could investigate this?
Is the ANE treating the «alert» as a string even if it is sent as an object or something?
Greetings, Simen
- sep. 2015 kl. 14.46 skrev Simen Øian Gjermundsen simen.gjermundsen@me.com:
Aha!
Seems like it might be working!
Thank you so much :)
Simen
- sep. 2015 kl. 14.43 skrev Michael <notifications@github.com mailto:notifications@github.com>:
I believe something like this should work, leaving out the 'loc-key' value:
{ "aps" : { "alert" : { "title": "some title", "body": "message body" } }, "acme" : "foo" } — Reply to this email directly or view it on GitHub https://github.com/distriqt/ANE-Parse/issues/9#issuecomment-138287979.
That handling is internal to the Parse SDK.
I'll try and get an option to switch the default handling off today for you.
Hi, I've added that option in for you now, you'll have to setup your application as follows:
Parse.service.setupApplication( PARSE_APP_ID, PARSE_CLIENT_ID, false );
Parse.service.register( false );
Brilliant! Thank you so much :)
Sendt fra min iPhone
Den 8. sep. 2015 kl. 00.37 skrev Michael notifications@github.com:
Hi, I've added that option in for you now, you'll have to setup your application as follows:
Parse.service.setupApplication( PARSE_APP_ID, PARSE_CLIENT_ID, false ); Parse.service.register( false ); — Reply to this email directly or view it on GitHub.
Hi again.
Sorry to bother you even more.
I have been testing for an hour ow, and I am completely unable to avoid having the app crash when opened from a Push Notification. When launched from before and then receiving a push there is no problem, but when opened by clicking a notification it crashes with no error.
Someting you can investigate? I have no idea where the error is, since it crashes silently and at different times…
My traces often stop after this line though:
trace( "Before setupApplication" ); Parse.service.setupApplication( parseAppId, parseClientKey, false );
- sep. 2015 kl. 00.37 skrev Michael notifications@github.com:
Hi, I've added that option in for you now, you'll have to setup your application as follows:
Parse.service.setupApplication( PARSE_APP_ID, PARSE_CLIENT_ID, false ); Parse.service.register( false ); — Reply to this email directly or view it on GitHub https://github.com/distriqt/ANE-Parse/issues/9#issuecomment-138387393.
Does this occur when launching the app from closed or from the background?
From closed.
I guess it happens when it is supposed to handle a push notification instantly after initializing something. When the app is opened from background it is ready already.
- sep. 2015 kl. 11.40 skrev Michael notifications@github.com:
Does this occur when launching the app from closed or from the background?
— Reply to this email directly or view it on GitHub https://github.com/distriqt/ANE-Parse/issues/9#issuecomment-138856986.
Found an issue with the parse analytics, try this update and let me know how it goes.
Working! :)
Thanks a lot.
- sep. 2015 kl. 04.28 skrev Michael notifications@github.com:
Found an issue with the parse analytics, try this update and let me know how it goes.
— Reply to this email directly or view it on GitHub https://github.com/distriqt/ANE-Parse/issues/9#issuecomment-139098270.
How can I prevent the alert box showing up on iOS when receiving a push notification? I want to handle the notification myself.