Programming Java 2 Micro Edition for Symbian OS

pdf
Số trang Programming Java 2 Micro Edition for Symbian OS 500 Cỡ tệp Programming Java 2 Micro Edition for Symbian OS 6 MB Lượt tải Programming Java 2 Micro Edition for Symbian OS 0 Lượt đọc Programming Java 2 Micro Edition for Symbian OS 2
Đánh giá Programming Java 2 Micro Edition for Symbian OS
4.9 ( 11 lượt)
Nhấn vào bên dưới để tải tài liệu
Đang xem trước 10 trên tổng 500 trang, để tải xuống xem đầy đủ hãy nhấn vào bên trên
Chủ đề liên quan

Nội dung

Programming Java 2 Micro Edition on Symbian OS A developer’s guide to MIDP 2.0 Martin de Jode With Jonathan Allin, Darren Holland, Alan Newman and Colin Turfus Reviewed by Ivan Litovski, Roy Hayun, George Sewell, Simon Lewis, Michael Aubert and Hana Bisada Managing Editor Phil Northam Assistant Editor Freddie Gjertsen Programming Java 2 Micro Edition on Symbian OS Programming Java 2 Micro Edition on Symbian OS A developer’s guide to MIDP 2.0 Martin de Jode With Jonathan Allin, Darren Holland, Alan Newman and Colin Turfus Reviewed by Ivan Litovski, Roy Hayun, George Sewell, Simon Lewis, Michael Aubert and Hana Bisada Managing Editor Phil Northam Assistant Editor Freddie Gjertsen Copyright  2004 Symbian Ltd Published by John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex PO19 8SQ, England Telephone (+44) 1243 779777 Email (for orders and customer service enquiries): cs-books@wiley.co.uk Visit our Home Page on www.wileyeurope.com or www.wiley.com All Rights Reserved. No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except under the terms of the Copyright, Designs and Patents Act 1988 or under the terms of a licence issued by the Copyright Licensing Agency Ltd, 90 Tottenham Court Road, London W1T 4LP, UK, without the permission in writing of the Publisher, with the exception of any material supplied specifically for the purpose of being entered and executed on a computer system for exclusive use by the purchase of the publication. Requests to the Publisher should be addressed to the Permissions Department, John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex PO19 8SQ, England, or emailed to permreq@wiley.co.uk, or faxed to (+44) 1243 770620. Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The Publisher is not associated with any product or vendor mentioned in this book. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the Publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought. Other Wiley Editorial Offices John Wiley & Sons Inc., 111 River Street, Hoboken, NJ 07030, USA Jossey-Bass, 989 Market Street, San Francisco, CA 94103-1741, USA Wiley-VCH Verlag GmbH, Boschstr. 12, D-69469 Weinheim, Germany John Wiley & Sons Australia Ltd, 33 Park Road, Milton, Queensland 4064, Australia John Wiley & Sons (Asia) Pte Ltd, 2 Clementi Loop #02-01, Jin Xing Distripark, Singapore 129809 John Wiley & Sons Canada Ltd, 22 Worcester Road, Etobicoke, Ontario, Canada M9W 1L1 Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Library of Congress Cataloging-in-Publication Data Jode, Martin de. Programming the Java 2 micro edition for symbian OS: a developer’s guide to MIDP 2.0/ Martin de Jode . . . [et al.]. p. cm. ISBN 0-470-09223-8 1. Java (Computer program language). 2. Operating systems (Computers) 3. Wireless communication systems–Programming. I. Title. QA76.73.J38J615 2004 005.13 3 – dc22 2004007312 British Library Cataloguing in Publication Data A catalogue record for this book is available from the British Library ISBN 0-470-09223-8 Typeset in 10/12pt Optima by Laserwords Private Limited, Chennai, India Printed and bound in Great Britain by Biddles Ltd, King’s Lynn This book is printed on acid-free paper responsibly manufactured from sustainable forestry in which at least two trees are planted for each one used for paper production. Contents About This Book ix Author Biographies xiii Author’s Acknowledgements xvii Symbian Press Acknowledgements xix Foreword xxi Innovation Through Openness xxiii Section 1: J2ME and MIDP 1 1 Introduction to J2ME 3 1.1 1.2 1.3 1.4 1.5 Configurations and Profiles CLDC and MIDP CDC and Personal Profile J2ME on Symbian OS Summary 2 Getting Started 2.1 2.2 2.3 2.4 2.5 2.6 Introduction to MIDP Helloworld, Turbo Edition Introduction to Tools for MIDP Installing and Running a MIDlet MIDP on Symbian OS Phones Summary 3 7 16 21 22 23 23 46 54 82 89 89 vi CONTENTS 3 MIDP 2.0 and the JTWI 3.1 3.2 3.3 3.4 3.5 3.6 Introduction to the JTWI The CLDC on Symbian OS MIDP 2.0 Optional J2ME APIs in the JTWI MIDP 2.0 and Symbian OS Phones Summary 4 Java APIs for Bluetooth Wireless Technology 4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 Introduction to Bluetooth Introduction to the Bluetooth APIs Programming the Bluetooth APIs L2CAP Protocol Security Java Bluetooth API and the MIDP 2.0 Security Model Sample Code Development Tools Java Bluetooth APIs and Symbian OS Summary 5 MIDP 2.0 Case Studies 5.1 5.2 5.3 5.4 Introduction The Expense Application The Demo Racer Game The Picture Puzzle 91 91 94 95 155 201 202 205 205 206 208 224 227 229 230 241 244 244 247 247 248 282 294 Section 2: Writing Quality Code for Smartphones 317 6 Making Java Code Portable 319 6.1 6.2 6.3 6.4 Introduction Design Patterns Portability Issues Summary 319 320 326 333 7 Writing Optimized Code 335 7.1 7.2 7.3 7.4 7.5 7.6 7.7 7.8 Introduction What Are We Starting With? Benchmarking General Guidelines for Optimization Feedback and Responsiveness Object Creation Method Modifiers and Inlining Strings 335 336 336 337 338 338 340 343 CONTENTS 7.9 7.10 7.11 7.12 7.13 7.14 7.15 7.16 7.17 7.18 7.19 7.20 Using Containers How Not To Do It Copying an Array Thoughts on Looping Graphics LifeTime Case Study Arithmetic Operations Design Patterns Memory Management JIT and DAC Compilers Obfuscators Summary vii 348 349 351 352 358 366 385 386 388 390 391 392 Section 3: The Evolution of the Wireless Java Market 393 8 The Market, the Opportunities and Symbian’s Plans 395 8.1 8.2 8.3 8.4 8.5 8.6 8.7 8.8 8.9 8.10 Introduction The Wireless Java Market Meeting Market Needs Providing Advanced Services Why Java? Symbian and Java Java and Digital Rights Management The Java Verified Program Beyond Advanced Consumer Services Trends in Technology 395 395 400 402 406 409 418 420 421 421 Appendix 1: CLDC Core Libraries 423 Appendix 2: MIDP Libraries 429 Appendix 3: Using the Wireless Toolkit Tools at the Command Line 437 Appendix 4: Developer Resources and Bibliography 439 Appendix 5: Specifications of Symbian OS Phones 445 Index 461
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.