1

I know it's possible to communicate with native android components via the Intent call, but I'm trying to figure out how to launch an app (which is installed) through an Adobe Air application.

Currently, thanks to Ben, I know that...

var url:String = ("intent:#Intent;" +
                  "action=android.intent.action.MAIN;" +
                  "category=android.intent.category.LAUNCHER;" +
                  "component=com.android.settings/.Settings;" +
                  "end");
navigateToURL(new URLRequest(url));

...launches the Android Settings menu through an Air app, which is awesome.

But I'm trying to launch an app...and I believe the secret lies within the "component=com.android.settings/.Settings;" snippet. Does anybody know how I can modify this code to launch an installed app on a device?

My kingdom for an answer. I've scoured the internet for days searching on this.

Brad

1 Answers1

2

It depends on your use case.

If there's one specific app you want to open, you can look inside that app's .apk for the <intent-filter> elements, as explained in Launch custom android application from android browser. Then craft the appropriate URL to pass to navigateToUrl().

Another possibility is to get the package name for the app you want to open and set that as the component= section of your URL. Fair warning, I'm not actually sure if that will work.

If you don't know what app you want to open at compile-time, it's harder (e.g. if you have a server-side list of applications that your AIR app may need to invoke). Launch an application from another application on Android shows how to launch an application if you only know the package name, but you'll need a native extension to enable that functionality.

Community
  • 1
  • 1
Brian
  • 3,719
  • 3
  • 18
  • 35
  • Thx Brian! The answer lay in the modification of the COMPONENT snippet. After a bunch of digging around, I found an application called ApplicationReader which is able to glean the Package and Activity name, both of which are needed to figure out the Component Info. Worked like a charm! Now I just need to figure out how to pass a variable INTO an AIR app from tasker :D – Brad Parker Jan 20 '16 at 01:51