Parse.com appending to an Array using Add

I have parse.com working with Corona. Has anyone used any of the commands working with arrays?

I can add an Array by using

local testArrayData = {[“ArrayKey”] ={ 4,8,12 }}

now I’m trying append to this, I’ve tried many combinations of below, always receiving internal error from Parse

local appendArrayData = {[“ArrayKey”] = {["__op"] = “Add”,[“ArrayKey”] = {64,65} } }

I’m using both in a function similar to below, where objectClass and objectId and data are being passed correctly

headers[“Content-Type”] = “application/json”
params.body = json.encode ( data )
request = “updateObj”
network.request( baseUrl … objectClass … “/” … objectID, “PUT”, networkListener, params)

The CURL example in the docs is confusing, as it mentions two Keynames, object and skills.
I have the Increment function working on a variable using the __op command so I should know what I’m doing :slight_smile: [import]uid: 137150 topic_id: 36977 reply_id: 336977[/import]

Would you mind conversing over email about this? I’ve made some progress with Parse by extending the library posted in the code exchange, but I still find certain things throwing errors. I can send you my extended version of the library.

If you’re up for this, please send me a message from here: http://www.meetup.com/Corona-SDK-London-Meetup/members/52905502/

Matt. [import]uid: 8271 topic_id: 36977 reply_id: 145210[/import]

Tech Support from Parse gave me the answer without directly supporting Corona, objects is part of the method so

local appendArrayData = {[“ArrayKey”] = {["__op"] = “Add”,[“objects”] = { var1, var2, var3} } }

will append var1, var2, var3 to the Array stored in ArrayKey

headers[“Content-Type”] = “application/json”
params.body = json.encode ( data )
request = “setup for your listener”
network.request( baseUrl … objectClass … “/” … objectID, “PUT”, networkListener, params)

Matt I’ll contact you directly [import]uid: 137150 topic_id: 36977 reply_id: 145227[/import]

hey, Parse.com warriors. I’m wondering how your experience is using Corona with parse for Android specifically. Have you been able to register your Android device via Corona for parse without doing crazy things to AndroidManifest.xml?

I’d be grateful for any help you can provide. Almost given up on push notifications using parse.com for Android which is a shame as it works so well for iOs.

thanks,
Jen [import]uid: 81642 topic_id: 36977 reply_id: 145239[/import]

I have discussed Android push with Parse support. There is no way to use their Android push without using the actual SDK. REST Api can send a push, but there is no way to regsiter the device nor receive the push. So for Corona it looks like the only way to do it is by creating a plug-in for Parse SDK using Corona Enterprise. I plan to look at doing this eventually when I can cover the $999 for Enterprise.

For anyone curious. Parse’s Android push is better than most other solutions (GCM) because their SDK handles the pushes directly making it compatible with devices that do not use Google services. So Kindles & Nooks will work as well as standard Android devices. [import]uid: 56820 topic_id: 36977 reply_id: 145242[/import]

Would you mind conversing over email about this? I’ve made some progress with Parse by extending the library posted in the code exchange, but I still find certain things throwing errors. I can send you my extended version of the library.

If you’re up for this, please send me a message from here: http://www.meetup.com/Corona-SDK-London-Meetup/members/52905502/

Matt. [import]uid: 8271 topic_id: 36977 reply_id: 145210[/import]

Tech Support from Parse gave me the answer without directly supporting Corona, objects is part of the method so

local appendArrayData = {[“ArrayKey”] = {["__op"] = “Add”,[“objects”] = { var1, var2, var3} } }

will append var1, var2, var3 to the Array stored in ArrayKey

headers[“Content-Type”] = “application/json”
params.body = json.encode ( data )
request = “setup for your listener”
network.request( baseUrl … objectClass … “/” … objectID, “PUT”, networkListener, params)

Matt I’ll contact you directly [import]uid: 137150 topic_id: 36977 reply_id: 145227[/import]

hey, Parse.com warriors. I’m wondering how your experience is using Corona with parse for Android specifically. Have you been able to register your Android device via Corona for parse without doing crazy things to AndroidManifest.xml?

I’d be grateful for any help you can provide. Almost given up on push notifications using parse.com for Android which is a shame as it works so well for iOs.

thanks,
Jen [import]uid: 81642 topic_id: 36977 reply_id: 145239[/import]

I have discussed Android push with Parse support. There is no way to use their Android push without using the actual SDK. REST Api can send a push, but there is no way to regsiter the device nor receive the push. So for Corona it looks like the only way to do it is by creating a plug-in for Parse SDK using Corona Enterprise. I plan to look at doing this eventually when I can cover the $999 for Enterprise.

For anyone curious. Parse’s Android push is better than most other solutions (GCM) because their SDK handles the pushes directly making it compatible with devices that do not use Google services. So Kindles & Nooks will work as well as standard Android devices. [import]uid: 56820 topic_id: 36977 reply_id: 145242[/import]

Would you mind conversing over email about this? I’ve made some progress with Parse by extending the library posted in the code exchange, but I still find certain things throwing errors. I can send you my extended version of the library.

If you’re up for this, please send me a message from here: http://www.meetup.com/Corona-SDK-London-Meetup/members/52905502/

Matt. [import]uid: 8271 topic_id: 36977 reply_id: 145210[/import]

Tech Support from Parse gave me the answer without directly supporting Corona, objects is part of the method so

local appendArrayData = {[“ArrayKey”] = {["__op"] = “Add”,[“objects”] = { var1, var2, var3} } }

