Hi, I managed to get Pushes working straight away, thanks to your decent tutorials... Thjere's just one thing I can't get my head around.

In your Corona SDK LUA code, you have ' native.showAlert("Message from Geek-o-Meter", json.encode( launchArgs.notification ), { "OK" } )'


native.showAlert( "Message from Geek-o-Meter", json.encode( event ), { "OK" } )

...A launchArgs and a 'remote' identifier, which is great, but my Push is getting the whole event table passed to the notification event.

So my actual alert looks something like this:

{"badge":3,"type":"remote","name":"notification","custom":"sound":"default","alert":"THIS IS MY ACTUAL NOTIFICATION","applicationState":"inactive"}

In a nutshell, I'd just like to pass my message to the alert, without the extra table data/strings, but I don't know how to extrapolate the bits I need. Can you help?


asked 15 Jul '14, 23:58
diggler1's gravatar image



This is just how Corona passes push notification to the app. Instead of passing json.encode(event), simply get the message you need from json payload. Something like:

native.showAlert( "Message from Geek-o-Meter", event.alert, { "OK" } )

permanent link
answered 16 Jul '14, 08:15
shader's gravatar image


Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 15 Jul '14, 23:58

question was seen: 1,355 times

last updated: 16 Jul '14, 08:15