Android, access to the onCreate data

Hi,

When Android starts the app, it calls onCreate( data ), I would like to have access to this data.

How to do?

thanks

Corona does not provide that “Bundle” data.  However, Corona does provides the Android intent that was used to launch this information.  It’s available as a launch argument in the “main.lua” as follows…

– At the top of your Lua file, fetch the launch arguments like this.

local launchArgs = …

if (launchArgs.androidIntent) then

   local launchUrl = launchArgs.androidIntent.url

   local action = launchArgs.androidIntent.action

   local categories = launchArgs.androidIntent.categories

   local extras = launchArgs.androidIntent.extras

end

For more information, see this thread:  http://forums.coronalabs.com/topic/28575-canopenurl-support-within-corona-sdk/?p=207672

Perfect

Corona does not provide that “Bundle” data.  However, Corona does provides the Android intent that was used to launch this information.  It’s available as a launch argument in the “main.lua” as follows…

– At the top of your Lua file, fetch the launch arguments like this.

local launchArgs = …

if (launchArgs.androidIntent) then

   local launchUrl = launchArgs.androidIntent.url

   local action = launchArgs.androidIntent.action

   local categories = launchArgs.androidIntent.categories

   local extras = launchArgs.androidIntent.extras

end

For more information, see this thread:  http://forums.coronalabs.com/topic/28575-canopenurl-support-within-corona-sdk/?p=207672

Perfect