Richard Le Mesurier
Richard Le Mesurier

Reputation: 29714

BlackBerry - intercept text in HTML

I would like to be able to intercept a hyperlink from an email on BlackBerry.

e.g. <a href="http://glowworm.mobi">dummy site</a>

I have been able to intercept and identify text in a plain text email using PatternRepository. However, it doesn't seem to work with HTML emails - is this even possible?

I would like to avoid the solution of scanning every incoming email myself, and parsing all the text, but this might be the only option.

Thanks

Upvotes: 1

Views: 283

Answers (1)

Richard Le Mesurier
Richard Le Mesurier

Reputation: 29714

This is not possible (up to and including BlackBerry 6 afaik). It is not related to the hyperlink concept - it is not possible to use PatternRepository with any type of text within HTML text.

For performance reasons, the BlackBerry designers decided not to implement pattern matching within HTML fields (browser, or email). This is very unfortunate, but it must be dealt with.

In my app, I had the freedom to define the contents of the email. In my case, I ended up including the pattern into the subject of the email - the user can click on the subject to get to my app.

In most other situations, I think the best/only way forward is to intercept each mail as it arrives and parse it looking for the text. If I have to do that in the future, I'll try to update this post with some sample code.

There are various posts on the BlackBerry forums about this issue.

Richard

Upvotes: 1

Related Questions