Share Your Code

Network

Sort by: Latest Additions | Most Viewed | Recently Updated | Top Rated

The latest additions of sample code and code libraries shared by developers for Corona SDK.

3 votes
Amazon SimpleDB API Implementation for Corona

This module supports access to the Amazon SimpleDB Service from CORONA. Thanks to shane.lipscomb. This is a polished version of shane.lipscomb's code found in: http://developer.anscamobile.com/forum/2012/02/26/questions-about-amazon-aws-integration#comment-96205 OPERATIONS SUPPORTED : Create Domain Delete Domain List Domains Domain Meta Data Put Attributes Get Attributes Delete Attributes USAGE 1 2 3 4 5 6... More...

Posted by Satheesh, Posted on 25 Apr 2012, Last updated 25 Apr 2012 | 2 comments

7 votes
Parse for Corona SDK

This sample project shows how to communicate with Parse.com, a back-end data service, from a Corona SDK app. You should be able to adapt it to your needs with minimal changes. See main.lua for a barebones UI. To use the parse.lua module, add: 1 local Parse = require("parse") to your main project file and refer to functions as shown in main.lua. You'll want to use SDK build 2012.782 or later, for... More...

Posted by Dotnaught, Posted on 15 Apr 2012, Last updated 15 Apr 2012 | 4 comments

0 votes
gituid - A way to get a Unique ID for a user/app

A simple way to get a unique ID for your app. Feel free to use my hosted version or host your own. 1 2 3 4 5 6 7 8 9 10 11 12 -- -- getuid.lua -- Get a  Unique ID -- -- Graciouslly donated to the Public Domain -- -- Usage: -- local AppID = "com.yoursite.yourapp" -- local guid = require("getuid").getuid(AppID) -- -- Assumptions:  Any use of a UDID is for some use online.  If your... More...

Posted by robmiracle, Posted on 8 Apr 2012, Last updated 8 Apr 2012 | 0 comments

5 votes
Streaming "News Ticker" (Twitter Feed or Online Text File)

I wrote the following bit of code for an app I'm working on where I wanted to have a "news ticker" scroll along the bottom of the home screen that I could change remotely. I also briefly considered streaming the most recent tweets from a Twitter account - so I'm including that code as well. See the commented-out text below for notes on how to change the ticker text or Twitter feed that displays. If you copy this... More...

Posted by jasonschroeder, Posted on 6 Mar 2012, Last updated 6 Mar 2012 | 24 comments

4 votes
Facebook helper/support module

This library creates a wrapper around the Corona SDK Facebook API support. Using this library will streamline your Facebook client logic and make it easier to debug and to catch/handle errors (well, it did for my anyway, YMMV). The biggest feature is probably that it supports Facebook functionality in the simulator (for most things). More...

Posted by bob.dickinson, Posted on 2 Mar 2012, Last updated 2 Mar 2012 | 11 comments

0 votes
Super Simple IAP in 1 Line

I use this in pretty much all my projects, and it works perfectly. I stripped out some of my own custom code, and left it with all the essentials that you need. Please let me know if it works for you. When you try to fetch the price of an item, it seems to be a hit or miss for me. I've tried multiple devices, and I'm not sure why it only works sometimes. Apples IAP servers are pretty bad, and there's lots of small... More...

Posted by 003naveen, Posted on 23 Feb 2012, Last updated 23 Feb 2012 | 16 comments

4 votes
Amazon S3 REST API implementation for Corona

This module supports access to the Amazon Simple Storage Service (S3), a popular cloud-based storage platform, from Corona SDK applications. It supports both synchronous and cancellable asynchronous requests to S3. For more information, see: http://aws.amazon.com/s3/ http://www.anscamobile.com/corona/ More...

Posted by bob.dickinson, Posted on 22 Feb 2012, Last updated 24 Feb 2012 | 24 comments

11 votes
Ad Mediator for Corona®

Ad Mediator for Corona is a client-side ad mediation module very much like AdWhirl. It supports admob, inmobi, inneractive, herewead and house ads out of the box and can be extended easily by using a simple plugin framework. Ad Mediator is using providers' http api interface to request and fetch ad banners. By using this method, it knows whether there aren't any ads from a provider and able to select next available... More...

Posted by deniz, Posted on 16 Feb 2012, Last updated 13 Mar 2012 | 88 comments

2 votes
Ad Manager for Corona

