开发者

Can a live wallpaper also be an application? (With a separate Activity for the Application)

开发者 https://www.devze.com 2023-02-18 17:35 出处:网络
I have a Live Wallpaper which I would like to also make available as an Activity which can be accessed as a normal Phone App.

I have a Live Wallpaper which I would like to also make available as an Activity which can be accessed as a normal Phone App.

Can this be achieved?

开发者_C百科Thanks in advance, Mark


Just append an acitivity with

    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />

in the manifest. You can have as many as you want.


You certainly can you just need to setup the activities you want to expose through proper intent filters in your Android manifest under the application node..

<activity ...> <!-- this being the activity you want to expose -->
    <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER"/>
    </intent-filter>
</activity>
0

精彩评论

暂无评论...
验证码 换一张
取 消