1、

AndroidManifest.xml文件中具有:

<intent-filter>
<action android:name="android.intent.action.SET_WALLPAPER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>


Intent i = new Intent(Intent.ACTION_SET_WALLPAPER);
//i.setType("text/plain");
//i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

startActivity(Intent.createChooser(i, "share with ..."));


应用程序根据action查找系统中的应用程序,当然也可以加上其他信息。

2、让我们的应用程序被应用程序选择器找到。

<activity android:name=".Demo1">
<intent-filter>
<action android:name="android.intent.action.SET_WALLPAPER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

更多相关文章

  1. Android中获取应用程序(包)的信息-----PackageManager的使用(一)
  2. Android(安卓)jetpack Room数据库(一)基本使用
  3. 获取Android应用程序的签名
  4. android launch 初探
  5. [CSDN]Android应用程序启动过程源代码分析
  6. 转Android(安卓)安全攻防(二): SEAndroid(安卓)bionic
  7. 基于Android客户端的人人网开放平台开发系列教程
  8. Hierarchy Viewer 帮你分析应用程序UI布局
  9. Android(安卓)Launcher全面剖析

随机推荐

  1. Testing Your Android(安卓)GCM Broadcas
  2. Android(安卓)ramdisk.img system.img us
  3. Cell phone privacy guide (Android)
  4. android UI——跑马灯TextView
  5. android 隐藏自己的多媒体文件
  6. android开发文档之onTouch()
  7. 安卓应用-去掉标题栏
  8. android错误信息大整理
  9. Android(安卓)phone policy
  10. android 拨号面板