• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Preference for Service

usml

Newbie
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>

 
Back
Top Bottom