******************************************************************************************************** This module is obsolete. Please use Ad Mediator for Corona instead. It is an ad mediation module very much like Adwhirl. Ad Mediator for Corona: http://developer.anscamobile.com/code/ad-mediator-corona ********************************************************************************************************... More...

Posted by deniz, Posted on 25 Jan 2012, Last updated 16 Feb 2012 | 11 comments

1 vote
RSS Parser Take Two

I've replaced the old RSS parser with this one..... Please use this one instead. This project includes a very basic RSS parser which requires the use of Jonathan Beebee's XML parser (included). It should process any well formed, valid RSS 2.0 feed. I still need to update the atom.lua parser for ATOM 1.0 feeds and it will be added here when it's ready. Please note, you will need daily build 721 if you want to use... More...

Posted by robmiracle, Posted on 6 Jan 2012, Last updated 6 Jan 2012 | 32 comments

0 votes
Display.Save Image Not post on Facebook wall

Display.save image not post on faceBook Wall local function networkListener( event ) if ( event.isError ) then print( "Network error!") else print ( "RESPONSE: " .. event.response ) end end postData = "color=red&size=small" joinGroup:insert(boardGroup) joinGroup:insert(mainGroup); local baseDir = system.DocumentsDirectory; display.save( joinGroup, "screencapture.jpg", baseDir... More...

Posted by dvbaraiya, Posted on 1 Dec 2011, Last updated 1 Dec 2011 | 1 comments

3 votes
How To - Upload an Image to a server (multipart/form-data)

Generates multipart form-data suitable for use with Corona SDK's network.request(...) function. Updated 2011-10-29: Added some server side example code. Updated 2011-10-24: I refreshed the source to make sure I didn't copy it wrong (some people were having trouble getting it to work). Updated 2011-10-23: I've replaced the app specific code with a class I wrote to handle generating the POST body and headers. More...

Posted by bpappin, Posted on 22 Oct 2011, Last updated 5 Jan 2012 | 23 comments

8 votes
Flickr Photo Browser

Awhile ago, I was approached to do a custom app for someone. The app itself is finished (not published yet) and in the process of creating it I thought it would be a good idea to publish the source for the dynamic image slider control I created. Well, not content with just publishing a simple control, I decided to create an entire demonstration app to see it in action. The Flickr Photo Browser is the result of this... More...

Posted by codepunk_schmidt, Posted on 20 Sep 2011, Last updated 20 Sep 2011 | 9 comments

2 votes
Check Network Connection with Callback function table

My app has some social elements to it. Primarily, posting to Facebook and tweeting. When the user touches either action, I first wanted to check their Internet connection and wait on the result. Thanks Lerg for help. To use, you pass several arguments: The URL to check, and four function callbacks for unreachable, reachable via Wifi, via Cell, and viaOther. The calling code looks like this for example: 1 DataNet.... More...

Posted by marble68, Posted on 29 Aug 2011, Last updated 29 Aug 2011 | 1 comments

0 votes
RSS Parser

This is an attempt to parse and RSS feed and provide the caller with a table of stories. Usage: 1 2 3 4 5 6 7 8 9 10 11 12 local rss = require("rss")   stories = {}   stories = rss.feed("index.rss", system.TemporaryDirectory)   for i = 1, #stories do     print(stories.title)     print(stories.content_encoded)  ... More...

Posted by robmiracle, Posted on 10 Aug 2011, Last updated 10 Aug 2011 | 27 comments

7 votes
Upload binary from Corona to PHP script

Uploading a binary from your app to a web server is a bit tricky with Corona... but not if you have this code! ;-) Here's all you need in order to get it done... In your app, you'll want this uploadBinary function: 1 2 3 4 5 6 7 8 9 10 11 function uploadBinary ( filename, url, onComplete )           local mime = require "mime"         local path =... More...

Posted by kennw, Posted on 25 Jun 2011, Last updated 30 Jan 2012 | 27 comments

5 votes
Cross-platform asynchronous HTTP request

This is our asynchronous http request library implemented in pure lua. Thus, it can be used on Simulator, Android and iOS. Usage: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 require "asyncHttp"   print("-------------------------------------------------------") local url = "http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=Corona+SDK" --The interface is similar to corona'... More...

Posted by khanh.dq, Posted on 21 Mar 2011, Last updated 21 Mar 2011 | 1 comments

