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 7016227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:45:25+00:00 2026-05-27T22:45:25+00:00

This is the Android Live Wallpaper. .LiveWallpaperSettings is main activity with settings preferences. <-

  • 0

This is the Android Live Wallpaper.

.LiveWallpaperSettings is main activity with settings preferences. <- works normally

.AboutActivity is simple dialog activity. <- application craches

I have the following code:

AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="ru.fph.iiidlayer"
    android:versionName="1.2"
    android:versionCode="1">

    <uses-sdk android:minSdkVersion="3" android:targetSdkVersion="7" />
    <uses-feature android:name="ru.fph.iiidlayer" />

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

        <supports-screen android:anyDensity="true" />

        <service android:name=".LiveWallpaper"
            android:label="@string/app_name"
            android:icon="@drawable/ic_launcher"
            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/livewallpaper" />

        </service>

        <activity android:label="@string/app_name"
            android:name=".LiveWallpaperSettings"
            android:theme="@android:style/Theme.Light.WallpaperSettings"
            android:exported="true"
            android:icon="@drawable/ic_launcher">
        </activity>

        <activity android:theme="@android:style/Theme.Dialog" 
            android:label="@string/livewallpaper_about_title" 
            android:name=".AboutActivity">
            <intent-filter>
                <action android:name="ABOUT_ACTION" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

    </application>
    <supports-screens android:anyDensity="true" 
        android:smallScreens="true" 
        android:normalScreens="true" 
        android:largeScreens="true" 
        android:resizeable="true" />
</manifest> 

livewallpaper_settings.xml:

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
    android:title="@string/livewallpaper_settings"
    android:key="livewallpaper_settings">

    <Preference android:key="livewallpaper_image" 
        android:title="@string/livewallpaper_image_title" 
        android:summary="@string/livewallpaper_image_summary" />
    <ListPreference
        android:key="livewallpaper_sens"
        android:title="@string/livewallpaper_sens_title"
        android:summary="@string/livewallpaper_sens_summary"
        android:entries="@array/livewallpaper_sens_names"
        android:entryValues="@array/livewallpaper_sens_prefix"/>
    <Preference android:key="livewallpaper_about"
        android:title="@string/livewallpaper_about_title"
        android:summary="@string/livewallpaper_about_summary">
        <intent android:action="ABOUT_ACTION" />
    </Preference>
</PreferenceScreen>

LivewallpaperSettings.java:

package ru.fph.iiidlayer;

import ru.fph.iiidlayer.R;
import android.content.Intent;
import android.content.SharedPreferences;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.preference.Preference;
import android.preference.Preference.OnPreferenceClickListener;
import android.preference.PreferenceActivity;
import android.provider.MediaStore;

public class LiveWallpaperSettings extends PreferenceActivity implements SharedPreferences.OnSharedPreferenceChangeListener, OnPreferenceClickListener
{
    Preference gallery_pref, about_pref;
    Intent gallery, about;
    String gallery_key = "livewallpaper_image";
    String about_key = "livewallpaper_about";

    @Override
    protected void onCreate(Bundle icicle)
    {
        super.onCreate(icicle);
        getPreferenceManager().setSharedPreferencesName(LiveWallpaper.SHARED_PREFS_NAME);
        addPreferencesFromResource(R.xml.livewallpaper_settings);
        getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);

        gallery_pref = findPreference(gallery_key);
        gallery = new Intent();
        gallery.setType("image/*");
        gallery.setAction(gallery.ACTION_GET_CONTENT);
        gallery_pref.setOnPreferenceClickListener(this);

        about_pref = findPreference(about_key);
        about = new Intent(this, AboutActivity.class);
        about_pref.setOnPreferenceClickListener(this);
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (resultCode == RESULT_OK)
            if(requestCode == 1) {
                String src = getRealPathFromURI(data.getData());
                LiveWallpaper.backgroundSrc = src;
            }
    }

    public boolean onPreferenceClick(Preference pr) {
        if(pr.getKey().equals(gallery_key)) {
            startActivityForResult(Intent.createChooser(gallery, getString(R.string.livewallpaper_gallery_title)),1);
        }
        /* if(pr.getKey().equals(about_key)) {
            startActivity(about);
        } */
        return false;
    }

    public String getRealPathFromURI(Uri contentUri) {
        String [] proj={MediaStore.Images.Media.DATA};
        Cursor cursor = managedQuery(contentUri, proj, null, null,  null);
        int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
        cursor.moveToFirst();
        return cursor.getString(column_index);
    }

    @Override
    protected void onResume()
    {
        super.onResume();
    }

    @Override
    protected void onDestroy()
    {
        getPreferenceManager().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);
        super.onDestroy();
    }

    public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key)
    {
    }
}

