Skip to main content
Participant
August 24, 2011
Answered

inter-app comunication

  • August 24, 2011
  • 6 replies
  • 2611 views

I would like to call another app from an air app running on ios but  it sounds like the custom url scheme used to do this can only be used  from native apps to contact air apps and not the other way around,  right?

If so, is this going to be fixed by some other process in the future(ie. native extensions) or is there a work around?

This topic has been closed for replies.
Correct answer Joe ... Ward

In AIR 3, you can launch URLs using a custom URI scheme using navigateToURL(). This means that you can register one AIR app to handle the custom URI (this much you've always been able to do), and launch a URL using that scheme with another AIR app (new feature). This should work in the current Beta on labs. Try it out.

You get the URL in the arguments array of an InvokeEvent object. You can pass parameters as variables on the end of the URL. For two-way communication, both apps must register a URI scheme handler, I believe.

6 replies

Joe ... WardCorrect answer
Participating Frequently
August 24, 2011

In AIR 3, you can launch URLs using a custom URI scheme using navigateToURL(). This means that you can register one AIR app to handle the custom URI (this much you've always been able to do), and launch a URL using that scheme with another AIR app (new feature). This should work in the current Beta on labs. Try it out.

You get the URL in the arguments array of an InvokeEvent object. You can pass parameters as variables on the end of the URL. For two-way communication, both apps must register a URI scheme handler, I believe.

Participant
August 24, 2011

Thanks for your answer.

Is there release notes or documentation that you can point to that says custom url schemes will no longer be blocked by the air security model?  I didn't see anything in the release notes for air 3.

Do you know why URIs like vipaccess and connectpro are white listed in air 2.7 and we cannot just access all custom URIs right now?  Is there some thing special in air 3 that makes it more secure to allow custom URIs?

Participating Frequently
August 24, 2011

I'm working on the documentation right now. I'm not sure why it was left out of the release notes.

There is no extra security in AIR 3. But with operating systems supporting it as a standard mode of operation, we felt that AIR was being overly restrictive. If you use this feature and base the launched URL on user input or something you get from the internet it is vital that you validate the URL. Only code running in the AIR application security sandbox can use navigateToURL without the whitelist.