setting the home wallpaper

Discussion in 'Android Hacks and Help' started by Benkr0n, Feb 5, 2010.

  1. Benkr0n
    Offline

    Benkr0n New Member

    Joined:
    Jan 2, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    on the android dev resource site, the code it says to set the wallpaper is..

    Code:
    public void setStream(InputStream data)
    my current setup...
    Code:
    InputStream  is = getContentResolver().openInputStream(imageUri);
    setStream(InputStream data);
    it gives me an error on the second line at data...
    ive tried changing data to is and imageUri ...still gives error at that point

    what am i doing wrong?
  2. Benkr0n
    Offline

    Benkr0n New Member

    Joined:
    Jan 2, 2010
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    bump...

    this is what i have now
    Code:
    public void onClick(View view) {
                if (imageUriString == null) {
                        showMsg("Please Select An Image");
                }
                else {                    
                        InputStream is = getContentResolver().openInputStream(imageUriPortrait);
                        bgImage = BitmapFactory.decodeStream(is);
                        Context context = this.[COLOR=Red][B]getBaseContext[/B][/COLOR]();
                        context.setWallpaper(bgImage);
                }
    }
    how am i using this wrong...
Search tags for this page

wallpaper setstream