wap, bluetooth, & 3g programming - cracking the code

552 1.8K 0
wap, bluetooth, & 3g programming - cracking the code

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

WAP, Bluetooth, and 3G Programming Dreamtech Software Team Take a look inside 15 professional wireless applications Complete with design specs, flow charts and line by line code analysis *85555-BACGJj ,!7IA7G4-fejafc!:p;o;t;T;T www.hungryminds.com ISBN 0-7645-4905-7 Reader Level Intermediate to Advanced Shelving Category Programming Dreamtech Software India, Inc., is a leading provider of corporate software solutions. Based in New Delhi, India, the Dreamtech software team has more than 50 years of combined software engineering experience. Take an In-Depth Look at 15 Professional Mobile Applications • Airport and Shopping Mall Kiosk applications using WAP over Bluetooth • File Transfer and Chat applications using Bluetooth technology • 3G applications for animation, music download, advertisment and database information retreval using Brew • Voice messaging, audio broadcasting and audio-video broadcasting using JMF • Information Master and Restaurant Master applications that use WML and WML scripting • A Question Quiz application based on WAP with Cold Fusion • An interactive Weather application that harnesses JSP and Java servlets • A Push application that takes advantage of Short Messaging Service (SMS) All software tested at the Dreamtech Software Research Lab Create Tomorrow’s Mobile Applications Today In this unique guide, a crack team of software engineers delivers the programming solutions and source code you need to jump start a wide range of mobile advertising, commerce, and audio- video streaming projects. Using flow charts and line-by-line analysis of 15 professional applications, they show you how to solve for typical WAP, Bluetooth, and 3G programming challenges — and create your own applications with WML, WTA, JSP, SMS, XSL, BREW, JMF, Visual C++ and other cutting-edge technologies. $49.99 US $74.99 CN £39.99 UK incl. VAT WAP, Bluetooth, and 3G Programming 1 0 , 0 0 0 + l i n e s o f s o u r c e c o d e o n C D - R O M ! c o d e o n C D - R O M ! 1 0 , 0 0 0 + l i n e s o f s o u r c e WAP, Bluetooth, and 3G Programming Dreamtech Software Team CD-ROM Includes: 15 professional applica- tions, complete with over 10,000 lines of source code Forte for Java, release 2.0, Community Edition Sun’s Java 2 Software Development Kit Stan- dard Edition, version 1.3, for Windows Nokia Activ Server Profes- sional Edition, trial version HomeSite and ColdFusion Studio Enterprise evalu- ation versions 4905-7 cover 9/10/01 8:45 AM Page 1 WAP, Bluetooth, and 3G Programming WAP, Bluetooth, and 3G Programming Cracking the Code Dreamtech Software Team Best-Selling Books • Digital Downloads • e-Books • Answer Networks • e-Newsletters • Branded Web Sites • e-Learning New York, NY u Cleveland, OH u Indianapolis, IN WAP, Bluetooth, and 3G Programming: Cracking the Code Published by Hungry Minds, Inc. 909 Third Avenue New York, NY 10022 www.hungryminds.com Copyright © 2002 Hungry Minds, Inc. All rights reserved. No part of this book, including interior design, cover design, and icons, may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording, or otherwise) without the prior written permission of the publisher. Library of Congress Control Number: 2001095398 ISBN: 0-7645-4905-7 Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 1B/RR/RQR/QR/IN Distributed in the United States by Hungry Minds, Inc. Distributed by CDG Books Canada Inc. for Canada; by Transworld Publishers Limited in the United Kingdom; by IDG Norge Books for Norway; by IDG Sweden Books for Sweden; by IDG Books Australia Publishing Corporation Pty. Ltd. for Australia and New Zealand; by TransQuest Publishers Pte Ltd. for Singapore, Malaysia, Thailand, Indonesia, and Hong Kong; by Gotop Information Inc. for Taiwan; by ICG Muse, Inc. for Japan; by Intersoft for South Africa; by Eyrolles for France; by International Thomson Publishing for Germany, Austria, and Switzerland; by Distribuidora Cuspide for Argentina; by LR International for Brazil; by Galileo Libros for Chile; by Ediciones ZETA S.C.R. Ltda. for Peru; by WS Computer Publishing Corporation, Inc., for the Philippines; by Contemporanea de Ediciones for Venezuela; by Express Computer Distributors for the Caribbean and West Indies; by Micronesia Media Distributor, Inc. for Micronesia; by Chips Computadoras S.A. de C.V. for Mexico; by Editorial Norma de Panama S.A. for Panama; by American Bookshops for Finland. For general information on Hungry Minds’ products and services please contact our Customer Care department within the U.S. at 800-762-2974, outside the U.S. at 317-572-3993 or fax 317-572-4002. For sales inquiries and reseller information, including discounts, premium and bulk quantity sales, and foreign-language translations, please contact our Customer Care department at 800-434-3422, fax 317-572-4002 or write to Hungry Minds, Inc., Attn: Customer Care Department, 10475 Crosspoint Boulevard, Indianapolis, IN 46256. For information on licensing foreign or domestic rights, please contact our Sub-Rights Customer Care department at 212-884- 5000. For information on using Hungry Minds’ products and services in the classroom or for ordering examination copies, please contact our Educational Sales department at 800-434-2086 or fax 317-572-4005. For press review copies, author interviews, or other publicity information, please contact our Public Relations department at 317-572-3168 or fax 317-572-4168. For authorization to photocopy items for corporate, personal, or educational use, please contact Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, or fax 978-750-4470. LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND AUTHOR HAVE USED THEIR BEST EFFORTS IN PREPARING THIS BOOK. THE PUBLISHER AND AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS BOOK AND SPECIFICALLY DISCLAIM ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THERE ARE NO WARRANTIES WHICH EXTEND BEYOND THE DESCRIPTIONS CONTAINED IN THIS PARAGRAPH. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES REPRESENTATIVES OR WRITTEN SALES MATERIALS. THE ACCURACY AND COMPLETENESS OF THE INFORMATION PROVIDED HEREIN AND THE OPINIONS STATED HEREIN ARE NOT GUARANTEED OR WARRANTED TO PRODUCE ANY PARTICULAR RESULTS, AND THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY INDIVIDUAL. NEITHER THE PUBLISHER NOR AUTHOR SHALL BE LIABLE FOR ANY LOSS OF PROFIT OR ANY OTHER COMMERCIAL DAMAGES, INCLUDING BUT NOT LIMITED TO SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR OTHER DAMAGES. Trademarks: Hungry Minds and the Hungry Minds logo are trademarks or registered trademarks of Hungry Minds, Inc. Macromedia, Homesite, and ColdFusion are trademarks or registered trademarks of Macromedia, Inc., in the United States and/or other countries. All other trademarks are the property of their respective owners. Hungry Minds, Inc., is not associated with any product or vendor mentioned in this book. is a trademark of Hungry Minds, Inc. Credits Acquisitions Editor Chris Webb Project Editor Neil Romanosky Technical Editor N. R. Parsa Copy Editors Jerelind Charles Jeremy Zucker Media Development Specialist Angela Denny Permissions Editor Carmen Krikorian Media Development Manager Laura Carpenter VanWinkle Project Coordinator Nancee Reeves Cover Design Anthony Bunyan Proofreader Mary Lagu Indexer Johnna VanHoose Dinse Cover Vault door image used courtesy of Brown Safe Manufacturing www.BrownSafe.com Dreamtech Software India, Inc., Team dreamtech@mantraonline.com www.dreamtechsoftware.com Dreamtech Software India, Inc., is a leading provider of corporate software solutions. Based in New Delhi, India, the company is a successful pioneer of innovative solutions in e-learning technologies. Dreamtech’s developers have over 50 years of combined software engineering experience in areas including Java, wireless applications, XML, voice-based solutions, .NET, COM/COM+ technologies, distributed computing, DirectX, Windows Media technologies, and security solutions. About the Authors Dr. K. V. K. K. Prasad is a renowned software engineer and professor with extensive experience in software engineering, wireless Internet, computer telephony integration, artificial intelligence, data communication, and telecommunications. He is a software consultant. Vikas Gupta is co-founder and president of Dreamtech Software. He is a software engineer and publisher actively engaged in developing and designing new technologies in wireless, e-learning, and other cutting-edge areas. He is also the managing director of IDG Books India (P) Ltd. Avnish Dass, co-founder and CEO of Dreamtech Software, is a talented and seasoned programmer with 15 years of experience in systems and application/database programming. He has developed security systems, anti-virus programs, wireless and communication technologies, and ERP systems. Deepesh Jain is a certified software developer and Microsoft Certified Professional with over three years of experience in VB, .NET, database programming, COM/COM+, Windows programming, and wireless technologies. He is a senior software developer at Dreamtech Software. To our parents and family and our beloved country India, for providing an excellent environment for nurturing and creating world-class IT talent. Preface The last three decades of the twentieth century yielded two revolutionary developments in communications technology: the Internet and mobile communication networks. The Internet — the global network that integrates all computer networks — enables us to access data services from our desktops. Mobile communications pave the way for voice communication services for people who are (literally) on the move. The tremendous impact of both these developments is evident from the growth rates of both Internet and the mobile network subscribers throughout the world. Standing at the beginning of the first decade of the twenty-first century, we will now witness the next revolutionary communications development: the integration of the Internet and mobile communications. This will pave the way for wireless Internet access and high-speed services on wireless devices. The ability to access Internet services through mobile devices will lead to anywhere–anytime communication. If wireless networks can support high speeds, users will be able to access data, voice, and video services. As is generally the case, the end user will probably not be concerned about the underlying technologies; he/she will be interested only in the applications that these networks support. Thus, strong application development is essential in order for futuristic wireless networks to achieve wide popularity. This book addresses the subject of developing applications for wireless Internet access. An Overview of the Technology A variety of tools and languages have been developed to create content for wireless systems that support applications with voice and video streaming services. This book describes in detail the tools and languages required to develop outstanding applications over wireless networks using the following three technologies: ♦ WAP ♦ Bluetooth ♦ 3G WAP Wireless Application Protocol (WAP) allows users to access Web content on low-speed wireless networks such as GSM, IS-136, and PDC. WAP was developed as an open standard protocol to bridge the wired Internet and the wireless networks. The WAP Forum was launched in December 1997 by Ericsson, Motorola, Nokia, and Phone.com. WAP specifications define the protocol conversion between the IP and cellular networks, as well as the markup language to create content for wireless Internet access. The wired Internet uses the TCP/IP protocol stack and HTTP to access Web services. The desktop PC is a powerful system with a high-resolution monitor, high processing capability, and an ability to present rich multimedia content to the user through a browser. All this requires huge system resources. To provide Web services to mobile clients is a challenge because mobile networks support low data rates (300 to 14.4 Kbps), and delays are frequent. In addition, mobile devices have small displays (2 to 4 lines with 8 to 12 characters per line), low resolution, no support for color, a limited-function keypad, low battery power, and low processing power. WAP has been developed as a lightweight protocol based on TCP/IP and HTTP. A WAP gateway bridges the WAP protocols and the Internet protocols by carrying out the necessary protocol conversion. To develop content that mobile devices can access, the Wireless Application Environment (WAE) is specified as a part of WAP. The WAE consists of viii Preface ♦ Wireless Markup Language (WML), a page description language that describes the content presentation. WML is similar to HTML and is based on XML. ♦ WML Script, a scripting language similar to JavaScript that can be used to facilitate calculations, validate user input, generate error messages locally, and pass parameters to the server. ♦ Content formats to describe the data, images, and other content. ♦ A micro-browser that runs on the mobile devices. The micro-browser occupies few system resources and provides only limited functionality, as compared with desktop browsers such as Internet Explorer and Netscape. WAP is an open standard that has the support of major equipment manufacturers, service providers, and software developers. WAP 1.1 was released in June 1999, and Version 1.2 was released in November 1999. During the past few years, a number of content providers have developed WAP content for applications — such as obtaining stock quotes, weather information, astrological information, sports news, and so on. Other applications that are now commercially available include mobile commerce, mobile advertising, and mobile banking. WAP has shown us the possibilities of using Internet access to obtain focused information on mobile phones in text format. However, as the capabilities of mobile devices improve and the data rates of the wireless networks increase, we now need to consider using other markup languages for wireless applications. Case in point: WAP has been revised to support XHTML for content creation. The first part of this book addresses content creation for providing wireless Internet access using WAP. We discuss content development using WML, WML Script, Cold Fusion, and Java technologies for creating applications using server-side programming and database access. Bluetooth Today’s business executive uses a large number of devices — desktop PC, laptop, PDA, mobile phone, and the like — in addition to peripherals such as a fax machine, LCD projector, cordless phone, and so on. These devices need to share information and resources, but interconnecting them through cables is cumbersome. Ideally, when two or more devices that need to share data are in close proximity, they should be able to form a network and exchange the data. That is, the devices should be capable of forming an ad-hoc network on their own and sharing data through simple commands given by the user. Bluetooth achieves this through a low-cost, low-power, short-range radio technology. Ad hoc networks can be formed among Bluetooth-enabled devices in the office, home, or car. Almost every electronic device can be Bluetooth enabled, be it a PC, laptop, printer, fax machine, modem, mobile phone, LCD projector, digital camera, cordless phone, music system, television, microwave oven, or Web TV. Bluetooth is a nascent technology that harbors enormous potential. A large number of vendors have developed the hardware and software to make devices Bluetooth enabled. Now the technology is also maturing as a cost-effective solution to replace cable. Developing exciting applications on the Bluetooth protocol stack is the “need of the hour.” This book presents a comprehensive coverage of Bluetooth programming. We also examine the many interesting applications that can be developed through a combination of WAP and Bluetooth. 3G End-users’ desire for increased bandwidth is paving the way for wireless networks that support higher data rates. The 2.5 Generation wireless networks that are evolving from the present 2G networks will support data rates in the range 64–144 Kbps. These 2.5G systems will, in turn, evolve into 3G systems that will support data rates in the range 384–2048 Kbps. Such data rates can support services such as high-resolution graphics and animation, downloading music from the Internet, teleshopping, multiparty audio and video conferencing, audio/video broadcasting over mobile networks, and so forth Preface ix The 2G and 2.5G wireless networks are based on protocols that conform to regional standards. Wireless networks in Europe, North America, and Japan are based on different standards. 3G systems aim to achieve global roaming by providing appropriate gateways for protocol conversion depending on the user’s geographic location. Wireless networks based on 3G networks are yet to be deployed on a large scale. In order for 3G networks to be profitable, they must support quality content and applications. Developing applications that provide low-cost data, voice, and video services is the biggest challenge; software developers and content providers need to concentrate on this aspect in the years to come. A number of alternatives, such as XHTML, XML, Java, and C++, are available for content development. In addition, mobile devices that access the Internet will have different capabilities in terms of memory, processing power, display resolution, size, and so on. To develop content that can cater to all types of devices is a great challenge to content creators. Content creators have to work with a wide variety of tools to create killer applications that the end user can use to carry out his/her business, education, and entertainment activities through mobile devices, all at a very low cost. We study aspects of 3G programming in detail in this book. We use the various tool kits available to test the content in the laboratory environment before deploying it on the network. We focus on creating applications for animation, voice, and video services using XHTML, XML, and Java. We use Qualcomm’s BREW toolkit to do the 3G programming. What This Book Covers This book is based on the unique concept of Cracking the Code and, consequently, mastering the technologies of WAP, Bluetooth, and 3G programming. This book is not meant for beginners: It will teach you only the basics of specific technologies. The Cracking the Code series is meant for software developers/programmers who wish to upgrade their skills and understand the secrets behind professional- quality applications. This book starts where other tutorial books end. It will enhance your skills and take them to the next level as you learn a particular technology. This is the first book to cover both Bluetooth and 3G programming. It contains a unique coverage of using WAP with Bluetooth and 3G content development for multimedia applications. The book is code intensive, with a lesser emphasis on theory. All the applications (and related source code) have been fully tested at Dreamtech Software Research Lab. The source code in this book is based on commercial applications developed by Dreamtech. Each program is explained in a very detailed manner so as to provide insight into the implementation of the technology in a real-world situation. The appendixes provide reference links so that the earnest reader can further explore the new developments that are taking place. Please note that this book does not provide a comprehensive tutorial of specific technologies — it provides only command summaries, as there are plenty of books available to teach you WML, WML Script, Cold Fusion, XHTML, Java Servlets, JSP, and the theoretical aspects of the Bluetooth and 3G protocols. This book’s objective is to put you on the evolutionary pathway of wireless communication and to help you develop exciting software that provides rich content and applications on wireless networks. The book begins with WAP content development using WML, WML Script, JSP, Servlets, Cold Fusion, and other technologies. It then moves on to a discussion of Bluetooth technology and finally to a detailed discussion of 3G. Emphasis is placed on developing applications for Bluetooth and 3G networks. The discussion of 3G content development is targeted to programmers and communication engineers and enables them to use available toolkits in their work. This is the first book that addresses 3G wireless application development and conversion of the WAP applications to 3G applications. This book is also unique in that it provides the programmer with a holistic approach to content development using various markup and programming languages to create high-end multimedia applications. [...]... the system opens the Movie.wml file and shows the listing of the all movies in the selected theatres On clicking the Weather Info option, the system calls the Weather.wml file, which internally calls the Weather.wmls file (Scripting file) that initializes the minimum and the maximum temperatures and returns them to the Weather.wml file Application Description Listing 2-1 contains the code for Information.wml... of sun on the browser screen by the Weather.wml code file Application Work Flow The application opens a menu with two options: Movie and Weather If the user clicks Movie, the Movie.wml file, which displays the name of movies and show timings, appears If the user clicks Weather, the Weather.wml file, which displays the maximum and minimum temperatures of various cities on the screen, appears These temperatures... is the close tag of the card, and Line 37 is the close tag for WML Code output Figure 2-3 shows the output of Movie.wml Figure 2-3 : Output screen of Movie.wml Chapter 2: WML and WML Script Programming: A Case Study 13 Listing 2-3 contains the code for Weather.wml Listing 2-3 : Weather.wml // © 2001 Dreamtech Software India Inc // All Rights Reserved 1 2 . Page 1 WAP, Bluetooth, and 3G Programming WAP, Bluetooth, and 3G Programming Cracking the Code Dreamtech Software Team Best-Selling Books • Digital Downloads • e-Books • Answer Networks • e-Newsletters. toolkit to do the 3G programming. What This Book Covers This book is based on the unique concept of Cracking the Code and, consequently, mastering the technologies of WAP, Bluetooth, and 3G programming. . 80 0-4 3 4-2 086 or fax 31 7-5 7 2-4 005. For press review copies, author interviews, or other publicity information, please contact our Public Relations department at 31 7-5 7 2-3 168 or fax 31 7-5 7 2-4 168. For

Ngày đăng: 25/03/2014, 12:12

Từ khóa liên quan

Mục lục

  • WAP, Bluetooth, and 3G Programming - Cracking the Code

    • Front Matter

      • Credits

      • Dreamtech Software India,Inc.,Team

      • About the Authors

      • Preface

      • Contents

      • Chapter 1 WAP, Bluetooth, and 3G: A Brief Introduction

        • Evolution of Wireless Networks

        • Evolution of Wireless Protocols and Applications

        • Languages and Tools for Content Development

        • Wireless Access Devices/Bluetooth

        • Summary

        • Chapter 2 WML and WML Script Programming: A Case Study

          • WML Commands and Syntax

          • WML Script — Commands and Syntaxes

          • The Information Master Application

          • The Restaurant Application

          • Summary

          • Chapter 3 WAP Using Cold Fusion:A Project

            • Cold Fusion:An Overview

            • Application:Question Quiz

            • Summary

            • Chapter 4 WTA: An Advanced Interaction Technique for Mobile Phones

              • Applications of WTA

              • Introduction to WTA Architecture

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan