我正在尝试将带有应用程序图标的活动添加到LiveWallpaper服务,以便通过在下面的清单中添加行来在主屏幕中显示该活动:
<activity android:label="Settings..."
android:name=".WallpaperPrefsActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
但是,它无法将图标添加到主屏幕。 这是完整的清单:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.authorwjf.live_wallpaper_p2" android:versionCode="1"
android:versionName="1.0">
<application android:label="TR Demo Live Wallpaper"
android:icon="@drawable/icon">
<service android:label="TR Demo Live Wallpaper"
android:name=".DemoWallpaperService"
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/wallpaper" />
</service>
<activity android:label="Settings..."
android:name=".WallpaperPrefsActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="7" />
<uses-feature android:name="android.software.live_wallpaper" />
</manifest>