tags:

views:

55

answers:

1

I'm currently developing a BlackBerry application where I need to be able to open the application by clicking a link in an email or web page. The link would contain a string of text that would also need to be made available to the application at runtime.

The iPhone OS allows you to do this through custom protocols (ex. appname://some-other-text) quite easily. Is there similar functionality available in the BlackBerry SDK, or is this going to turn into a pipe dream?

+1  A: 

I have done something like this by registering a custom BrowserContentProvider (using a unique, custom MIME type). You then use a URL that returns an web page with the custom MIME type, which will trigger your BrowserContentProvider implementation. Part of this implementation can consist of code that launches your application (or bring it to the foreground if already running).

There's another class called ContentHandler that you may want to look into as well. I haven't used it, but it appears to be able to spawn custom handlers based on certain filename-matching conditions.

Marc Novakowski
Using the BrowserContentProvider worked perfectly. I did have an implementation of the ContentHandler working even more nicely in the simulator, but failed on an actual device.
harrywynn