You can certainly have an application with no activity if all your application does is in the background with no UI. You application should probably have one (or more) Service, ContentProvider, or BroadcastReceiver though.
When ADT pushes a new apk on the emulator/device for debug it attempts to launch an activity. It looks for an activity setup (through intent filters) to appear on the home screen, and starts it, simulating the user starting the application manually. If there is no such activity (or no activity at all), then it will do nothing after installing the new apk. It will be up to you to trigger one of the components of your application (send an intent, have another application bind to the Service, etc...) to debug it. Xav On Tue, Dec 30, 2008 at 10:22 PM, anand <[email protected]> wrote: > > Hi All, > > I was playing around with the Hello Android program and got the > following questions regarding the AndroidManifest.xml file: > > 1. An application can have multiple "Activity"-ies, likewise is it > possible to declare multiple applications in a single manifest file? > If yes how to shift focus between the declared applications? > > 2. Modified the HelloAndroid manifest file as shown below: > > <?xml version="1.0" encoding="utf-8"?> > <manifest xmlns:android="http://schemas.android.com/apk/res/android" > package="com.android.hello" > android:versionCode="1" > android:versionName="1.0.0"> > > <application android:icon="@drawable/icon2" > android:label="MyTestApp"> > </application> > </manifest> > > MyTestApp.java is located in the src/com/android/hello directory. > > package com.android.hello; > > class MyTestApp > { > public static void main(String args[]) > { > System.out.println("MyTestApp:main() called"); > } > } > > The project built fine but generated the following messages which I > could not understand: > > [2008-12-30 13:16:38 - HelloAndroid] The Manifest defines no activity! > [2008-12-30 13:16:38 - HelloAndroid] The launch will only sync the > application package on the device! > [2008-12-30 13:16:38 - HelloAndroid] Only Syncing Application Package > > Questions: > a. Is it possible to have an application without any associated > activity? Can such an application have intents (and intent filters) to > process? > > b. Please explain what the message "The launch will only sync the > application package on the device!" mean. > > Thanks in advance. And thanks for patiently reading this far... > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

