如何根据在BlackBerry应用中使用String pattern

如何在黑莓手机应用中,显示文字的时候,实现如下效果?

1.显示 @cafebabe,你可以选择菜单“新浪跟随cafebabe”?

2.显示 上海市卢湾区湖滨路xxx号,你可以选择菜单“Google地图”?

3.显示 手机号码,你可以选择菜单“拨打IP电话”?

 

这些功能都可以在黑莓上轻易实现,通过net.rim.device.api.util.StringPattern API 实现。

效果如下图:

 

如何根据在BlackBerry应用中使用String pattern_第1张图片

 

参考:

Blog: Super Apps Series (Java): How to leverage pattern recognition in your application (Part 1)
http://devblog.blackberry.com/2010/09/leverage-pattern-recognition-part-1/

Another blog:
http://codemonkeyan.blogspot.com/2009/03/how-to-leverage-pattern-matching-in.html

KB: Leverage pattern matching in BlackBerry smartphone applications to provide an integrated user experience
http://supportforums.blackberry.com/t5/Java-Development/Leverage-pattern-matching-in-BlackBerry-smartphone-applications/ta-p/445053?IID=DEVSF3101

KB: How to - Leverage pattern matching in BlackBerry smartphone applications to provide an integrated user experience
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/How_to_-_Leverage_pattern_matching_in_BlackBerry_smartphone_applications_to_provide_an_integrated_user_experience.html?nodeid=1234285&vernum=0

例子源代码:

http://supportforums.blackberry.com/rim/attachments/rim/java_dev@tkb/202/1/ZipCodeLookupSamples.zip

 

其他:

http://supportforums.blackberry.com/t5/Java-Development/quot-Get-Link-quot-context-menu-item-gone/m-p/384087#M73529

你可能感兴趣的:(如何根据在BlackBerry应用中使用String pattern)