Главная » Просмотр файлов » Programming Java 2 Micro Edition for Symbian OS 2004

Programming Java 2 Micro Edition for Symbian OS 2004 (779882), страница 46

Файл №779882 Programming Java 2 Micro Edition for Symbian OS 2004 (Symbian Books) 46 страницаProgramming Java 2 Micro Edition for Symbian OS 2004 (779882) страница 462018-01-10СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 46)

Before starting the searchb. Sending the image to the discovered serverFigure 4.9 The Bluetooth application running on Nokia 6600 phones; the client is on theleft and the server on the right.DEVELOPMENT TOOLS2414.8 Development ToolsIn this section we shall consider some of the tools that are availableto assist developers in building applications using the Java APIs forBluetooth Wireless Technology (JSR 82). Tools for developing with JSR82 come in two forms: those that interface to real Bluetooth devices(dongles) attached to the development platform; and those that simulatethe Bluetooth hardware and interactions entirely in software.

In thissection we will look at tools that adopt both approaches.4.8.1 Rococo Impronto SimulatorThe Impronto Simulator from Rococo Software is an ideal way fordevelopers new to JSR 82 to explore the APIs and for more experienceddevelopers to produce prototypes of Java Bluetooth applications.The Impronto Simulator runs Java Bluetooth applications in a simulatedBluetooth environment, allowing developers to easily test and configureapplications before deploying them on Bluetooth devices. Since theImpronto Simulator provides total software emulation, developers canstart programming JSR 82 without the hassle of acquiring and configuringmultiple Bluetooth devices within their development environment.At the time of writing, the Impronto Simulator integrates with boththe Java 2 SE JDK 1.3.1 and the Java 2 ME Sun Wireless Toolkit 1.0.4and is available for both Windows and Linux (Red Hat) platforms.

TheImpronto Simulator provides a virtual Bluetooth stack that processes JSR82 API calls and routes the messages between virtual devices (such asinstances of the WTK emulator) via localhost socket connections. Thesimulator also provides a Discovery Daemon allowing the virtual devicesto locate each other.

A Simulator Manager GUI allows developers tomonitor the interaction of virtual devices and create and configure virtualdevices non-programmatically. Figure 4.10 shows a simple Bluetoothclient–server application running on Sun’s Wireless Toolkit in Impronto.The contents of the server’s ServiceRecord are displayed in thebottom left frame of the Manager console and the control panel in theright hand frame allows the configuration of virtual devices.For more information on the Impronto Simulator go to www.rococosoft.com.4.8.2Nokia Developer’s Suite for J2ME 2.0The Nokia Developer’s Suite for J2ME 2.0 (NDS 2.0) is a development environment for Nokia’s range of MIDP-enabled phones, includingSeries 60 MIDP 2.0 devices such as the Nokia 6600.

Windows andLinux variants of the NDS 2.0 can be downloaded from Forum Nokia(forum.nokia.com). It can be integrated with industry standard IDEs242JAVA APIs FOR BLUETOOTH WIRELESS TECHNOLOGYFigure 4.10 Using Impronto Simulator with Sun’s Wireless Toolkit.such as Borland’s JBuilder and Sun ONE Studio Mobile Edition, or run ina standalone mode.NDS 2.0 supports development using the Java Bluetooth APIs andtakes a similar approach to Impronto Simulator in providing emulation ofBluetooth devices in software.The default settings for Bluetooth emulation allow multiple instancesof the emulator running on the same computer to communicate overthe loopback address.

The NDS 2.0 can also be configured to allowmultiple instances of the emulator running on different host machines tocommunicate over UDP.4.8.3 Symbian SDKs and BluetoothBoth the Series 60 MIDP SDK 1.2.1 for Symbian OS, Nokia Edition andthe UIQ 2.1 SDK provide implementations of the Java Bluetooth APIs.In both cases, they provide a testing environment that integrates withDEVELOPMENT TOOLSFigure 4.11243Nokia Developer’s Suite for J2ME 2.0.real Bluetooth devices rather than using software simulation as employedby the previously discussed tools. However, in each case only a limitedrange of Bluetooth devices is supported.The Series 60 MIDP SDK 1.2.1 for Symbian OS, Nokia Edition is available from Forum Nokia.

To use Bluetooth, the SDK should be installedon a laptop running Windows 2000. The SDK currently only supportseither the Nokia Connectivity Card DTL-4 or the Socket Bluetooth CFCard. The Bluetooth card must be installed as a COM port using theSerial Communications Driver in Windows 2000 (rather than installingthe proprietary drivers). For full installation instructions refer to SettingUp and Using the Bluetooth Testing Environment for Series 60 Platform,available from Forum Nokia.The UIQ 2.1 SDK is available from www.symbian.com. This SDKprovides implementations of MIDP 2.0, WMA and the Java BluetoothAPIs. In terms of Bluetooth hardware, the UIQ 2.1 SDK currently onlysupports the Casira serial pod (see www.csr.com).