3 votes
Simple Loading Message

This piece of code displays a simple animated loading message, "Loading...", while asynchronously downloading a file. Animated feedback is critical for apps on mobile devices, especially when performing network operations. Users tend to wait a lot longer when they have some kind of feedback. (They'll love you for it!) 1 2 --Setup a loading message on screen local message = display.newText("Loading... More...

Posted by Gilbert, Posted on 22 Feb 2011, Last updated 22 Feb 2011 | 1 comments

11 votes
Text-to-speech using network.download

As discussed here, Google provides an unofficial text-to-speech (TTS) API. It's quite easy to implement in Corona by modifying the Ansca-provided async network code. It could be useful for app accessibility or to have a synthesized voice speak when buttons are pressed, for example. More...

Posted by Dotnaught, Posted on 13 Feb 2011, Last updated 13 Feb 2011 | 2 comments

6 votes
Open Source Stock App

I've created an open source stock application using the Corona SDK. Here's the source: http://www.digitalblur.com/downloads/corona/corona_stock_open_source.zip Works very similar to the open source weather app I posted here: http://developer.anscamobile.com/code/weather-app-example How it works: We make a call to the Google stock API, parse the xml, and display the results. We can also enter another stock symbol to... More...

Posted by digitalblur, Posted on 5 Feb 2011, Last updated 5 Feb 2011 | 7 comments

20 votes
Multiplayer Networking and Push Notifications

Corona Multiplayer Networking and Push Notifications API for Mobile Apps and Games Enable Networking with your Mobile Apps with 3 functions. Networking your apps allows you to implement multiplayer games and more! Implement push notifications between phones, tablets, laptops and web servers. Everything can send and receive data from everywhere on Earth. Init PubNub Multiplayer Object Call Subscribe() to begin... More...

Posted by blum.stephen@gm..., Posted on 28 Jan 2011, Last updated 6 Jan 2012 | 157 comments

4 votes
Open Source Weather app example: Asynchronous and Synchronous

I've created an example open source weather application using a zip code. Here's the link to the sample code: 1. Synchronous: http://www.digitalblur.com/downloads/corona/weather_demo.zip 2. Asynchronous: http://www.digitalblur.com/downloads/corona/weather_async_demo.zip And here's an overview on how it works: 1. On launch, the app will automatically make a call to the API at http://api.wunderground.com passing a... More...

Posted by digitalblur, Posted on 16 Jan 2011, Last updated 1 Feb 2011 | 21 comments

2 votes
FTP Helper

FTP Helper allows you to simply upload, download and append files using FTP. Usage Include the module and create a new connection. local ftp = require("ftp")   local connection = ftp.newConnection{         host = "domain.com",         user = "username",         password = "password",  ... More...

Posted by GrahamRanson, Posted on 14 Jan 2011, Last updated 14 Jan 2011 | 30 comments

1 vote
Async/Sync State Management For Debug

I got really excited when I read about Niels Async HTTP workaround using Web Pop Ups. I realised early on the difficulty of trying to debug code which couldn't run within the Corona Simulator which doesn't support Web Pop Ups. I wrote some code which which can switch between Sync for local debug, and Async for deployment to the phone. In order to maintain the event flow I had to build in an onComplete event for Sync... More...

Posted by bedhouin, Posted on 14 Dec 2010, Last updated 14 Dec 2010 | 0 comments

1 vote
corona-async-http

Currently (November 3, 2010), the Corona SDK only support synchronous http requests, meaning your app blocks while the http request is in flight. Even sound playback comes to a grinding halt. While we wait for Corona to officially support async http, I have created a workaround based on webpopups and AJAX. Usage is as follows: 1 2 3 4 5 6 7 8 local async_http = require("async_http")   local... More...

Posted by m9415253, Posted on 3 Nov 2010, Last updated 3 Nov 2010 | 21 comments

4 votes
Check for Internet Connection

Check for an internet connection if your app requires one. I use this at app-launch and show the exit button to close the application if no net connection exists. More...

Posted by LiveToCollect, Posted on 15 Aug 2010, Last updated 7 Oct 2010 | 10 comments

2 votes
Show Native Activity Indicator While Connecting and Downloading

This code demonstrates how to show a native activity indicator while connecting to a remote location and downloading a file. More...

Posted by Gilbert, Posted on 4 Aug 2010, Last updated 7 Oct 2010 | 3 comments