File.openWithDefaultApplication throws error #0 on Android devices

I'm using File.openWithDefaultApplication to launch a file after it has been downloaded (via a web service) from a Domino server with its default application. The AIR application in which I'm doing this is running on Android devices (test device is a HTC Desire HD) as well as on the Blackberry Playbook (iOS is not testet yet with regards to the file download functionality).
Whilst File.openWithDefaultApplication is working fine on the Playbook (images, Word and text documents, Excel spreadsheets and pdf files are opened correctly), the same code throws an error code #0 on Android devices.
The following code snipset is the result function of the web service call
        private function dbdownloadfile_result(event:ResultEvent):void
            try
                if (event.result is ByteArray)
                    this.localfile  = File.documentsDirectory;
                    this.localfile  = this.localfile.resolvePath("download/"+ this.lst_filename);
                    this.filebytes  = event.result as ByteArray;
                    this.filestream = new FileStream();
                    this.filestream.open(this.localfile, FileMode.WRITE);
                    this.filestream.writeBytes(this.filebytes, 0, this.filebytes.bytesAvailable);                   
                    this.filestream.close();
                    if (this.customlistener != null)
                        this.customlistener(event);
                else
                    super.wsrvop_fault(event as FaultEvent);
            catch (err:Error)
                if (this.customerrorhandler == null)
                    trace(err.getStackTrace());
                else
                    this.customerrorhandler(err);
            finally
                if (this.customfinallyhandler != null) this.customfinallyhandler(null);
            this.wsrv.showProgressBar(false);
The above code creates a file in a sub-directory "download" in the device's documentDirectory. The filename depends on the attachment name stored on the Domino server. The above code is calling the customlistener after the file has been created in the "download" directory...
private function downloadOK(event:ResultEvent):void
    try
        trace(globals.DBFUTL.localfile.nativePath);
        trace(globals.DBFUTL.localfile.name);
        trace(globals.DBFUTL.localfile.url);
        globals.DBFUTL.localfile.addEventListener(IOErrorEvent.IO_ERROR,fileErrorIO);
        globals.DBFUTL.localfile.addEventListener(SecurityErrorEvent.SECURITY_ERROR,fileErrorSec) ;
        globals.DBFUTL.localfile.openWithDefaultApplication();
    catch (err:Error)
        trace(err.message);
        trace(err.errorID.toString());
The above code generates following console entries...
/mnt/sdcard/download/joan.JPG
joan.JPG
file:///mnt/sdcard/download/joan.JPG
Error #0
0
As said above, the same code works flawlessly on the Blackberry Playbook. I also can open the file on my Android using the file browser. So everything seems to be alright. Just File.openWithDefaultApplication doesn't want to work.
Any ideas what I might do wrong? Or is this bug?

PDF format is not supported on Android, save your folio as jpg or png.
By the way everything you describe can be easily done in DPS, andy reason to be doing it in Edge Animate? just curious :-)
Cheers
Alistair

