0

I am trying to develop a live wallpaper which displays live scorecards using the android.service.wallpaper.WallpaperService. I planning to have a list preference for the wallpaper, which will the give the user an option to choose the match that he wishes to follow. I followed this http://www.vogella.com/articles/AndroidLiveWallpaper/article.html When I launch the settings, i am able to see the preference. but the preference dialogue doesn't close when I choose one and the same is not getting reflected in the wall paper. I checked the LogCat. No exceptions are thrown.

Android version: 4.1

Manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.android.livesc.wallpaper" android:versionCode="1"
  android:versionName="1.0">
  <application android:icon="@drawable/icon" android:label="@string/app_name">


    <service android:name="MyWallpaperService" android:enabled="true"
      android:permission="android.permission.BIND_WALLPAPER" android:label="Wallpaper Example ">
      <intent-filter>
        <action android:name="android.service.wallpaper.WallpaperService"></action>
      </intent-filter>
      <meta-data android:name="android.service.wallpaper"
        android:resource="@xml/mywallpaper"></meta-data>
    </service>
    <activity android:label="@string/app_name" android:name=".MyPreferencesActivity"
      android:theme="@android:style/Theme.Light.WallpaperSettings"
      android:exported="true">
    </activity>
  </application>
  <uses-sdk android:minSdkVersion="10" />
  <uses-feature android:name="android.software.live_wallpaper"
    android:required="true"></uses-feature>

</manifest> 

Wallpaper.xml

<?xml version="1.0" encoding="UTF-8"?>
<wallpaper 
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:thumbnail="@drawable/icon"
  android:description="@string/wallpaper_description"  
  android:settingsActivity="com.android.livesc.wallpaper.MyPreferencesActivity"/> 

Please help me out..

Thanks, Karthick

Karthick R
  • 599
  • 9
  • 25

1 Answers1

0
 android:settingsActivity="de.vogella.android.wallpaper.MyPreferencesActivity"

 package="com.android.livesc.wallpaper"

i think,this is the problem. u have to put same package name that's where your setting file is placed.

here's my code:

<wallpaper xmlns:android="http://schemas.android.com/apk/res/android"
           android:settingsActivity="com.aavid.wallpapers.SettingActivity"
          android:thumbnail="@drawable/icon" 
          android:description="@string/description"
/>

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.aavid.wallpapers"
      android:versionCode="1"
      android:versionName="1.0">
    <uses-sdk android:minSdkVersion="7" />
NaserShaikh
  • 1,576
  • 2
  • 23
  • 39