this returns that image's URI
with that URI i ImageView it as my application background
then i want to use another button to set that picture as the wallpaper
this is my code for that button...
Using java Syntax Highlighting
- public void onClick(View view)
- {
- if (imageUriString == null) {
- showMsg("Please Select An Image");
- }
- else {
- InputStream is = getContentResolver().openInputStream(imageUri);
- bgImage = BitmapFactory.decodeStream(is);
- Context context = this.getBaseContext();
- context.setWallpaper(bgImage);
- showMsg("Image Set As Wallpaper");
- }
- }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
the code errors at getBaseContext();
so what am i doing wrong?
should i use setStream instead? or what, help please...



