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

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

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

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

Next, a WML card, or XHTML mobileprofile, needs to be created; it will be the target for the user to navigateto while they are browsing for an application to purchase. In reality, thiscard will be hosted by an operator or content aggregator.This is a simple WML with a link to the JAD file:<?xml version="1.0"?><!DOCTYPE wml PUBLIC "-// WAPFORUM// DTD WML 1.1// EN""www.wapforum.org/DTD/wml_1.1.xml"><wml><card id="card1" title="Symbian Download Test"><p align="center">To download game click below:</p><p><a href="Helloworld.jad">Hello World Turbo</a></p></card></wml>The XHTML file works in the same way as the WML file.

The Nokia6600 and Sony Ericsson P900 will recognize both XHTML and WMLfile formats.<?xml version="1.0"?><!DOCTYPE htmlPUBLIC "-// W3C// DTD XHTML Basic 1.0// EN""www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"><html xmlns="www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><title>Symbian Download Test</title></head><body><a href="Helloworld.jad">Hello World Turbo</a><br/></body></html>Once the WML and XHTML files are loaded onto the webserver, thereis one more configuration setting that needs to be checked.

This tells thewebserver to recognize the JAD and JAR file types as downloadable. Thethird line tells the webserver to serve the WML files as text.AddType text/vnd.sun.j2me.app-descriptor jadAddType application/java-archive jarAddType text/vnd.wap.wml wmlOnce the device has recognized and validated the JAD file information against the contents of the JAR file, download and installationwill commence.86GETTING STARTED2.4.2 Installing the MIDletThe previous section looked at how to physically put the MIDlet suite onthe device. Once this has been achieved it needs to be installed by theapplication management software.When the AMS detects that the user has either downloaded or transferred a MIDlet to the device, it will ask the user whether they wishto install the application.

In this case we are installing the Helloworldapplication on a Nokia 6600 (Figure 2.32).The softkeys display Yes and No options. Selecting No cancels theinstallation. Select Yes and you will be shown two options (Figure 2.33).Selecting View Details displays information from the JAD file(Figure 2.34).Figure 2.32 AMS checks that installation is required.Figure 2.33 AMS gives user the option to view details.INSTALLING AND RUNNING A MIDLET87Figure 2.34 JAD file information.Figure 2.35 AMS checks that installation can continue.After viewing this information, press OK to return to the previous prompt.

Continue can then be selected. Another message appears(Figure 2.35).Selecting No will cancel the installation. If installation is continued,Figure 2.36 may appear.The AMS may detect that the MIDlet has been previously installed onthe device. The user can choose to overwrite the previous version of theapplication or cancel the process. On the Nokia 6600, the user will thenbe prompted for a location for the MIDlet (Figure 2.37).This allows the user to determine whether to install the MIDlet on thephone memory or the removable multimedia card. Use the joystick tochoose one of the two options and press OK. Figure 2.38 illustrates whatthen appears.88GETTING STARTEDFigure 2.36 AMS detects that an existing application will be upgraded.Figure 2.37 Specifying the location.Figure 2.38 AMS checks whether to save existing data.SUMMARY89Selecting No overwrites the RMS data created by the previous installation of the MIDlet, if it existed.

Selecting Yes leaves the current dataintact for use by the new MIDlet. After this, the new MIDlet is installedon the device and an icon will appear in the Menu. Click the MIDleticon with the joystick, or select Options > Open, and the application willbe executed.2.5 MIDP on Symbian OS PhonesAll Symbian OS phones currently available in Western markets supportat least MIDP 1.0. The latest generation of Symbian OS phones, such asthe Nokia 6600 and Sony Ericsson P900 (and its localized variants) shipwith MIDP 2.0. The Nokia 6600 is based on the Series 60 DeveloperPlatform 2.0, itself built on top of Symbian OS Version 7.0s.

The SonyEricsson P900 is built on Symbian’s UIQ 2.1 touch screen referencedesign. In addition to MIDP 2.0, both these devices also support a rangeof additional optional APIs from the J2ME JSRs. Both phones support theWireless Messaging API (JSR 120), allowing phones to send and receiveSMS messages, and the Java API for Bluetooth Wireless Technology (JSR82). In addition, the Nokia 6600 ships with an implementation of theMobile Media API (JSR 135).

Chapters 3 and 4 cover programming thesephones, in detail.2.6 SummaryIn this chapter we have looked in greater depth at the MIDP 2.0 model.We have looked at how a MIDlet is structured, the GUI, the Event modeland the MIDlet lifecycle. We have also looked at how to build, pre-verifyand package MIDlet suites. We have created a sample application andshown how to put it onto a real device. We have also shown some of thetools on offer to the developer, from basic toolkits and emulators to fulldevelopment environments.In Chapter 3 we shall be looking in greater detail at MIDP 2.0, thesecurity model, the push registry and the Game API, to mention a fewtopics. We shall also be examining some of the extra APIs falling underthe Java Technology for the Wireless Industry (JTWI) specification.3MIDP 2.0 and the JTWIThe Java Technology for the Wireless Industry (JTWI) initiative is part ofthe Java Community Process (JSR 185) and its expert group has as its goalthe task of defining an industry-standard Java platform for mobile phones.By specifying a minimum set of Java APIs (as defined in the respectiveJSRs) that every JTWI-compliant device should support, it provides alowest common denominator Java platform that developers and serviceproviders can expect on future Java-enabled mobile phones.In this chapter we will take a look at the JTWI and the JSRs that formpart of Release 1.

