如何根據在BlackBerry應用中使用String pattern

來源:互聯網
上載者:User

如何在黑莓手機應用中,顯示文字的時候,實現如下效果。

1.顯示 @cafebabe,你可以選擇菜單“新浪跟隨cafebabe”。

2.顯示 上海市盧灣區湖濱路xxx號,你可以選擇菜單“Google地圖”。

3.顯示 手機號碼,你可以選擇菜單“撥打IP電話”。

 

這些功能都可以在黑莓上輕易實現,通過net.rim.device.api.util.StringPattern API 實現。

效果如下圖:

 

 

參考:

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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.