Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How to pass information into app?
Started by prographodeveloper Oct 24 2019 04:03 PM

- - - - -
2 replies to this topic

Best Answer Rob Miracle , 24 October 2019 - 04:07 PM

I would guess that you could write a JavaScript plugin (Corona to JS is pretty easy, posts on the blog about it) that would let you use HTTP GET or POST requests, parse them into a JSON object and send it to your Corona app as an event that you listen to, then just json.decode() the data you sent in.

 

You might want to also look through this forum and see what other solutions/examples people came up with using the JS to Corona interface.

 

Rob

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

prographodeveloper

[GLOBAL: userInfoPane.html]
prographodeveloper
  • Contributor

  • 331 posts
  • Corona SDK

If I am running the app as part of a website, how do I pass information to it?

 

 



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 26,697 posts
  • Enterprise

  Best Answer

I would guess that you could write a JavaScript plugin (Corona to JS is pretty easy, posts on the blog about it) that would let you use HTTP GET or POST requests, parse them into a JSON object and send it to your Corona app as an event that you listen to, then just json.decode() the data you sent in.

 

You might want to also look through this forum and see what other solutions/examples people came up with using the JS to Corona interface.

 

Rob



[TOPIC: post.html]
#3

prographodeveloper

[GLOBAL: userInfoPane.html]
prographodeveloper
  • Contributor

  • 331 posts
  • Corona SDK

Thanks, I found an example in the "getting started thread" that didn't initially work for me, but after a bit of tweaking it did. 

Incase it helps someone else: https://github.com/prographo/coronajsplugin




[topic_controls]
[/topic_controls]