For installation and244JAVA APIs FOR BLUETOOTH WIRELESS TECHNOLOGYconfiguration instructions see the documentation that comes with theSDK, How to configure comms settings / Configuring the UIQ emulatorfor Bluetooth connection.4.8.4 Choosing Tools for Java Bluetooth DevelopmentThe choice of tools for Java Bluetooth development falls into two categories: those that provide a virtual simulation of Bluetooth devices entirelyin software; and those that provide integration with Bluetooth hardware.Currently, the support for Bluetooth hardware by developer tools is toolimited to make these solutions attractive unless one already owns theparticular Bluetooth device supported (particularly bearing in mind thatat least two Bluetooth devices are likely to be required for any serious JSR82 development).The best approach at present, particularly for small third-party developers, is to employ one of the software simulation options provided bythe Rococo Impronto Simulator or the Nokia Developer’s Suite for J2ME2.0, and then move straight to testing on the target phone.

However, it islikely the situation will improve in the near future as the range of actualBluetooth hardware supported by SDKs improves.4.9 Java Bluetooth APIs and Symbian OSAt the time of writing, the latest release of Symbian OS is Version 7.0s.This is the first full release containing JSR 82 as part of Symbian’s Javaoffering, although the UIQ 2.1 platform also offers the Java Bluetooth APIas a backport to Symbian OS Version 7.0. Devices shipping with this APIinclude Nokia 6600 (a Series 60 phone based on Symbian OS Version7.0s) and Sony Ericsson P900 (based on UIQ 2.1).As mentioned earlier, Version 7.0s and UIQ 2.1 implement thejavax.bluetooth APIs but not the javax.obex package.

Hence,Symbian OS currently provides no implementation for the Objectexchange protocol (OBEX) or the related Generic Object ExchangeProfile (GOEP). There is therefore no implementation for the Connector.open(btgoep://...) URI syntax. In addition, Bluetoothconnections are not currently supported by the push registry implementation. It is intended that implementation of the javax.obex package willbe added in future releases, along with push registry support for incomingL2CAP and RFCOMM connections.4.10SummaryIn this chapter we have looked at programming the Java APIs for BluetoothWireless Technology (JSR 82). First we introduced Bluetooth as a technology and the Java APIs.

Next we looked at programming these APIs: how toSUMMARY245set up a Bluetooth Serial Port profile service over RFCOMM, discover theservice and connect to it. We also looked at the equivalent procedure forestablishing and connecting to L2CAP services. In the following sectionwe discussed a simple client–server sample application, building on thematerial covered in the earlier sections.

Finally, we reviewed some oftools available to programmers interested in working with JSR 82. InChapter 5 we will look in depth at some MIDP case studies.5MIDP 2.0 Case Studies5.1 IntroductionCase Study 1This case study describes the design and creation of an expense claimapplication.

Aimed at the enterprise market, this is an early prototype ofan actual application designed for use by Symbian staff on the move witha Sony Ericsson P900 or Nokia 6600.Case Study 2This case study demonstrates how the Game API can be used to developrich gaming content. We take you to the Symbian-sponsored speedwaytrack to learn to manage a complex composite scene of backgroundlayers and sprites and to demonstrate the use of collision detection.Programming Java 2 Micro Edition on Symbian OS: A developer’s guide to MIDP 2.0.

Martin de Jode 2004 Symbian Ltd ISBN: 0-470-09223-8248MIDP 2.0 CASE STUDIESCase Study 3This case study demonstrates the application of the Mobile Media API,the RMS and the TiledLayer class from the Game API. The Picture PuzzleMIDlet is a variation on the familiar Mix Pix native application that shipson Nokia Series 60 phones.5.2 The Expense ApplicationThis application uses a wide range of technologies including custom itemsfor the user interface, record stores for persistent information and XMLcoupled with sockets for communication between the wireless devicesand a central server. It also provides information regarding the J2MEdevelopment environment and practical considerations when creatingapplications for Series 60 and UIQ devices.The design of this application was based upon two central themes:• to demonstrate that viable services can be created on wireless devicesusing MIDP 2.0• to create a useful prototype of an expense claim application in order toprovoke a discussion within Symbian on the requirements for a systemthat could be made available to all staff and enable improvements inefficiency over the existing expense processing system.The requirements for the expense application prototype are reasonablyclear: as with all organizations, expenses must be approved by a manageror budget holder prior to payment.

The expense application allows users,or claimants, to create and submit expenses on their wireless device.Budget holders receive a copy of the expense claim on their device andcan either approve or reject it. In order for the approval mechanismto work, the wireless devices synchronize expense information with acentral server.THE EXPENSE APPLICATION2495.2.1 The Development EnvironmentThe expense application was developed using Sun’s Wireless Toolkit(WTK) in conjunction with Sun’s Java Developer Kit 1.4.

Detailed discussion in this chapter will be limited to the WTK. WTK provides acomprehensive solution to the needs of the MIDlet developer, withnumerous emulator skins and many parameters for restricting, monitoringand profiling MIDlets. It’s worth spending some time understanding theWTK’s capabilities, as this will pay dividends during development.Nokia also provides a wireless toolkit that is downloadable fromhttp://forum.nokia.com. This provides the same basic tooling as theWTK but with emulators for Series 60 devices.

Характеристики

Тип файла
PDF-файл
Размер
5,73 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
А знаете ли Вы, что из года в год задания практически не меняются? Математика, преподаваемая в учебных заведениях, никак не менялась минимум 30 лет. Найдите нужный учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6358
Авторов
на СтудИзбе
311
Средний доход
с одного платного файла
Обучение Подробнее