Loading...

Wallpaper.java:

package com.mask;

import java.io.IOException;
import java.io.InputStream;

import android.app.Activity;
import android.content.res.Resources;
import android.os.Bundle;
import android.util.Log;

public class Wallpaper extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Resources r = getBaseContext().getResources();
        InputStream i = r.openRawResource(R.drawable.mask);
        try { super.setWallpaper(i); }
        catch (IOException e) { Log.i(" --- wallpaper", "exception +++"); }
        finish();
    }
}

AndroidManifest.xml:

<uses-permission android:name="android.permission.SET_WALLPAPER" />
Loading...