Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
zezke
Posts: 1,004
Registered: ‎12-12-2010
My Device: Z10 (red Limited Edition)
My Carrier: Mobile Vikings
Accepted Solution

Registering for handling a specific file type

Hi,

 

I am currently designing a application which will open a few specific kind of files. I have two question regarding this decision:

 

1. How can I tell the Playbook OS that I can handle those files?

 

2. How can I open/upload those files onto the emulator for testing purposes?

 

Thanks in advance.

-------------------------------------------
BlackBerry Certified Builder for Native Application Development -- Proud member of the Belgian BlackBerry Developer group
Samples: Park in Ghent
Feeling generous? Nominate me for BB Elite member!
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Registering for handling a specific file type

You can install files that are under your /src file.  Those files will be in the folder defined by the class File.applicationDirectory.  Other files could be grabbed from the Internet and saved to the File.applicationStorageDirectory or File.documentsDirectory.

 

AIR allows you to register certain file types that a certain application can manage.  That is defined in the -app.xml file.

Please use plain text.
New Contributor
amitgupta_mds
Posts: 4
Registered: ‎06-25-2011
My Device: Playbook
My Carrier: Wifi

Re: Registering for handling a specific file type

Hi,
I am also facing a similar problem, the difference is this I am trying on a real device. Let me explain..


We are developing an application which would allow opening files in some proprietary  formats, for this we have to register our application for those file types. We have already tried setting up file types in AIR XML configuration file. What's interesting is that after those changes corresponding AIR application running on a MAC OSX Desktop gets registered for the file types but the playbook variant doesn't work. 

 

This leads me to conclude that there is some more configuration required for the playbook variant. As of now we are stuck with no clue to move forward. Any help would be highly appreciated. 

 

XML Snippet for AIR XML Configuration File

 

<fileTypes>

<fileType>

<name>FILE-NAME</name>

<extension>xxx</extension>

<description>File Description we would like to support</description>

<contentType>application/octet-stream</contentType>

<icon>

<image16x16>assets/icon-16x16.png</image16x16>

<image32x32>assets/icon-32x32.png</image32x32>

<image48x48>assets/icon-48x48.png</image48x48>

<image128x128>assets/icon-128x128.png</image128x128> 

</icon> 

</fileType>

</fileTypes>

 

More Information 

 

Development IDE : Flash Builder 4.5

Operating System : Mac OSX 10.6.6

BlackBerry SDK : 1.1.0


Thanks

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Registering for handling a specific file type

It would be nice to get a RIM response on this, since I too have not been able to register file types and associate them to an application. Obvious it can be because some pre-installed apps do this. As I mentioned in another post, the only thing I can think of that RIM is preventing 3rd party apps from doing this is because they do not have a preference to select an app as a preferred app for a particular file type.
Please use plain text.
New Contributor
amitgupta_mds
Posts: 4
Registered: ‎06-25-2011
My Device: Playbook
My Carrier: Wifi

Re: Registering for handling a specific file type

Thanks John for your Reply !

 

I would be eagerly waiting for a word from RIM as this would be holding us on releasing some stuff which we intend to develop for RIM platform !

 

Thanks

Please use plain text.