BlackBerry - intercept text in HTML

南楼画角 提交于 2019-12-11 07:02:49

问题


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


回答1:


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



来源:https://stackoverflow.com/questions/5500415/blackberry-intercept-text-in-html

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!