Eclipse Mobile Mousw Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Mäuse Eclipse Mobile Mousw herunter. Develop Android applications with Eclipse Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 35
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 0
Develop Android applications with Eclipse
Get started with Google's Android Development Tools Eclipse
plug-in
Skill Level: Intermediate
Frank Ableson ([email protected])
Software designer
26 Feb 2008
Android is Google's oft-discussed mobile, wireless, computer, and communications
platform. You can take advantage of the powerful Eclipse environment to build
Android applications using the Android Eclipse plug-in. This tutorial introduces
Android application development with the Eclipse plug-in, otherwise known as
Android Development Tools. The tutorial provides an introduction to Android
development with a quick introduction to the platform, a tour of Android Development
Tools, and includes the construction of two example applications.
Section 1. Before you start
This tutorial introduces Android application development within the Eclipse
environment, including the construction of two example applications. The first is a
basic starter application, complete with all phases of building and debugging. The
second application examines more complex features of Android, including contacts
searching and Google Maps address lookup. To get the most from this tutorial,
mobile-development experience is helpful, but not required. Java™ programming
skills are required for Android applications, but are not an explicit requirement for
this tutorial.
About this tutorial
Develop Android applications with Eclipse
© Copyright IBM Corporation 1994, 2008. All rights reserved. Page 1 of 35
Seitenansicht 0
1 2 3 4 5 6 ... 34 35

Inhaltsverzeichnis

Seite 1 - Section 1. Before you start

Develop Android applications with EclipseGet started with Google's Android Development Tools Eclipseplug-inSkill Level: IntermediateFrank Ableson

Seite 2 - System requirements

The Android SDK is a compressed folder. Download and extract the contents of thisfile to a convenient place on your computer. For purposes of this tut

Seite 3 - Android terminology

that the license agreement includes a special requirement for use of theGoogle Maps API.6. Review and accept the installation location, then click Fin

Seite 4 - Why is Android important?

New project wizardThe first step is to create a new project. Select the wizard for Android project, asshown below.Figure 2. New project wizardThe requ

Seite 5 - The IntentFilter

• Package name• Activity name — Think of this as the main "form" or screen of theapplication• Application nameTake a look at the new project

Seite 6 - Services and receivers

The Package ExplorerThe Package Explorer (found in the Java perspective in Eclipse) displays all thecomponents of the sample Android application (see

Seite 7

src folderIncludes the package for the sample application, namelycom.msi.ibmtutorialR.javaThe Android Developer Tools create this file automatically a

Seite 8

super.onCreate(icicle);setContentView(R.layout.main);}}Things to note about this source snippet:• SaySomething is a normal Java class, with a package

Seite 9

The sample application contains a single activity and a single view. The applicationcontains a file named main.xml that represents the visual aspects

Seite 10

Listing 6. R.java file/* AUTO-GENERATED FILE. DO NOT MODIFY.** This class was automatically generated by the* aapt tool from the resource data it foun

Seite 11

We introduced an error into the source code where we added an extra spacebetween setContent and View. When the file is saved, it is compiled and anyer

Seite 12 - New project wizard

Why do we care about Android? Android is an important platform for two reasons.First, the fact that Google is introducing it and the mind-share Androi

Seite 13

</manifest>Things to note:• The package name from the source file is represented here. This followsa similar pattern to a Java source file and i

Seite 14 - The Package Explorer

Give the configuration a name. The tutorial sample uses the name TutorialConfiguration. Select the ibmtutorial project from the list of available proj

Seite 15

There are a few screen sizes and orientations to choose from, as well as networkchoices. The network choices are important when building applications

Seite 16 - Resources for the application

Now that the application is running on the Emulator, it's time to see what'shappening behind the scenes. The Dalvik Debug Monitor Service (D

Seite 17

The LogCat is a running log file of activity taking place in the VM. Applications canmake their own entries to this list with a simple line of code as

Seite 18 - Building applications

User applications are deployed in /data/app while Android built-in applications arefound in the /system/app directory.A running process list is also a

Seite 19 - AndroidManifest.xml

Full-scale debugging of an Android application is beyond the scope of this tutorial.For more information, see Resources.Section 6. Building the conten

Seite 20 - Running the application

contacts recorded and be sure to populate the home address field. Figure 12 showsthe Emulator with a few entries in the contact application.Figure 12.

Seite 21

developerWorks® ibm.com/developerWorksDevelop Android applications with EclipsePage 28 of 35 © Copyright IBM Corporation 1994, 2008. All rights reserv

Seite 22

Here is the first of two code snippets for the second application. Note that thisapplication's main Activity class extends the ListActivity. This

Seite 23 - Debugging the application

• Main.xml — This contains the visual elements, or resources, for use byAndroid activities.• R.java — This file is automatically generated by Android

Seite 24

Any one of the contacts may be selected by a tap (click of the mouse), the centerbutton on the emulator, or by pressing the Enter key on your keyboard

Seite 25

Listing 7. The onListItemClick() overridden method@Overrideprotected void onListItemClick(ListView list,View view,int position,longdbidentifier){super

Seite 26 - Maps example

There is a single activity launched from the main application screen. There is, ofcourse, the AndroidManifest.xml file identifying our new application

Seite 27

DownloadsDescription Name Size Download methodExample source code os-eclipse-android.examples.zip67KB HTTPInformation about download methodsibm.com/de

Seite 28

ResourcesLearn• The author's Android book is available in part online at Manning Publications.• The authoritative Android information source is G

Seite 29

Tivoli®, and WebSphere®.• Innovate your next open source development project with IBM trial software,available for download or on DVD.Discuss• The Ecl

Seite 30

platforms, including servers, desktop computers, networking appliances, andmobile-computing devices. Android runs on top of a Linux kernel.Dalvik Virt

Seite 31

clicking and tapping to operate. Sure, there are menus and buttons to be tapped, butAndroid has an innovative design element to its architecture known

Seite 32 - Section 7. Summary

Let's take a moment to examine the four main types of Android applications: activity,services, receivers, and ContentProvider. We will also take

Seite 33 - Downloads

public class myreceiver extends IntentReceiver{public void onReceiveIntent(Context arg0, Intent arg1){// do something when this method is invoked.}}Da

Seite 34 - Resources

View elements consist of familiar UI elements, including:• Button• ImageButton• EditText• TextView (similar to a label)• CheckBox• Radio Button• Galle

Seite 35 - About the author

Note that each element has one or more attributes in the Android name space.The next section walks through obtaining the Android SDK and configuring i

Kommentare zu diesen Handbüchern

Keine Kommentare