1. Are you ready for the Galaxy S20? Here is everything we know so far!

Preference for Service

Discussion in 'Android Development' started by usml, Jan 4, 2010.

  1. usml

    usml Newbie
    Thread Starter

    I have a Service start at power-up, and running in background. I also have a "preference" screen that allow user to set application preferences. Ideally, the preference screen come up ONLY when user click on application icon on LAUNCHER. The problem is, every time the phone powers up, the service get started (which is what I want), and the preference screen come up (this is annoying, not wanted).
    Here's part of manifest. Must be something specified incorrectly here (?)
    Thanks for any help.

    <application android:icon="@drawable/icon" android:label="@string/app_name">

    receiver android:name=".MyService" android:label="@string/app_name">


    <action android:name="android.intent.action.BOOT_COMPLETED" />



    activity android:name=".MyPreference" android:label="@string/app_name">


    <action android:name="android.intent.action.MAIN" />

    <category android:name="android.intent.category.LAUNCHER" />






Share This Page