Similar Messages

  • [Windows] file.url throw error when application executable in root directory

    Here is the bugbase ticked: Bug#3940278 - [Windows] file.url throw error when application executable in root directory
    If you launch AIR application packaged as bundle from root directory and try to get url property of any file you get IllegalOperationError.
    No matter what file url property you try to get.
    It's a big problem when you distribute your application on CD disks or flash drive.
    I'd like to ask everyone affected by this issue to take a minute and vote for the following bug.
    Thanks.

    I checked all deployment descriptions and there are no references to t3://localhost:7001. Few months back, I had the complete clustering setup working on 2 machines and now when I deploy my application on same configuration, it fails with t3://localhost:7001 unreachable error. I created a new cluster configuration on one machine with 2 managed server and it deploys fine. Can not figure out what has changed ?

  • How can I write a plugin to write a file to the SD card on Android devices?

    I would like to be able to write a file and save it to the SD card programatically with a plugin or extension for Firefox on Android devices, is this possible or is there any documentation on this?

    This would be a great place to start. There are plenty of documentation on the MDN to get you started.
    https://developer.mozilla.org/en-US/docs/Extensions/Firefox_on_Android

  • Error installing on Android device

    Hi guys
    My mobile project launches fine on the desktop AIR debugger/mobile emulator but when I export the release build to my device I get the following error...
    The package(s) were successfully created but the application could not be installed on one or more devices:
    Device ID S58302adc8c14 (Google Android): Problem occurred while installing Adobe AIR.
    Device ID S58302adc8c14 (Google Android): Problem occurred while installing the application.

    There is no more Flash Player for Android and there won't be another. Android is no longer compatible with Flash Player. Playing Flash content is very processor consumptive and it drains your battery, also shortening the life of it. Android (Google) recommends using either "Dolphin" or "Puffin" as your browser if you need to view Flash content with a mobile device running Android. They're both availabe in the GooglePlay store. These browsers use "server side" rendering to reduce the load on your device.

  • File sharing from mac to android device/phone tablet...(username/password invalid)

    i want to stream files from macbook pro to an android device (tablet and phone)
    i have set up the directories i want to share on the mac...
    and on the android device i have installed different apps, but nothing works... it is detecting the macbook but its asking for a username and password
    i use the username/pw i use to login to the mac, but that doesn't work it says its invalid
    i have tried plex. bs player. es file explorer..
    please advise?

    You can find the solution here:
    http://discussions.apple.com/thread.jspa?messageID=4284885
    Windows Vista includes security enhancements to file sharing, and defaults to NTLMv3 authentication, but your Mac thinks it's NTLMv2 (you can see the login failures in /var/log/samba/smbd.log). You need to tell Vista that it's OK to use an older version of NTLM.
    1. Run "regedit.exe" and open this key:
    HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Control\Lsa
    2. If it doesn't already exist, create a DWORD value named
    LmCompatibilityLevel
    3. Set the value to 2 (if that doesn't work, lower it to 1)

  • Music plays for some more minutes while deactivating android device

    I have  main menu(swf file) with music when I lock android device screen dims but music plays for some more minute and stops. I gave CurrentMovieClip.Stop(), in deavtive event. How could I stop music too while the screen goes please help me on this

    If you've just added the sound to a frame (assuming you're using Flash), you can stop all sounds with SoundMixer.stopAll()
    You would also need to import flash.media.SoundMixer.

  • Hi, I use a PC @ work and a MAC @ home to ger my mail, but on the road I use Gmail on an android device which use to work before the move to Icloud, I used the same settings that I used with the PC BROWSER  IN THE SETUP  for Gmail and keepgetting errors ?

    Hi, I'm trying to use Gmail to retrive my mail form Icloud, I use a mac at home and a pc at work and an android device on the road,  I have tried setting gmail the way I sign on with Chrome but I keep getting errors... what do I have to do differently....Fred

    This can be a problem with the file [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
    Delete [http://kb.mozillazine.org/sessionstore.js sessionstore.js] and sessionstore.bak in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
    If you see files sessionstore-##.js with a number in the left part of the name like sessionstore-1.js then delete those as well.
    See:
    * http://kb.mozillazine.org/Session_Restore
    See also:
    * http://kb.mozillazine.org/Firefox_crashes
    * [[Firefox crashes]]

  • Excel is throwing error when it click print : 'No printers are installed. To install a printer click the File tab, and then click Print. Click No Printers Installed, and then click Add Printer. Follow the instructions in the Add Printer dialog box'

    Excel is throwing error when it click print : 'No printers are installed. To install a printer click the File tab, and then click Print. Click No Printers Installed, and then click Add Printer. Follow the instructions in the Add Printer dialog box'
    Word, and powerpoint application are working fine.  
    Environment :  Windows 7 64-bit, MS Office 2013 64-bit
    Steps to recreate
    (i)  Create new user account and add to any group ( do not log on using this
     account)
      (ii)  runas /user:<new user account>  <fullpath>\excel.exe
       it will ask password so enter on command prompt
    (iii)  open any excel document  and click File->Print
      (iv)  verify result  (it is failing) it pop ups below error
     Error:`Microsoft Excel
     No printers are installed. To install a printer click the File tab, and then click
     Print. Click No Printers Installed, and then click Add Printer. Follow the
     instructions in the Add Printer dialog box.                                                                                                               

    Sorry for late reply i was not at work
    I have a default set excel is still throwing error. Interestingly winword , powerpoint and publisher are working fine. I am able to print from all office applications except Excel.
     Probably excel behaves differently from other office applications.
     Probably it is a bug in excel
    Workaround : Log on to a system once using newly created account then runas excel using this account then print works fine.
    It means something in user profile should be configure to run excel print operation. Could you please somebody help what I need to configure in user profile that makes print operation success?

  • There,are,restrictions,to,opening,PDF,files,on,an,Pad,or,Android,Device,that,will,open,in, Microsoft,Internet,Explorer,desktop,or,laptop.,If,I,bought,a,Windows,8.1,tablet,and,had,Ad obe,reader,installed,would,I,then,be,able,to,open,the,secure,document,wit

    There,are,restrictions,to,opening,PDF,files,on,an,iPad,or,Android,Device,that,will,open,in ,Microsoft,Internet,Explorer,desktop,or,laptop.,If,I,bought,a,Windows,8.1,tablet,and,had,A dobe,reader,installed,would,I,then,be,able,to,open,the,secure,document,with,Internet,Explo rer?

    What's,with,the,commas?
    If you have a tablet that runs full Windows 8 - not Windows 8 RT, which is limited.
    And if you install the full Adobe Reader for Windows, not the special Adobe Reader Touch for Windows 8.
    Then you will have the same features as a desktop.
    Unless they can't be accessed in touch mode, since it isn't a touch app.

  • File upload throws an error if the file is opened

    The file upload throws an Application type error if attached
    file is opened and it returns the following error message: "The
    MIME type of the uploaded file "application/octet-stream" was not
    accepted by the server." The file type I tried to attach was MS
    Word. It uploads fine if the file is closed.
    Is this expected behavior? Is there fix for this - to be able
    to upload a file while it is opened?

    fcpssupport wrote:
    > The file upload throws an Application type error if
    attached file is opened and
    > it returns the following error message: "The MIME type
    of the uploaded file
    > "application/octet-stream" was not accepted by the
    server." The file type I
    > tried to attach was MS Word. It uploads fine if the file
    is closed.
    >
    > Is this expected behavior? Is there fix for this - to be
    able to upload a
    > file while it is opened?
    >
    do you have an ACCEPT attribute defined in your
    <cffile>? if so, does it
    include "application/octet-stream" MIME type?
    Azadi Saryev
    Sabai-dee.com
    Vientiane, Laos
    http://www.sabai-dee.com

  • Pdf file causing archive utility to throw error

    I have a couple of pdf files which cannot be compressed without an error. Supposing that the nasty file is called foo.pdf.
    . In the Finder, right click on foo.pdf
    . Select Compress "foo.pdf"
    A file called foo.pdf.zip is created but an error pops up An error occurred while compressing a file. Strangely enough, the error window has a titlebar called "Copy".
    When looking in the Console, there is always an error from mdworker listed:
    2/24/2009 10:23:37 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework /Versions/A/Support/mdworker[20524] zip importer countered an error (2) scanning "/Path/to/foo.pdf.zip"
    This same file also always errors out when trying to use -ditto- in a Terminal window. (See this minithread: http://discussions.apple.com/thread.jspa?threadID=1724912 )
    FWIW, attempting to open foo.pdf.zip causes the Archive Utility to throw the error
    Unable to unarchive "foo.pdf.zip" into "Wherever".
    Error 1 - Operation not permitted
    Does anyone have any idea what could be causing the problem?
    Bill

    Nothing's wrong with it except that it doesn't support encrypted .zip files.  You'll just have to use third-party software, or a Terminal command, to unzip those.

  • I am using Mac OS X 10.7.5 as of now and when I am trying to upgrade to Mavericks, it is throwing error "The product distribution file could not be verified. It may be damaged or not signed".

    I am using Mac OS X 10.7.5 as of now and when I am trying to upgrade to Mavericks, the App Store is throwing error "The product distribution file could not be verified. It may be damaged or not signed".
    Is there anything I should do differently? Is anyone else facing the same issue?
    Kindly help.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It won’t solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    Third-party system modifications are a common cause of usability problems. By a “system modification,” I mean software that affects the operation of other software — potentially for the worse. The following procedure will help identify which such modifications you've installed. Don’t be alarmed by the complexity of these instructions — they’re easy to carry out and won’t change anything on your Mac. 
    These steps are to be taken while booted in “normal” mode, not in safe mode. If you’re now running in safe mode, reboot as usual before continuing. 
    Below are instructions to enter some UNIX shell commands. The commands are harmless, but they must be entered exactly as given in order to work. If you have doubts about the safety of the procedure suggested here, search this site for other discussions in which it’s been followed without any report of ill effects. 
    Some of the commands will line-wrap or scroll in your browser, but each one is really just a single line, all of which must be selected. You can accomplish this easily by triple-clicking anywhere in the line. The whole line will highlight, and you can then copy it. The headings “Step 1” and so on are not part of the commands. 
    Note: If you have more than one user account, Step 2 must be taken as an administrator. Ordinarily that would be the user created automatically when you booted the system for the first time. The other steps should be taken as the user who has the problem, if different. Most personal Macs have only one user, and in that case this paragraph doesn’t apply. 
    Launch the Terminal application in any of the following ways: 
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.) 
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens. 
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid. 
    When you launch Terminal, a text window will open with a line already in it, ending either in a dollar sign (“$”) or a percent sign (“%”). If you get the percent sign, enter “sh” and press return. You should then get a new line ending in a dollar sign. 
    Step 1 
    Triple-click anywhere in the line of text below on this page to select it:
    kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}' | open -ef 
    Copy the selected text to the Clipboard by pressing the key combination command-C. Then click anywhere in the Terminal window and paste (command-V). I've tested these instructions only with the Safari web browser. If you use another browser, you may have to press the return key after pasting. A TextEdit window will open with the output of the command. If the command produced no output, the window will be empty. Post the contents of the TextEdit window (not the Terminal window), if any — the text, please, not a screenshot. You can then close the TextEdit window. The title of the window doesn't matter, and you don't need to post that. No typing is involved in this step.
    Step 2 
    Repeat with this line:
    { sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix\.cron)|org\.(amav|apac|cups|isc|ntp|postf|x)/{print $3}'; echo; sudo defaults read com.apple.loginwindow LoginHook; echo; sudo crontab -l; } 2> /dev/null | open -ef 
    This time you'll be prompted for your login password, which you do have to type. Nothing will be displayed when you type it. Type it carefully and then press return. You may get a one-time warning to be careful. Heed that warning, but don't post it. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator. 
    Note: If you don’t have a login password, you’ll need to set one before taking this step. If that’s not possible, skip to the next step. 
    Step 3
    { launchctl list | sed 1d | awk '!/0x|com\.apple|org\.(x|openbsd)/{print $3}'; echo; crontab -l 2> /dev/null; } | open -ef 
    Step 4
    ls -A /e*/{cr,la,mach}* {,/}Lib*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta}* L*/Fonts .la* 2> /dev/null | open -ef  
    Important: If you formerly synchronized with a MobileMe account, your me.com email address may appear in the output of the above command. If so, anonymize it before posting. 
    Step 5
    osascript -e 'tell application "System Events" to get name of login items' | open -ef 
    Remember, steps 1-5 are all copy-and-paste — no typing, except your password. Also remember to post the output. 
    You can then quit Terminal.

  • SPIMport is throwing error when import .aspx file second time onwards

    Hi,
    when I am trying to import already existing file (second import) the import is throwing error  -
    Error: Value does not fall within the expected range.
     [ListItem]   Debug:    at Microsoft.SharePoint.SPFieldMap.GetColumnNumber(String strFieldName, Boolean bThrow)
       at Microsoft.SharePoint.SPListItemCollection.GetRawValue(String fieldname, Int32 iIndex, Boolean bThrow)
       at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw, Boolean bThrowException)
       at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw)
       at Microsoft.SharePoint.SPListItem.get_Item(Guid fieldId)
       at Microsoft.SharePoint.Deployment.ListItemSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
       at Microsoft.SharePoint.Deployment.XmlFormatter.CallSetObjectData(Object obj, SerializationInfo objectData, ISerializationSurrogate surrogate, ISurrogateSelector selector)
     Verbose: Performing final fixups.
     Progress: Import completed.
     Finish Time: 2/5/2015 4:37:25 PM.
     Duration: 00:18:41
     Total Objects: 5
     Finished with 0 warnings.
     Finished with 1 errors.
    I am unable to debug also. Though import is happening successfully. Thanks in advance

    Hi
    Use another forum for Webdynpro questions: Web Dynpro ABAP
    BR, Sergei

  • I can't share any file through bluetooth other android device

    sir, i can't share any file through bluthoot other android device?

    no nor to other iphones it's not a bluetooth profile supported by ios bluetooth is a pretty broad std.
    http://en.wikipedia.org/wiki/Bluetooth_profile

  • HWC Problems Android Device ERROR : Resources not defined

    Hello, I got some problems with the Hybrid apps on android device.
    I'm using an android emulator and in an android device.
    My apps on the emulators are ok, but when i open my app in android devices i get the error "Resources not defined" in a popup.
    If when generate the app's check  Optimize java script, the error not appears but it's like the Jquery framework it's not working.
    The app version is the same but the android version it's different.
    Are any problems with the HWC and Android 4.4.2 version?
    Android version on emulator 4.2.2
    Android version on device 4.4.2
    Thanks
    Some info maybe helps
    SMP server 2.3 SP3
    Relay Server 16

    Hi Viru p, The version of HWC is 2.3.3.6954, it's the same in the emulator and in the device.
    The emulator it's the apk came with the SMP SDK 2.3, and the device it's installed from the play store.
    Maybe the problem it's in the SDK
    SAP Mobile WorkSpace Product
    Version: 2.3 SP03
    Build id: 201309221318
    SAP Mobile WorkSpace - Mobile Business Object Development Documentation
    Version: 2.3.3.20130922001053
    Build id: 20130922001053
    SAP Mobile WorkSpace - Hybrid App Package Development Documentation
    Version: 2.3.3.20130922001053
    Build id: 20130922001053
    SAP Mobile WorkSpace - Eclipse edition
    Version: 2.3.3
    Build id: 201309221318

Maybe you are looking for

  • Excise Report

    Hi, How to find out Excise Report with T.Code ? Its Urgent. Regards, Parveen

  • Letter of Credit for imports, openning amendment and closing process

    Hi All, Can any body explain the process for the letter of credit opening amendment and closing process for imports. ur earliest response would be highly appreciated. Thanks & Regards, Althaf.

  • How to modify a row from a table?

    Hi experts! I've a doubt, I need to modify a table with some information I've search, if I do the code below, my program works slowly because the tabla ITDATOS has 650 rows... so, the problem is, how can I modify this in another way? FORM RELLENA_DAT

  • Flash Video Conversion

    I am new to the web video flash stuff. What is the best way to export a 1-2 minute (Audio/Video) clip from Final Cut. I all ready have Snoch that will convert to a FLV. I have been exporting as an AVI but the image quality falls apart as a flash vide

  • How to identify the psa table names in bi 7?

    Hi all, How to identify the psa table names in bi 7?  i need to know the psa table name in bi 7? as well as i need to check whether any historical data loads is there for psa for a particular period? How to filter for a particular data in the psa in