Deep linking in Corona

Hey all,

So, I’m trying to have my Corona app launch from deep links. In native Android, you do like this: https://developer.android.com/training/app-links/deep-linking.html

I know that you can detect a uri from applicationOpen event, but that event only fires if the app is already in the background: https://docs.coronalabs.com/api/event/system/url.html

I’d like a way for my Corona app to capture the uri WITHOUT the app being in background. Is that possible without going native?

Have you tested this behavior while the app is currently not in the background? I don’t see anything in the docs that states that “applicationOpen” only occurs while the app is in the background.

applicationOpen should fire only on an app cold start.  However, I’m not sure what all parameters it will carry with it.  Usually on cold start, args are passed using launchArgs.

Maybe put something like this in your main.lua:

local launchArgs = ... if launchArgs then for k, v in pairs( launchArgs ) do print( k, v ) end end

and see if you’re getting anything.

Rob

Have you tested this behavior while the app is currently not in the background? I don’t see anything in the docs that states that “applicationOpen” only occurs while the app is in the background.

applicationOpen should fire only on an app cold start.  However, I’m not sure what all parameters it will carry with it.  Usually on cold start, args are passed using launchArgs.

Maybe put something like this in your main.lua:

local launchArgs = ... if launchArgs then for k, v in pairs( launchArgs ) do print( k, v ) end end

and see if you’re getting anything.

Rob