AIR.SWF in-browser API is broken with FP 11.2
The AIR.SWF in-browser API, as documented here:
http://help.adobe.com/en_US/air/build/WSfffb011ac560372f-1c6efe05128cca667e7-8000.html#WS5 b3ccc516d4fbf351e63e3d118666ade46-7cd2
is no longer working. It reports that AIR isn't installed when it really is.
I've filed a bug for this here:
https://bugbase.adobe.com/index.cfm?event=bug&id=3062591
LocalConnection will only work between two applications running on the same machine.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/LocalConnecti on.html
"LocalConnection objects can communicate only among files that are running on the same client computer, but they can be running in different applications — for example, a file running in a browser and a SWF file running in Adobe AIR."
If you need to communicate between an app running on an iOS device and a swf in a browser on a computer look into the ServerSocket Class:
http://help.adobe.com/en_US/air/reference/html/flash/net/ServerSocket.html
Works a little differently than LocalConnection but will allow connections between two different physical devices (ie: 2 computers, a computer and a mobile device, 2 mobile devices, etc). Since the iOS device uses the air runtime stuff it should have access to the ServerSocket Class while the browser swf can use a standard Socket to connect to the iOS device.
Similar Messages
-
Hi,
Is it possible to load a AIR swf in browser
without creating a new flex application that load that AIR swf?
Best Regards,
MihaiThe only thing that really matters is whether important APIs are available in the runtime. I can write a swf that draws a bunch of circles and it will run in both AIR and the browser. But then it isn’t that useful for AIR, so I start using AIR APIs and then it won’t run in the browser because those APIs aren’t available in the browser players.
You could design your AIR app as two pieces: an AIR shell that does AIR things, and a sub-SWF that doesn’t make any assumptions about AIR APIs. That sub-SWF then has a better chance of running in the browser. -
Working with badge.swf and air.swf (browser api)
I basically want to install and run my app through the
browser so ive been testing but can't manage to figure out how the
air.swf api works. i am stuck at loading air.swf. the page below
has a tutorial but a downloadable sample code would be perfect, not
sure where the little snippets of code from the "Loading the
air.swf file", "Checking from a web page if an AIR application is
installed", "installing an AIR application from the browser", and
"Launching an installed AIR application from the browser" go in my
own codebase. Also im a bit unclear on where i get appid or
developer id. if someone has an example app or more in-depth
explantion of incorporating the given code , i would much
appreciate it.
http://livedocs.adobe.com/flex/3/html/help.html?content=distributing_apps_3.htmlquote:
Originally posted by:
cjm771
can't manage to figure out how the air.swf api works
The main thing you must understand about air.swf
is that its most important functionality can only be called from
within a UI event handler, such as for a button click. It's very
picky about this. You can't, for example, use the button click
event handler to begin the loading of air.swf, then in the "loaded"
callback do the air.swf API call. air.swf has to be loaded and
ready at the time the event handler is called. So, load it on app
startup. I even go to the extent of disabling the buttons that call
into air.swf until it's loaded.
quote:
im a bit unclear on where i get appid or developer id
The appid is your application's unique ID, which
you gave in setting up your project. Adobe recommends using
something based on your web site's domain name, in reverse order as
is done in Java and Objective C. If you're at foo.com, and call
your program Qux, then com.foo.qux is a good appid. The use of
domain-like names helps ensure that programs from different
companies don't collide with each others' namespaces.
By default, the pubid is a random number assigned by the IDE.
I forgot how you find out what number it used, just that there's a
way. Or, you can assign it yourself, in the project settings for
the AIR app. Right-click the project, go to the Run/Debug Settings
section, edit the launch configuration for your AIR app. You'll
find a Publisher ID field there. The documentation for ADL may be
helpful for picking your own pubid.
quote:
if someone has an example app or more in-depth explantion of
incorporating the given code , i would much appreciate it.
See my code in this thread:
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=75&catid=697&threadid =1352505&highlight_key=y&keyword1=air%2Eswf -
Adobe air swf file error in browser
my fla file setting
version: adobe air 1.0 actionscript 3.0
i able to compile without problem and when i load the swf file in browser, if my actionscript included this line "import flash.filesystem.File". My flash just show up "blank" . no error in flashlog. if i removed this line, my swf file able to run. what is wrong?
p/s: i embeded the air app as swf and open with browserYou can't load SWFs published for AIR in a browser. The Flash plug-in does not recognize the extra AIR APIs like File.
AIR SWFs can only be used as part of an AIR application. -
Link to API for air.swf
Hi, I've been searching the interwebs all morning and can't seem to find a link to documentation describing the properties, methods and events I can use from the air.swf file in conjunction with using AIR via a web browser. I'm able to load the air.swf and see the framework status, but I don't know what other options I can use to perform actions via the API. If anyone knows of a link to documentation I'd appreciate hearing about it. Thanks!
Hi, thanks for the information but I already have the developer guide that contains this. What I'm looking for is documentation on the class specifications for the browser API. Two methods that are mentioned in the documentation I already have are getStatus() and getApplicationVersion(), but I haven't seen any other methods, properties or events documented elsewhere.
Ideally if there's something akin to the Flash help file documentation of the internal classes that would be great. Thanks for your help! -
Problem passing arguments with air.swf
I'm attempting to launch my AIR application using
launchApplication() in air.swf. I'm having problems passing
arguments to my application due to what appears to be some
restriction in allowed characters. To get around this, I've even
tried URL encoding and Base-64 encoding my arguments to make them
more friendly, but it's still failing:
Error: Invalid argument: PG5vIGlkZW50aWZpZXI+
at AIR$/escapeArguments()
at AIR/launchApplication()
at
adlm_launcher/onDownloadClick()[E:\adlm\launcher\src\adlm_launcher.mxml:181]
It seems that any kind of punctuation is not allowed in
arguments. URL encoding them doesn't work either because the % is
rejected. Is there any other way around this?Yes; it's a security restriction. Browser invocation require
process creation, and many process creation APIs giving special
meanings to certain characters. Letting those characters through
has in the past been a source of security vulnerabilities. While we
also try to avoid using APIs with this behavior, extra layers of
defense are also good.
I think + and / may actually be safe choices; you make a good
point that they're useful for Base64. If you could submit a feature
request at www.adobe.com/go/wish, we'll definitely consider it.
Another option, btw, is to use the LocalConnection API to
pass data between the web page and your application once your app
is launched. LocalConnection has fewer restrictions on the data
passed. -
Communication problem between air application from swf at browser
Hi,
I am trying to communicate adobe air native application from brwser using swf, I check for native application installed or not. If installed then launch and if not then install and launch.
I am facing problem when browser crashes and communication get lost with adobe air native application. And when user restart web browser and try to make local connection for communication with native application, some times it get failed. so, how to handle this state please help.
Thanks
Nitesh KumarHi sinious,
How could I clean up connection when browser is aborted or lost?
below you can find the code snippet to check for air application and connection
airSWFLoader = new Loader();
loaderContext = new LoaderContext();
loaderContext.applicationDomain = ApplicationDomain.currentDomain;
airSWFLoader.contentLoaderInfo.addEventListener(Event.INIT, onInit);
airSWFLoader.load(new URLRequest("http://airdownload.adobe.com/air/browserapi/air.swf"),loaderContext);
function onInit(e:Event):void
airSWF = e.target.content;
switch(airSWF.getStatus().toString())
case "available" : AirLoaderStatus = 1;
break;
case "unavailable" : AirLoaderStatus = 2;
break;
case "installed" : AirLoaderStatus = 3;
break;
private function getAppStatus():void
clearInterval(intervalIdentifier);
if(AirLoaderStatus == 0){intervalIdentifier = setInterval(getAppStatus,1000);return;}
m_launchInstallBtn.visible = true;
var statusInfo:String = airSWF.getStatus();
airSWF.getApplicationVersion(m_installerFileName, m_pubID, versionDetectCallback);
function versionDetectCallback(version:String):void
if (version == null)
trace("Not Installed");
// Take appropriate actions. For instance, present the user with
// an option to install the application.
else
m_isPluginsInstalled = true;
// Take appropriate actions. For instance, enable the
// user interface to launch the application.
private function onlickMouse(event:MouseEvent):void
m_text.text += "\nm_isPluginsInstalled:"+m_isPluginsInstalled+":::AirLoaderStatus:"+AirLoaderStatus;
trace("\nm_isPluginsInstalled:"+m_isPluginsInstalled+":::AirLoaderStatus:" +AirLoaderStatus);
switch(event.currentTarget)
case m_launchInstallBtn:
if(AirLoaderStatus == 1)
installAirsetup();
else
if(!m_isPluginsInstalled)
airSWF.installApplication(m_url, m_runtimeVersion, m_argsToPass);
airSWF.launchApplication(m_installerFileName, m_pubID, m_argsToPass);
else
airSWF.launchApplication(m_installerFileName, m_pubID, m_argsToPass);
break;
in the above code snippet I pass localConnection for send and recieve as an argument in m_argsToPass.
the connection names strarts with "_".
In the air application I I split the event arguments like given below
argsArray = event.arguments.toString().split(",");
and then try to establish connection.
Please suggest, how could I clean the connection on lost/ abort of browser, since then swf object embeded in browser also get lost. -
How to get the extension Info from firefox? Do we have any firefox API to communicate with the browser? I couldnt see the HTML of the widget displayed in the toolbar how to access the widget using JS or any way
Hi,
Thanks for the suggestion. I've been playing around with some of the classes of the java.net package and java.io
Using the URL class i can get the content of the data from a STATIC page and output that response to file so that is does not display to the client broswer.
But this only works if the URL i give points to a static html page.
So the problem i'm getting is if i'm righting in arguments in the URL, this means that server needs to process the arguments i give and its sends back a dynamic result. Because its dynamic the URL class can not handle this and throws me an exception everytime :(
Have u ever tried to do some things like this?
Rahul -
Which of scanners works with browser as web camera with HTML5 API?
which of scanners works with browser as web camera with HTML5 API?
ntman,
[https://developer.mozilla.org/en-US/docs/Web/Guide/API/Camera MDN Camera API Guide] and [https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5 Web Guide MDN] are both articles to get you started. I am not an expert in this, but there is a developer community on stackoverflow.com that helps specifically with Developing in Firefox. It may require the use of AngularJS. However it is difficult to prevent users from downloading images that are on sites, but again stackoverflow.com would have some great ideas. -
I need feedback after calling browser api installApplication
Hi,
We developped two applications using Flex builder, the first application is a Flex online application, the second is a Flex desktop (air) application.
When the client openes the online application in his browser, he is asked to install the desktop application, and when he clicks on the install button, we use the browsing API to launch the installation for the desktop Application, the procedure followed by the online application is as following.
1- Loading the air.swf from http://airdownload.adobe.com/air/browserapi/air.swf
2- Checking if the AIR runtime is installe
3- installing our AIR application from the needed URL as does the example bellow:
var url:String = "http://www.example.com/myApplication.air";
var runtimeVersion:String = "1.0.M6";
var arguments:Array = ["launchFromBrowser"]; // Optional
airSWF.installApplication(url, runtimeVersion, arguments);
Our clients are experiencing sometimes different kinds of problems installing our AIR application from the browser, we want to be able to detect those errors, and redirect the clients to a troobleshooting page, the problem is that there is no feedback from the installer to our online application.
MY QUESTION IS:
Is there a way to a have feedback (from air application installer) after to call airSWF.installApplication.
Keywords: flex, air, browser, api, install, application, event, installApplication, air.swf, damaged.TyskJohan,
In scenarios like these where we have an API available and the business logic requirement involves lot many complex validations, its better to go for jdbc calls. You are basically reusing the exiting code and It saves lots of coding effort instead of trying to think all validations, duplicate the existing code.
--Shiv -
Air.swf getApplicationVersion() not returning
Hi,
I am using air.swf api to detect installed applications... but this doesn't written any call backs...
any idea ?
Regards,
BrijeshHi Chris,
Thanks for the reply...
I have 2 air applications... From one application, I need to detect if other air application is installed or not.. Fo this I am using the air.swf file..
and air.getApplicationVersion() method of air.swf...
But sometimes it doesn't invoke the callback method..
Also, I was looking to if this feature can be used in offline mode.. As air.swf needs to be downloaded always.. can this be used for offline mode...
Regards,
Brijesh -
How can we handle browser settings while dealing with the security ?
Hi ,
how can we handle browser settings while dealing with the security ?When we configured security in web.xml , during the first request the container is asking for the authentication credentials once they are provided it go's on. but when the user gives a fresh request from the second window within the same browser that time it is not asking for authentication. How can we overcome this.Is there anything to do with server configurations?
How can we make the container no to keep the things or act like session?Ya... I am taking a small example need not happen always but a kind of possibility i am thinking off.
once the user sign out and just left without closing the browser and a friend (suppose not a good friend ... just kidding...) of that user may open the same jsp or file .This time the security is breached. If that feature or property exists....
I know what you might say ... the user will log-out before leaving where a programer might invalidate the session at the time of log out.
Consider the case of a bad Programing or just a programer might forget to invalidate,At that time as a application administrator how can he solve that issue.
Thanks.......
Edited by: user8483670 on Jun 6, 2011 1:08 AM
Edited by: user8483670 on Jun 6, 2011 1:09 AM -
Just got an ipad air and why creating my apple ID with credit card, a CODE was requested in the itunes gift card/ itunes gift in order to preceed with the form but I don't have the code. Please how can I find the code so as to enable me complete the form successfully. Thanks alot
The iTunes gift card field is optional, you don't have to fill it in - leave it blank if you don't have a gift card.
iTunes gift cards are country-specific (they can only be used in their country of issue), and they are not available in all countries - so you might not be able to dill it anyway. -
Is there a way to open a browser and it "starts" with opening many tabs?
Is there a way to open a browser and it "starts" with opening many tabs?
e.g. I open a browser - and it starts on 3 or 4 tabs?Leave them open when you shuit Safari down. It doesn't have a home page function.
You might check the app store for some alternate browsers. I beleive there a few that will do this. -
My Macbook browser is not compatible with a business website I must use for work. Is there a Windows compatible browser for my Mac?
If the site has been optimised for IE (which is non-standards compliant), the best you can try is to spoof IE from Safari.
I'm using an earlier version of Safari than you, so I hope Allan or someone will correct me if the procedure is different.
First, go to Safari Preferences and enable the developer menu;
Then go to the menu and select User Agent - choose a flavour of IE.
Works about 50% of the time.
It won't work if the site is using Activex controls.
Maybe you are looking for
-
Firefox 3.6 just installed but won't open
SUBJECT: FIREFOX WON'T OPEN. I have used Firefox for years, but upon reinstalling my Vista Home Premium OS, I also had to reinstall all my software. The only problem I had was with Firefox, which appeared to download and install successfully, but ref
-
E71 - How To Get Audio To Playback in Stereo?
Is there a way to get headphones to playback in Stereo mode? I've tried the earbuds that came with the phone, as well as an old set of Sony Stereo headphones I have - listening to music downloads from the Spotify App as well as just using earbuds/hea
-
Free Busy takes over 30 seconds to retrieve on Outlook 2010 using Exchange Server 2010
We have a small 100 user domain running Exchange server 2010 and outlook 2010 clients. The issue is that Retrieving Free/Busy takes over 30 seconds. So someone is trying to schedule a meeting has to wait Minutes see the Free/busy time for many use
-
How to exchange data between wda program and abap program?
Dear guru, the situation is: we have a abap program , which uses CALL FUNCTION 'WDY_EXECUTE_IN_PLACE' EXPORTING PROTOCOL = INTERNALMODE = 'X' SMARTCLIENT = application
-
Multiple DMVPN instance on the same router one public interface
I know it possible to run multiple instances DMVPN on a router with one public interface. Question: If I take one of my site and put it on a different tunnel from all other remote sites will it be able communication to the other site directly? I am