Example usage for android.content Intent ACTION_WALLPAPER_CHANGED

List of usage examples for android.content Intent ACTION_WALLPAPER_CHANGED

Introduction

In this page you can find the example usage for android.content Intent ACTION_WALLPAPER_CHANGED.

Prototype

String ACTION_WALLPAPER_CHANGED

To view the source code for android.content Intent ACTION_WALLPAPER_CHANGED.

Click Source Link

Document

Broadcast Action: The current system wallpaper has changed.

Usage

From source file:com.example.android.home.Home.java

/**
 * Registers various intent receivers. The current implementation registers
 * only a wallpaper intent receiver to let other applications change the
 * wallpaper.//from ww  w.j  a v  a  2s  .  co  m
 */
private void registerIntentReceivers() {
    IntentFilter filter = new IntentFilter(Intent.ACTION_WALLPAPER_CHANGED);
    registerReceiver(mWallpaperReceiver, filter);

    filter = new IntentFilter(Intent.ACTION_PACKAGE_ADDED);
    filter.addAction(Intent.ACTION_PACKAGE_REMOVED);
    filter.addAction(Intent.ACTION_PACKAGE_CHANGED);
    filter.addDataScheme("package");
    registerReceiver(mApplicationsReceiver, filter);
}