开发者

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 e开发者_开发技巧mails - 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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