Running another app from within corona

Is there any way to run another app from within Corona? And while I’m at it, any way this can be done from within both iOS and Android?

I’d love to fire up another app from within my own. Not a device-specific one either (like camera, media, address book or contacts…), but a custom made app.

Thanks for any help!

-Mario

You can launch another app that will background your app and bring the one you summoned to the foreground on iOS if that app supports URL Schemes.  For Corona built apps, you can add that support (there is a blog post from a year or so ago that shows how, just google for “Corona URL Scheme”).  I am unaware of a way to launch another app if it does not have a published URL scheme.  If you know the URL Scheme, you use system.openURL(“mycoolapp:”) to launch it.  Here is that blog post:

http://www.coronalabs.com/blog/2011/12/22/using-app-url-schemes-in-ios/

On the Android side, we kinda have something working, but it uses the app’s bundle ID (or whatever the Android term is…), i.e. com.somecompany.someapp:  so in theory you can launch that app using system.openURL(“com.robscooldomain.robsawesomegame:”) as well. 

There are a couple of posts Josh made on it where he details out the limits on it.  I’ll look and see if I can find the URL on it and update it after I find it.

Hey thanks for the footwork, Rob! I remember that article but for the life of me I couldn’t remember the title. And of course, searching for “launch” and “app” brought up a ton of false positives. :slight_smile:

-Mario

found it:  forums.coronalabs.com/topic/28575-canopenurl-support-within-corona-sdk/

Then it links off to another forum post with more details.

Thanks Rob!! This looks to be the answer I was looking for. I’ll let you know how it works!

-Mario 

You can launch another app that will background your app and bring the one you summoned to the foreground on iOS if that app supports URL Schemes.  For Corona built apps, you can add that support (there is a blog post from a year or so ago that shows how, just google for “Corona URL Scheme”).  I am unaware of a way to launch another app if it does not have a published URL scheme.  If you know the URL Scheme, you use system.openURL(“mycoolapp:”) to launch it.  Here is that blog post:

http://www.coronalabs.com/blog/2011/12/22/using-app-url-schemes-in-ios/

On the Android side, we kinda have something working, but it uses the app’s bundle ID (or whatever the Android term is…), i.e. com.somecompany.someapp:  so in theory you can launch that app using system.openURL(“com.robscooldomain.robsawesomegame:”) as well. 

There are a couple of posts Josh made on it where he details out the limits on it.  I’ll look and see if I can find the URL on it and update it after I find it.

Hey thanks for the footwork, Rob! I remember that article but for the life of me I couldn’t remember the title. And of course, searching for “launch” and “app” brought up a ton of false positives. :slight_smile:

-Mario

found it:  forums.coronalabs.com/topic/28575-canopenurl-support-within-corona-sdk/

Then it links off to another forum post with more details.

Thanks Rob!! This looks to be the answer I was looking for. I’ll let you know how it works!

-Mario 

Hi,

I need to launch an Android app from within my own Android app.

The app I need to launch is not mine and I can only use its package name to launch it.

Now I am struggling with this trying to make use of the system.openURL.

I have tried this syntax:

 system.openURL(“com.company.appname:”)

 system.openURL(“com.company.appname://”)

but none of those two worked even though the “com.company.appname” app is installed.

Please can you suggest the solution and tell me what’s wrong in what I’m doing?

Thanks in advance!

Hi,

I need to launch an Android app from within my own Android app.

The app I need to launch is not mine and I can only use its package name to launch it.

Now I am struggling with this trying to make use of the system.openURL.

I have tried this syntax:

 system.openURL(“com.company.appname:”)

 system.openURL(“com.company.appname://”)

but none of those two worked even though the “com.company.appname” app is installed.

Please can you suggest the solution and tell me what’s wrong in what I’m doing?

Thanks in advance!