AboutActivity.java:

package ru.fph.iiidlayer;

import android.app.Activity;
import android.os.Bundle;

public class AboutActivity extends LiveWallpaperSettings {
    @Override
    protected void onCreate(Bundle icicle)
    {
        super.onCreate(icicle);
        setContentView(R.layout.about);
    }

    @Override
    protected void onResume()
    {
        super.onResume();
    }

    @Override
    protected void onDestroy()
    {
        super.onDestroy();
    }
}

LogCat:

12-30 11:11:26.967: D/AndroidRuntime(228): Shutting down VM
12-30 11:11:26.967: W/dalvikvm(228): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
12-30 11:11:26.967: E/AndroidRuntime(228): Uncaught handler: thread main exiting due to uncaught exception
12-30 11:11:26.987: E/AndroidRuntime(228): java.lang.RuntimeException: Unable to start activity ComponentInfo{ru.fph.iiidlayer/ru.fph.iiidlayer.AboutActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
12-30 11:11:26.987: E/AndroidRuntime(228):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
12-30 11:11:26.987: E/AndroidRuntime(228):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
12-30 11:11:26.987: E/AndroidRuntime(228):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
12-30 11:11:26.987: E/AndroidRuntime(228):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
12-30 11:11:26.987: E/AndroidRuntime(228):  at android.os.Handler.dispatchMessage(Handler.java:99)
12-30 11:11:26.987: E/AndroidRuntime(228):  at android.os.Looper.loop(Looper.java:123)
12-30 11:11:26.987: E/AndroidRuntime(228):  at android.app.ActivityThread.main(ActivityThread.java:4363)
12-30 11:11:26.987: E/AndroidRuntime(228):  at java.lang.reflect.Method.invokeNative(Native Method)
12-30 11:11:26.987: E/AndroidRuntime(228):  at java.lang.reflect.Method.invoke(Method.java:521)
12-30 11:11:26.987: E/AndroidRuntime(228):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
12-30 11:11:26.987: E/AndroidRuntime(228):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
12-30 11:11:26.987: E/AndroidRuntime(228):  at dalvik.system.NativeStart.main(Native Method)
12-30 11:11:26.987: E/AndroidRuntime(228): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
12-30 11:11:26.987: E/AndroidRuntime(228):  at android.app.ListActivity.onContentChanged(ListActivity.java:236)
12-30 11:11:26.987: E/AndroidRuntime(228):  at android.preference.PreferenceActivity.onContentChanged(PreferenceActivity.java:160)
12-30 11:11:26.987: E/AndroidRuntime(228):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:201)
12-30 11:11:26.987: E/AndroidRuntime(228):  at android.app.Activity.setContentView(Activity.java:1622)
12-30 11:11:26.987: E/AndroidRuntime(228):  at ru.fph.iiidlayer.AboutActivity.onCreate(AboutActivity.java:11)
12-30 11:11:26.987: E/AndroidRuntime(228):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
12-30 11:11:26.987: E/AndroidRuntime(228):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
12-30 11:11:26.987: E/AndroidRuntime(228):  ... 11 more
12-30 11:11:27.017: I/Process(52): Sending signal. PID: 228 SIG: 3
12-30 11:11:27.017: I/dalvikvm(228): threadid=7: reacting to signal 3
12-30 11:11:27.017: I/dalvikvm(228): Wrote stack trace to '/data/anr/traces.txt'

Gallery setting preference works absolutely correctly. But when I try to call AboutActivity with the same way (commented part in LivewallpaperSettings.java), application crashes on click on preference.

P.S. I made this example by other decompiled application

What do I do wrong?

  • 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-27T22:45:26+00:00Added an answer on May 27, 2026 at 10:45 pm

    Your AboutActivity back up it’s class hierarchy is extending a ListActivity hence the error about failing to find the list. Just extend Activity instead of extending your LiveWallpaperSettings class.

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

Sidebar

Related Questions

I'm working on a simple android live wallpaper, I'm following chapter 12 from Hello,
Trying to code a simple Live wallpaper for android. I'm having trouble finding out
I am building a simple live wallpaper for Android. I am uploading the required
This question occured to me while programming a Android application, but it seems to
This is pretty simple: I'm using NetBeans on Linux with Android emulator 1.6. I
My open-source Android application uses this in an SQL query: String.format(%f, someDoubleValue); Unfortunately, in
I'm currently writing a live wallpaper for Android and it has a PreferenceScreen which
We are trying to develop a live wallpaper for Android phones, but when it
I Downloaded Svn Code IPcamera which an Android application for Live Streaming Media From
I'm entirely new to Android development, and I'm interested in making a live wallpaper.

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.