Preference for Service


Last Updated:

  1. usml

    usml Active Member This Topic's Starter

    Joined:
    Dec 28, 2009
    Messages:
    38
    Likes Received:
    0
    Hi,
    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">

    <intent-filter>

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

    </intent-filter>

    </receiver>

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

    <intent-filter>

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

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

    </intent-filter>

    </activity>

    </application>

     

    Advertisement

Share This Page

Loading...