NativeWindow reload in AIR/HTML apps?

In an AIR/HTML app, is it possible to make a NativeWindow
reload itself? I don't see anything in the API docs for
NativeWindow that would allow this.
I am opening new NativeWindows via a JS function, but if a
particular window is already open, i call orderToFront() to get the
window in focus instead of creating a new NativeWindow, but I would
like to have the window contents refreshed because I am passing
different parameters in the query string. Any way to do a simple
HTML/JS-style window.reload() equivalent for NativeWindow?
thanks,
-norm

Hi,
Since this is an HTML AIR app, you probably only need to
refresh HTMLLoader.
For eg: nativeWindowObj.stage.htmlLoader.reload().

Similar Messages

  • Javascript history.back() doesnt fire in AIR html app

    I'm working on air app (html/ajax/javascript). I need to make a navigation feature, like a browser back and forward button in a page with iframe, all pages are on same domain.
    I have the following scenario:
    Adobe AIR (version 2.7.1) app that loads (air.HTMLLoader) index.php from mydomain.com
    index.php file has following design:
    <html>
        <body>
            <input type="button" value="< BACK" onclick="iframeID.history.back();">
            <input type="button" value="FORWARD >" onclick="iframeID.history.forward();">
            <ul>
                <li><a href="/page1.php" target="iframeNAME">page 1</a></li>
                <li><a href="/page2.php" target="iframeNAME">page 2</a></li>
            </ul>
            <iframe src="page_default.php" id="iframeID" name="iframeNAME"></iframe>
        </body>
    </html>
    So, this code works in FireFox, Chrome, Safari, but not in Adobe AIR app
    I can't find any documentation about this issue, really cant understand where is the problem, as i know adobe air uses webkit for web pages browsing like chrome and safari but only in air app this code doesnt work.
    I hope someone can help me.
    Thanks!

    http://forums.adobe.com/community/robohelp/airhelp
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • Html App: air.trace() not outputting to console... are Adobe still supporting html apps in AIR?

    Hi
    Just getting up and running
    Mac OS X 10.9. Adoe AIR 3.9. All working fine except air.trace() not outputting anything to the console.
    Bit of googling meant I created a mm.config in ~ with the line:
    ErrorReportingEnable=1
    but still no joy.
    Any other tips for getting this to work or is it just now broken and/or unsupported?
    Are HTML apps wrapped in AIR now legacy technology?

    I have the same question... I've been trying to get an Adobe AIR HTML app going, but there appears to be no IDE that supports debugging an HTML/JS AIR App, and fdb, which is supposed to be able to debug HTML/JS AIR apps, does not.
    Is HTML/JS still a supported way of developing Adobe AIR apps?  If so, then why aren't issues like this getting some attention?
      -Josh

  • Using Facebook SDK in Air HTML environment

    Hi,
    I am building an AIR application using HTML/JS and I'm trying to work with Facebook Javascript SDK for some simple functionality.
    It seem however when running and an AIR environment I am not able to access the FB object.
    I have the SDK locally so I know its there but simple FB.init() and FB.login() are non-existent and without errors...
    I also tried using the FB AS3 library by incldeding it in <script> tags but this gives me an error
    TypeError new window.runtime.com.facebook.graph.Facebook() is not a constructor
    Don't know if its because my xml namespace is version 2.0 and not 1.5 (1.5 errors as well but it says some IFilePromise class is not found.
    Can the Javascript SDK be used in building Adobe AIR HTML apps?

    Annoyingly the SDK hasn't been updated in over three years. I've had a casual look via Visual Studio's object inspector to see if I can spot any new methods or properties that could be useful but if they are there then they are hidden well. Media Kind, for example, was introduced in iTunes 9, I think, but can't be read from code.
    I don't know what tasks you're hoping to automate, but you might find some of my scripts useful either in their own right or as food for thought.
    tt2

  • Microphone record, playback in AIR html js desktop app

    hi,
    I want to record, save and playback the microphone audio in an HTML/JS AIR desktop app.
    I can't find any examples so my code is based on AS3.
    But the app crashes almost right away when the SampleDataEvent handler function is called.
    Should it be in a while loop sames as AS3?
    $(function(){
        var mic;
        var soundBytes = new air.ByteArray();
        $("#btnRecord").click(function(){
            mic = air.Microphone.getMicrophone();
            mic.rate = 44;
            mic.addEventListener(air.SampleDataEvent.SAMPLE_DATA, sampleEvent);
        function sampleEvent(e){
            while (e.data.bytesAvailable) {
                var sample = e.data.readFloat();
                soundBytes.writeFloat(sample);
        $("#btnStop").click(function(){
            mic.removeEventListener(air.SampleDataEvent.SAMPLE_DATA, sampleEvent);
            $("#txtActivity").val("");
        $("#btnPlay").click(function(){;
            for (var i = 0; i < 8192 && soundBytes.bytesAvailable > 0; i++) {
                var sample = soundBytes.readFloat();
                e.data.writeFloat(sample);
                e.data.writeFloat(sample);
                //we write the data twice because there are 2 channels (stereo)
    thanks,
    Jeff.

    this works on my macbook. But on my Windows 8.1 machine the audio gets played back twice as slow as normal.
    Not a lower pitch, just twice as slow. Any idea why this is?
    $(function(){
        var s;
        var sc;
        var nowRecording = false;
        var nowPlaying = false;
        var recordedBytes = new air.ByteArray();
    //   air.SoundMixer.audioPlaybackMode = window.runtime.flash.media.AudioPlaybackMode.VOICE
        var mic = air.Microphone.getMicrophone();
        mic.rate = 44;
        mic.gain = 70;
        mic.setSilenceLevel(0);
        $("#btnRecord").click(function(){
            if (!nowRecording) {
                air.trace("recording");
                recordedBytes.clear();
                mic.addEventListener(air.SampleDataEvent.SAMPLE_DATA, getMicAudio);
                nowRecording = true;
                $(this).val("Click me to stop")
            else {
                air.trace("recording stopped");
                mic.removeEventListener(air.SampleDataEvent.SAMPLE_DATA, getMicAudio);
                nowRecording = false;
                $(this).val("Click me to record")
        function getMicAudio(e){
            recordedBytes.writeBytes(e.data);
        $("#btnPlay").click(function(){
            if (!nowPlaying) {
                air.trace("playing");
                recordedBytes.position = 0;
      s = new air.Sound();
                s.addEventListener(air.SampleDataEvent.SAMPLE_DATA, playAudio);
      sc = new air.SoundChannel
                s.play();
               sc.addEventListener(air.Event.SOUND_COMPLETE, stopPlayback, false, 0, true);
                nowPlaying = true;
              //  $(this).val("Click me to stop playing")
            else {
                sc.stop();
                stopPlayback();
        function stopPlayback(e){
            air.trace("playing stopped");
            s.removeEventListener(air.SampleDataEvent.SAMPLE_DATA, playAudio);
            nowPlaying = false;
        function playAudio(e){
      if(!recordedBytes.bytesAvailable > 0)
      return;
            for (var i = 0; i < 8192; i++) {
                var sample = 0;
      if(recordedBytes.bytesAvailable > 0) sample = recordedBytes.readFloat()
                e.data.writeFloat(sample);
                e.data.writeFloat(sample);

  • AIR HTML+JavaScript app vs. hardware accelerated composing

    I'm developing an HTML application for mobiles and desktops. The application is optimized for WebKit based environment. To improve a rendering speed I'm using hardware accelerated layers (something like -webkit-transform: translateZ(0); etc...).
    This works great on my iOS devices (using PhoneGap aka Cordova to package a "native" app).
    On Windows and OS X I'm using Adobe AIR 3.5 to package a captive runtime HTML/JavaScript based application. I have found this to be the best solution (for now) even though I have tried many others (Cordova for Windows 7 / OS X, TideSDK, ...).
    The point is that the HTML rendering in Adobe AIR seems not to be hardware accelerated. Does anyone of you have experience with this? Is here any possibility to enable hardware accelerated layers in AIR HTML rendering?
    Thanks a lot

    Thanks a lot, actually I tried AIR SDK 3.6 yesterday and it seems it still doesn't support an acceleration. In a browser it works just fine even in fullscreen (zoomed page). It seems that the best way to achieve my goal will be using Cordova wrappers for OS X and Win Desktop. But as an AIR developer I really want to use AIR SDK So I will do some more tests..
    Thanks,
    Pavel

  • Adobe AIR Installer.app and Comcast ID

    Has anyone had trouble with installing the Adobe AIR Installer.app in order to have a comcast ID on your computer and TV?

    If you need it for the usage meter, instructions here  > http://usagemeterapp.comcast.net/air.html
    Repair permissions prior to installing Adobe Air.
    Launch Disk Utility located in HD > Applications > Utilities
    Select the startup disk on the left then select the First Aid tab.
    Click: Repair Disk Permissions
    This process can take a few minutes.
    Quit Disk Utility when it's finished then try installing Adobe Air.
    FAQ's for >  Xfinity Usage Meter Application

  • Link in Adobe AIR JavaScript app is incorrectly opening the app in the default browser

    I have a couple of links in my Adobe AIR JavaScript app that are part of the app's UI, which when clicked are causing the app to be loaded into a new tab in my default browser.
    This is only happening with two links (Save and Cancel on a form), and not all links in my UI.  The two links that are having the issue are defined in an external HTML file that I load a runtime and connect to the DOM.  The links that are defined in the main HTML file that is loaded when the app starts up do not have this problem.
    Here is how I am loading the template and plugging it into the DOM
    var win = document.createElement("div");
    var f = air.File.applicationDirectory.resolvePath("lib/partials/edit_form.html");
    var fs = new air.FileStream();
    fs.open(f, air.FileMode.READ);
    var content = fs.readUTFBytes(fs.bytesAvailable);
    fs.close();
    var template = new Template(content);
    win.innerHTML = template.evaluate(data);
    document.body.insertBefore(win, document.body.firstChild);
    The links themselves are coded like this:
    <a href="#" id="save_button" onclick="return false;"></a>
    <a href="#" id="cancel_button" onclick="return false;"></a>
    I am using the Prototype JS library to observe the 'click' event for each of these links like so:
    $('save_button').observe('click', onSave);
    $('save_button').observe('click', onCancel);
    This app shows content created by users, which can contain links to external web sites.  To get the external links to open in the browser (as opposed to inside my Adobe AIR window), I am doing the following in a script tag in the head of my main HTML file:
    window.htmlLoader.navigateInSystemBrowser = true
    I've found that if I set window.htmlLoader.navigateInSystemBrowser = false, then the issue with the Save and Cancel links described above goes away.  However, I need to have window.htmlLoader.navigateInSystemBrowser = true so that external links in the user content open up in the browser, not in Adobe AIR.
    Another piece of evidence is that the Save and Cancel links only incorrectly open a browser the first time you click on them after launching the app.  Subsequent clicks work fine and do not have the issue.
    Any ideas on why the links that are plugged into the DOM after app start up have this issue, and only the first time you click on them?

    Not sure where this comes from, but I suspect it has something to do with the security restrictions that AIR has in place, related to dynamic JS evaluation after the document is loaded.
    Make sure you read http://help.adobe.com/en_US/air/html/dev/WS5b3ccc516d4fbf351e63e3d118666ade46-7f0e.html#WS 5b3ccc516d4fbf351e63e3d118666ade46-7ef8
    For example, I've spotted the two onclick="return false;" you have in your code. The evaluation of the onclick attribute after the page loaded event would fail in AIR.

  • How do i localize the app name in an air ios app?

    I am trying to compile an adobe air app for iOS with Danish app name? I can get localization to work with eg English, French and German, but not with Danish...
    I put
    <name> <text xml:lang="en"> English </ text> <text xml:lang="da"> and Danish </ text> </name>
    in the app.xml before i compile with the adt, but after compile i can see that only the English name is created in the InfoPlist.strings of the ipa.
    Any ideas on how to achieve a localized app name?

    Helo fideld, officially Adobe Air don't support Danish language. But I may help you.
    1. Download this file https://www.dropbox.com/s/ytx44mxzdgmlfq2/adt.jar
    2. Go to Air SDK\lib\ folder and backup your original adt.jar
    3. Copy my one from step 1
    You may understand that patched adt.jar was produced by me and not by Adobe.
    I just done this for you as a part of community friendly support. It's allow to add "da" language.
    1. Open your *-app.xml
    2. Add lang="da"
    3. Go to supportedLanguages in XML and add "da" also there so it's will be like "en fr de da".
    Patched ADT was made from original latest 4.0.0.1619 and you must use http://labs.adobe.com/downloads/air.html 4.0.0.1619 before apply this patch
    This works well, just tested!

  • Air Mobile Apps cannot support printing ?

    Dear all,
    I am developing a writing notes application in Flex Mobile Apps for android and ios.
    How can i allow use to print out the notes written?
    Anyone can guide me how to achieve the printing to the printer?

    I think you will have to extend your project by using Native Extensions, since that functionality is not built into AIR mobile. To learn more about ANEs, visit http://www.adobe.com/devnet/air/articles/developing-native-extensions-air.html
    Chris

  • Is it possible to access user account in an air android app ?

    Is it possible to access user account in an air android app in as3 ?
    The only thing I've found on internet is that one has to add to its manifest permissions to acccess account :
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    and this documentation for native android coding :
    http://developer.android.com/training/id-auth/identify.html
    thanks for any help.

    There is no API in the AIR runtime to get user's accounts.
    But you may write an ANE to get the same.

  • Consuming SOAP services from AIR/HTML (JavaScript).

    Hi All.
    I am trying to consume SOAP web services from an AIR/HTML application for a research on AIR I am doing for my company, and I am having very little success.
    I am creating JavaScript clients using apache's cxf wsdl2js utility.
    When I try to use the client to call any web service I've tried, I always get an 'error 500' response.
    The web services work fine if i call them from other clients.
    Before trying cxf generated clients I googled a lot to see if there was a more native way of doing these calls from AIR, but found nothing. I don't see anything in documentation or the web about it.
    Am I the only one trying this?
    Could this be a cross-domain issue? I'm certainly hoping AIR apps don't have this issue.
    Any pointers as to how to succesfully consume SOAP services from AIR is greatly appreciated.
    Thanks!

    In Visual Basic, you can set Network Credentials like this (assuming that you first declare Public CallWebService001 As New <WebReference>):
            ' Create a new instance of CredentialCache.
            Dim mycredentialCache As Net.CredentialCache = New Net.CredentialCache()
            ' Create a new instance of NetworkCredential using the client
            ' credentials.
            Dim credentials As Net.NetworkCredential = New Net.NetworkCredential(<username>, <password>)
            ' Add the NetworkCredential to the CredentialCache.
            mycredentialCache.Add(New Uri(CallWebService001.Url), "Basic", credentials)
            ' Add the CredentialCache to the proxy class credentials.
            CallWebService001.Credentials = mycredentialCache

  • How to use ScaleNine themes to skin an Adobe Air Mobile App

    Hi,
    I'm rather new to Adobe Air development But I really like it! Now that I've created my app I would like to skin it. I've found ScaleNine (http://www.scalenine.com/gallery/gallery-1.php) which has ready made cool skins for Flex and Air. I downloaded the samples and they compile and work beautifully. HOWEVER: I can't seem to be able to use them to skin my Air mobile app.
    Can anyone post an example ViewNavigatorApplication themed with one of the themes there? this one (http://www.scalenine.com/themes/blend/Blend.html) looks as though someone tailored it to my app :-)
    Thanks a lot!
    Avi

    I don't know how your application is structured, but if you can split sections off into separate SWFs(plain AS3 document) then you could host those section SWFs online and require the user to download them on first run.
    You could use the FileReference object to download the SWFs, save them to the File.applicationStorageDirectory, and then display/load them up with the Loader object when needed from the app storage directory. You would possibly need to check to see if the files are present at every boot of the app though as a user could "Clear Data" or "Clear Cache" of the app in the Settings of their device and one or both of those could/would delete the downloaded files.
    FileReference - Adobe ActionScript® 3 (AS3 ) API Reference

  • Adobe AIR HTML component ignores Google Maps GPolyline opacity

    I have a Google Maps mashup web site that I want to display
    in an
    Adobe AIR app using the AIR HTML component. My mashup shows a
    Google map with some semi-
    transparent polylines (drawn as circles) drawn with the
    Google Maps API . In Safari, everything looks
    as it should. In AIR, the polylines are opaque; the GPolyline
    opacity
    value is ignored. I've tried the AIR app on Linux and Windows
    XP.
    Has anyone else encountered this issue or have some
    suggestions?
    The web site:
    http://dstresearch.com/map.html
    The AIR code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" height="800" width="800">
    <mx:HTML id="html"
    width="100%"
    height="100%"
    location="
    http://dstresearch.com/map.html"
    />
    </mx:WindowedApplication>
    Thanks,
    Josh

    You might also want to check out the useCache property to see if this helps.  See these links:
    http://forums.adobe.com/thread/726573
    http://forums.adobe.com/thread/490497
    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/html/HTMLLoader.h tml

  • Adobe air html/js - application act like a browser.

    I just started in Adobe air html/js . In the current application I want to do something like this .
    I want to open the urls/web pages in the application and application should act like a web-browser to them .
    But with that I want to modify the opened pages a little, like add some css/js to them.
    Something like when you open Web pages in Firefox and a plugin (example grease monkey scripts) modifies the displayed content .
    Is it possible ?
    I tried opening in iframe it works , but I cannot add my own  JavaScript to the page (is there any way in air to remove cross domain  strictness?).
    Note: Please don't suggest that I fetch the html content of the page  and add it to the app body.  My app should really act as browser. (Adobe  air is webkit based so I think it can be achieved)

    Hi,
    Thank you for reporting this. The internal bug number for the issue is #2740755. The issue is currently under review and will be investigated by one of AIR team members.
    Regards,
    Catalin

Maybe you are looking for

  • Address Book Version - Google Sync

    I have my iMac address book synced to Google Contacts and wanted to set up my Powerbook the same way but didn't find the same setup screens. When I checked, the Address Book version on my iMac is 5.0.1 (864) and on my Powerbook it is 4.1.2 (702). I t

  • Photoshop CS3 crashes on open file

    Hi All My Photoshop crashes if I open two *.psd files at the same time. If I open only one file everything works. If I try afterwards to create a new file it crashes again. It seems it can't handle more than ONE file. Error note: AppName: photoshop.e

  • Non-retina MacBook Pro advice

    Hi, I need your advice concerning a non-retina MacBook Pro 15". I have a 5 years old MacBook Pro 15 (not unibody), upgraded with RAM and SSD. It's working fine but I would have to spend about 300€ to replace battery and fix another little problem. Ag

  • Help!!! Photoshop can't open

    'I used frequently Photoshop, but last week i cannot open these application. Double click doesn't open Adobe Photoshop CS2 for Macintosch, no message. 'I have read all the topics on the forum : : I have deleted three times correctlly this application

  • Could someone explain this tip?

    I have been given the following tip from my tutor to make my program: When you open the file for reading (before calling method acceptData), you will/should have created a Scanner object for reading from the file. It is this Scanner reference that sh