11-05-2008 10:20 AM
Say a user is browsing a web site and at some point clicks on a link which downloads a file (with a custom Mime type sent by the web server). At this point, I want to launch my application (and automatically exit the browser) which will consume the file and the user will then start using my application. I have seen examples of providing custom renderers for user defined mime types, but the data I have is not meant for rendering - I want to launch my own application.
This is somewhat like launching Acrobat when on mime type of application/pdf.
How would I register my application with the BB browser so that the application is launched when the browsre encounters a cutom mime type.
11-12-2008 09:35 AM
You can create a custom Java application that uses the JSR 211 Content Handler APIs to register a specific file and mime type. When a user opens a file of this type in the BlackBerry Browser they should be prompted to download the file and open it within your application.
Please have a look at the chapidemo included with the BlackBerry JDE for an example on the use of these APIs. However, note that you are not able to override support for types already supported by the browser.
11-12-2008 09:42 AM
11-20-2008 11:52 AM
11-28-2008 04:05 PM
There are some sublte nuances to the behavior here that you need to better understand with the CHAPI integration in the browser. Unlike the email application, the browser will not prompt the user when they select "Get Link" if they want to view the attachment using the attachment handler (in BES or BIS) or download the file to use the native attachment handler (CHAPI).
As such, if the user selects "Get Link" it will always use the attachment handler and there is no clean way for your application to handle that attachment data. If the user wants to leverage the native attachment handlers on the device they will need to select "Download Attachment" from the menu.
06-22-2009 09:49 AM
I just found a page that has a custom extension of bbaw (BlackBerry App World), that when clicked, opens the BlackBerry App World application automatically without downloading.
Is the bbaw extension handling an example of CHAPI? If it is, according to Mike's response, it would require the user to download the file before opening it up, which is doesn't. Is it a special extension?
06-22-2009 09:56 AM
06-22-2009 10:00 AM
06-30-2009 08:34 PM - edited 06-30-2009 08:36 PM
I am trying to answer a similar question.
Is it possible to tell user to go to a link in the browser, or click a link in an email or sms such as
so that this will result in the launch of my application which has registered to handle .abcde MIME type?