06-16-2011 01:44 AM
Hi All,
I want lauch the native appllication like word to go from adope air script. i am QNXApplication.openFile(). It's not giving any exception but application is not lauch. Any idea about this issue?
06-16-2011 05:29 AM
You need to pass the file type in openFile(); but you should also check to see if the file type is supported first using QNXApplication.supportedFileTypesVector array to see if the file is a valid file extension.
06-16-2011 07:06 AM
06-16-2011 07:40 AM
var supportFileTypes:Vector.<String> = qnx.system.QNXApplication.supportedFileTypes;
for each (var value
tring in supportFileTypes)
{
trace("supportedFileTypes :"+value);
}
i can get supported file types. QNXApplication.qnxApplication.openFile( file.nativePath ); is not working what will i do?
06-16-2011 07:49 AM
I don't recall if QNXApplication.openFile() actually works yet, but have you tried using the standard Flash method with File.openWithDefaultApplication() ?
06-16-2011 09:46 AM
06-16-2011 09:47 AM
06-16-2011 10:07 AM - edited 06-16-2011 10:11 AM
I just tested with File.openWithDefaultApplication() and it works fine.
After copying the sample PDF from http://samplepdf.com into my media/documents folder over WiFi, I ran code that basically does this and it opened it directly in Adobe Reader:
var file:File = File.documentsDirectory.resolvePath('sample.pdf');
file.openWithDefaultApplication();
A similar test with QNXApplication.openFile() fails, even though the extension "pdf" is listed in QNXApplication.supportedFileTypes.
Oh, and it's well worth noting that to access files in the shared folders, you need the this in your blackberry-tablet.xml file: <action>access_shared</action> .
06-16-2011 10:19 AM
06-16-2011 12:55 PM