I have problem with my Lv. I create launcher activity to it, using this code:
Toast toast = Toast.makeText(this, "Choose Photo Live Wallpaper from the list to start the Live Wallpaper.",Toast.LENGTH_LONG);
toast.show();
Intent intent = new Intent();
intent.setAction(WallpaperManager.ACTION_LIVE_WALLPAPER_CHOOSER);
startActivity(intent);
finish();
in my manifest I declare it using this:
<activity android:name=".Launcher" android:label="@string/app_name"
android:screenOrientation="portrait"
android:icon="@drawable/iconn">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.CREATE_SHORTCUT" />
</intent-filter>
</activity>
and it is working but when i click on set wallpaper launcher activity is starting again and i dont know why. Logcat give me this error:
chanel '4143dd60 org.me.project.serviceLv (client) ~ Publisher close input chanell or an error ocured event=0x8
Thanks for any help
This is my manifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.gp.project.photogallerylivewallpaper"
android:versionCode="2"
android:versionName="1.1" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="14" />
<uses-feature android:name="android.software.live_wallpaper" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application>
<service
android:name=".GalleryWallpaper2"
android:label="Photo LiveWallpaper"
android:permission="android.permission.BIND_WALLPAPER" >
<intent-filter android:priority="1" >
<action android:name="android.service.wallpaper.WallpaperService" />
</intent-filter>
<meta-data
android:name="android.service.wallpaper"
android:resource="@xml/wallpaper" />
</service>
<activity
android:name=".Settings"
android:exported="true"
android:launchMode="singleTask"
android:theme="@android:style/Theme.Light.NoTitleBar" />
<activity
android:name=".Launcher"
android:icon="@drawable/iconn"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.CREATE_SHORTCUT" />
</intent-filter>
</activity>
</application>