Đang chuẩn bị liên kết để tải về tài liệu:
Xây dựng ứng dụng cho Android với HTML, CSS và javascript - part 18

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Tham khảo tài liệu 'xây dựng ứng dụng cho android với html, css và javascript - part 18', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Testing wurfl-php Now in your web directory such as Sites or public_html create the following PHP file name it something like wurfl-test.php . The first time you visit it from your Android device or any other browser it will take a long time as it builds the initial cache. After that it should be zippy. Figure A-1 shows how this should appear in your browser. You can now modify this PHP code to suit your needs html head meta name viewport content user-scalable no width device-width title WURFL Test title php define WURFL_DIR Users bjepson src wurfl-php-1.1 WURFL define RESOURCES_DIR Users bjepson src wurfl-php-1.1 require_once WURFL_DIR . Application.php wurflConfigFile RESOURCES_DIR . wurfl-config.xml wurflConfig new WURFL_Configuration_XmlConfig wurflConfigFile wurflManagerFactory new WURFL_WURFLManagerFactory wurflConfig wurflManager wurflManagerFactory- create wurflInfo wurflManager- getWURFLInfo requestingDevice wurflManager- getDeviceForHttpRequest _SERVER is_android FALSE if requestingDevice- getCapability device_os Android is_android TRUE head body php if is_android echo I spy an Android phone. ul php foreach requestingDevice- getAllCapabilities as key value echo li key value ul body html I couldn t use so I had to put in the full path to the WURFL stuff replace Users NAME src wurfl-php-1.1 with the full path to the wurfl-php directory you created earlier. Testing wurfl-php 153 Download from www.eBookTM.com SB8C 5 25 pm 0 http jepstone.local bj . Q I spy an Android phone. mobile_browser Android Webkit nokia_feature_pack 0 devlce.os Android nokia_series 0 has_qwerty_keyboard true polnting_method touchscreen mobile_browser_version nokia_edition 0 uaprof can_skip_aligned_link_row true devlce_claims_web_support true ununiquenessjiandler model_name Nexus One device_os_version 2.2 uaprof2 is_wireless_device true uaprof3 brand_name Google model extra info Goode Phone Figure A-1. Output of the sample wurfl-php script 154 Appendix Detecting Browsers with WURFL .