Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5963219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:13:02+00:00 2026-05-22T19:13:02+00:00

I have two Live Wallpapers that belong to the same Application and I am

  • 0

I have two Live Wallpapers that belong to the same Application and I am trying to have separate Preference settings for each one but I have run into the issue of the first settings being used by both Wallpapers.

<application android:icon="@drawable/icon" android:label="@string/app_name">
    <service
        android:label="first wallpaper"
        android:name="com.package.this1.number1"
        android:permission="android.permission.BIND_WALLPAPER">
        <intent-filter>
            <action android:name="android.service.wallpaper.WallpaperService" />
        </intent-filter>
        <meta-data android:name="android.service.wallpaper" android:resource="@xml/source1" />
    </service>

    <service
        android:label="second wallpaper"
        android:name="com.package.this2.number2"
        android:permission="android.permission.BIND_WALLPAPER">
        <intent-filter>
            <action android:name="android.service.wallpaper.WallpaperService" />
        </intent-filter>
        <meta-data android:name="android.service.wallpaper" android:resource="@xml/source2" />
    </service>

    <activity android:label="@string/settings"
        android:name=".this1.Settings1"
        android:exported="true"
        android:icon="@drawable/icon">
    </activity>

    <activity android:label="@string/settings"
        android:name=".this2.Settings2"
        android:exported="true"
        android:icon="@drawable/icon">
    </activity>

</application>

Am I missing something simple or is it not possible to do this without making 2 separate applications?

Here’s the code of my Settings1 and Settings2 classes

public class Settings1 extends PreferenceActivity   implements SharedPreferences.OnSharedPreferenceChangeListener {
@Override
protected void onCreate(Bundle bundle) {
    super.onCreate(bundle);
    getPreferenceManager().setSharedPreferencesName(number1.SHARED_PREFS_NAME);
    addPreferencesFromResource(R.xml.this1_settings);
    getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
}

public class Settings2 extends PreferenceActivity   implements SharedPreferences.OnSharedPreferenceChangeListener {
@Override
protected void onCreate(Bundle bundle) {
    super.onCreate(bundle);
    getPreferenceManager().setSharedPreferencesName(number2.SHARED_PREFS_NAME);
    addPreferencesFromResource(R.xml.this2_settings);
    getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
}

Any advice would be much appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:13:03+00:00Added an answer on May 22, 2026 at 7:13 pm

    Moonblink (creator of Android Tricorder) also has a collection of live wallpapers called Substrate. Substrate does indeed combine multiple wallpapers into a single package, and more than one of the wallpapers has a settings activity. I suggest you examine his structure. Start here http://code.google.com/p/moonblink/source/browse/
    and look for Substrate (under trunk). Hope this helps.

    P.S. The project home is here: http://code.google.com/p/moonblink/wiki/Substrate

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run foo.com. I have two different applications that live in foo.com: one is
I have two applications written in Java that communicate with each other using XML
I have two threads, one needs to poll a bunch of separate static resources
I have two different kinds of objects that I'd like to live under the
We have two zope servers running our company's internal site. One is the live
I have two virtual hosts within my apache config, one for live and one
I have two classes, and want to include a static instance of one class
I have two spreadsheets... when one gets modified in a certain way I want
I have two webapplication, one is a simple authenticationsite which can authenticate the logged
I have two insert statements, almost exactly the same, which run in two different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.