Hello,

I have a need to create a background service that starts up during the
system boot up, and keeps running until the device is powered down. There is
no UI or Activity associated with this. I created a class extending the
android Service class, and added the setttings to the AndroidManifest.xml
file. When I launch this service in the emulator, I don't see this launched
at all. I have overrided almost all the methods in the Service class to put
log statements, but none of them shows up.

I believe the key is in the console message:

[2009-07-22 17:38:59 - MyEventsManager] No Launcher activity found!
[2009-07-22 17:38:59 - MyEventsManager] The launch will only sync the
application package on the device!

I am not sure what to make of this.

Here is the AndroidManifest.xml file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android";
      package="com.test"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:enabled="true" android:icon="@drawable/icon"
android:label="@string/app_name">

        <service android:name=".MyEventsManager"

android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
            <intent-filter>
               <action android:name="android.intent.action.BOOT_COMPLETED"
/>
            </intent-filter>
         </service>

    </application>
    <uses-sdk android:minSdkVersion="3" />
</manifest>

Here is the console output:

[2009-07-22 17:38:59 - MyEventsManager] ------------------------------
[2009-07-22 17:38:59 - MyEventsManager] Android Launch!
[2009-07-22 17:38:59 - MyEventsManager] adb is running normally.
[2009-07-22 17:38:59 - MyEventsManager] No Launcher activity found!
[2009-07-22 17:38:59 - MyEventsManager] The launch will only sync the
application package on the device!
[2009-07-22 17:38:59 - MyEventsManager] Performing sync
[2009-07-22 17:39:01 - MyEventsManager] New emulator found: emulator-5554
[2009-07-22 17:39:01 - MyEventsManager] Waiting for HOME
('android.process.acore') to be launched...
[2009-07-22 17:39:02 - Emulator] 2009-07-22 17:39:02.415 emulator[8874:10b]
Warning once: This application, or a library it uses, is using
NSQuickDrawView, which has been deprecated. Apps should cease use of
QuickDraw and move to Quartz.
[2009-07-22 17:39:21 - MyEventsManager] HOME is up on device 'emulator-5554'
[2009-07-22 17:39:21 - MyEventsManager] Uploading MyEventsManager.apk onto
device 'emulator-5554'
[2009-07-22 17:39:21 - MyEventsManager] Installing MyEventsManager.apk...
[2009-07-22 17:39:30 - MyEventsManager] Application already exists.
Attempting to re-install instead...
[2009-07-22 17:39:33 - MyEventsManager] Success!
[2009-07-22 17:39:33 - MyEventsManager]
/MyEventsManager/bin/MyEventsManager.apk installed on device
[2009-07-22 17:39:33 - MyEventsManager] Done!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to