After introducing the JTWI, we will briefly review theCLDC on Symbian OS. Then we will take a detailed look at MIDP 2.0and the optional APIs that are part of the JTWI roadmap.3.1 Introduction to the JTWIThe main goal of the JTWI is to minimize API fragmentation of the wirelessJava platform by reducing the need for proprietary APIs and providinga clear specification that phone manufacturers, network operators anddevelopers can target.

Release 1 of the JSR 185 specification receivedfinal approval in July 2003.The JTWI specification concerns three main areas:• it provides a minimum set of APIs (JSRs) that a compliant deviceshould support• it defines what optional features within these component JSRs mustbe implemented on a JTWI-compliant device• it provides clarification of component JSR specifications, where appropriate.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-892MIDP 2.0 AND THE JTWI3.1.1 Component JSRs of the JTWIThe JTWI defines three categories of JSR that fall under the specification:mandatory, conditionally required and minimum configuration.The following mandatory JSRs must be implemented as part of a Javaplatform that is compliant with JTWI Release 1:• MIDP 2.0 (JSR 118)• Wireless Messaging API (JSR 120).The Mobile Media API (JSR 135) is conditionally required in the JTWIRelease 1.

It must be present if the device exposes multimedia APIs (e.g.audio or video playback or recording) to Java applications.The minimum configuration required for JTWI compliance is CLDC1.0 (JSR 30). Since CLDC 1.1 is a superset of CLDC 1.0 it may be usedinstead, in which case it supersedes the requirement for CLDC 1.0.3.1.2 JTWI Specification RequirementsAs mentioned earlier, the JTWI specification makes additional requirements on the implementation of the component JSRs. A few selectedexamples of these are listed below. For full details of the requirementsimposed on component JSRs consult the JTWI specification availablefrom the Java Community Process (JCP) website (http://jcp.org).CLDC 1.0/1.1• must allow a MIDlet suite to create a minimum of ten running threads• must support Unicode characters.MIDP 2.0• must allow creation of at least five independent recordstores• must support the JPEG image format• must provide a mechanism for selecting a phone number fromthe device’s phonebook when the user is editing a TextFieldor TextBox with the PHONENUMBER constraint.WMA• GSM/UMTS phones must support SMS protocol push handling withinPushRegistryMMA• must support MIDI playback• must support VolumeControl for MIDI playbackINTRODUCTION TO THE JTWI93• must support JPEG encoding for video snapshots• must support Tone Sequence file format.Security Policy for GSM/UMTS Compliant DevicesThe JTWI specification provides a clarification of aspects of the MIDP2.0 recommended security policy for GSM/UMTS devices relating tountrusted domains.3.1.3JTWI DeliverablesAs well as defining the specification for the JTWI and providing a referenceimplementation (RI) and technology compatibility kit (TCK), JSR 185 alsodelivers a roadmap of candidate JSRs related to mobile phones that arelikely to form part of future releases of JSR 185.

The JTWI initiative doesnot discourage the adoption of additional JSRs to those defined in thespecification or featured in the roadmap; it merely defines a minimum setof APIs that a JTWI-compliant device should support.3.1.4 Symbian and the JTWISymbian supports and endorses the efforts of the JTWI and is a memberof the JSR 185 expert group. At the time of writing, the current release ofSymbian OS (Version 7.0s) provides implementations of the mandatoryJSRs and minimum configuration required by JTWI Release 1: CLDC 1.0,MIDP 2.0 and Wireless Messaging API.Current releases also provide an implementation of JSR 82, the JavaAPIs for Bluetooth Wireless Technology (see Chapter 4). The Nokia Series60 Developer Platform Version 2.0 is built on Symbian OS Version7.0s and, in addition to the JSRs already implemented, also providesNokia’s implementation of the Mobile Media API (JSR 135) as part of theJava platform.Current Symbian MIDP 2.0-enabled phones support the following JSRs:UI Reference DesignCLDC 1.0 (JSR 30)MIDP 2.0 (JSR 118)WMA(JSR 120)MMA(JSR 135)JABWT(JSR 82)Nokia 6600Sony EricssonP900/P908Series 60 v 2YesYesYesYesYesUIQ 2.1YesYesYesNoYesBecause the final release of the JTWI specification postdated that of theMIDP 2.0 specification by some eight months, the current implementation94MIDP 2.0 AND THE JTWIof Symbian’s CLDC 1.0/MIDP 2.0 Java platform (and devices using itsuch as the Nokia 6600 and the Sony Ericsson P900 and its localizedvariants) is not fully compliant with all the requirements of the JTWIspecification.

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

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

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

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