will append var1, var2, var3 to the Array stored in ArrayKey

headers[“Content-Type”] = “application/json”
params.body = json.encode ( data )
request = “setup for your listener”
network.request( baseUrl … objectClass … “/” … objectID, “PUT”, networkListener, params)

Matt I’ll contact you directly [import]uid: 137150 topic_id: 36977 reply_id: 145227[/import]

hey, Parse.com warriors. I’m wondering how your experience is using Corona with parse for Android specifically. Have you been able to register your Android device via Corona for parse without doing crazy things to AndroidManifest.xml?

I’d be grateful for any help you can provide. Almost given up on push notifications using parse.com for Android which is a shame as it works so well for iOs.

thanks,
Jen [import]uid: 81642 topic_id: 36977 reply_id: 145239[/import]

I have discussed Android push with Parse support. There is no way to use their Android push without using the actual SDK. REST Api can send a push, but there is no way to regsiter the device nor receive the push. So for Corona it looks like the only way to do it is by creating a plug-in for Parse SDK using Corona Enterprise. I plan to look at doing this eventually when I can cover the $999 for Enterprise.

For anyone curious. Parse’s Android push is better than most other solutions (GCM) because their SDK handles the pushes directly making it compatible with devices that do not use Google services. So Kindles & Nooks will work as well as standard Android devices. [import]uid: 56820 topic_id: 36977 reply_id: 145242[/import]

Anderoth, that’s really, really helpful. I have Hector at Parse looking as well at my decompiled apk but it sounds as if it’s a lost cause. I came to the same conclusion, there’s no way to register as there’s no onCreate method in the decompiled java. If you do a plugin it will be a really nice service to the community. Parse is really good and fits my needs in particular b/c it’s the only service I found (having tested Pushwoosh and Urban Airship) that will allow me to have my users schedule pushes _from their device_ without any extra server calls. I don’t think you can do that with GCM either.

Mohamed with Corona Cloud mentioned that some people have been using a third party service (webscript.io) to write a script for the push and a cron job to schedule them and then use Corona Cloud for delivery…I just don’t want to go to that much work for this project - that would be yet another 3rd party integration in this small utility app which already has a couple integrations. So I am going to have to resort to local notifications for Android and hope I can make the darn things work.

thanks, everyone. Please do keep us informed of any progress or breakthroughs you make with Android push!

best,
Jen [import]uid: 81642 topic_id: 36977 reply_id: 145254[/import]

Would you mind conversing over email about this? I’ve made some progress with Parse by extending the library posted in the code exchange, but I still find certain things throwing errors. I can send you my extended version of the library.

If you’re up for this, please send me a message from here: http://www.meetup.com/Corona-SDK-London-Meetup/members/52905502/

Matt. [import]uid: 8271 topic_id: 36977 reply_id: 145210[/import]

Tech Support from Parse gave me the answer without directly supporting Corona, objects is part of the method so

local appendArrayData = {[“ArrayKey”] = {["__op"] = “Add”,[“objects”] = { var1, var2, var3} } }

will append var1, var2, var3 to the Array stored in ArrayKey

headers[“Content-Type”] = “application/json”
params.body = json.encode ( data )
request = “setup for your listener”
network.request( baseUrl … objectClass … “/” … objectID, “PUT”, networkListener, params)

Matt I’ll contact you directly [import]uid: 137150 topic_id: 36977 reply_id: 145227[/import]

hey, Parse.com warriors. I’m wondering how your experience is using Corona with parse for Android specifically. Have you been able to register your Android device via Corona for parse without doing crazy things to AndroidManifest.xml?

I’d be grateful for any help you can provide. Almost given up on push notifications using parse.com for Android which is a shame as it works so well for iOs.

thanks,
Jen [import]uid: 81642 topic_id: 36977 reply_id: 145239[/import]

I have discussed Android push with Parse support. There is no way to use their Android push without using the actual SDK. REST Api can send a push, but there is no way to regsiter the device nor receive the push. So for Corona it looks like the only way to do it is by creating a plug-in for Parse SDK using Corona Enterprise. I plan to look at doing this eventually when I can cover the $999 for Enterprise.

For anyone curious. Parse’s Android push is better than most other solutions (GCM) because their SDK handles the pushes directly making it compatible with devices that do not use Google services. So Kindles & Nooks will work as well as standard Android devices. [import]uid: 56820 topic_id: 36977 reply_id: 145242[/import]

Anderoth, that’s really, really helpful. I have Hector at Parse looking as well at my decompiled apk but it sounds as if it’s a lost cause. I came to the same conclusion, there’s no way to register as there’s no onCreate method in the decompiled java. If you do a plugin it will be a really nice service to the community. Parse is really good and fits my needs in particular b/c it’s the only service I found (having tested Pushwoosh and Urban Airship) that will allow me to have my users schedule pushes _from their device_ without any extra server calls. I don’t think you can do that with GCM either.

Mohamed with Corona Cloud mentioned that some people have been using a third party service (webscript.io) to write a script for the push and a cron job to schedule them and then use Corona Cloud for delivery…I just don’t want to go to that much work for this project - that would be yet another 3rd party integration in this small utility app which already has a couple integrations. So I am going to have to resort to local notifications for Android and hope I can make the darn things work.

thanks, everyone. Please do keep us informed of any progress or breakthroughs you make with Android push!

best,
Jen [import]uid: 81642 topic_id: 36977 reply_id: 145254[/import]