Please include the actual error.  (And not the message you are printing when
consuming it, the actually full exception that gets printed when the app
doesn't handle it.)

Anyway, this works, lots of apps use it, I think there is even an API demo
for it.

On Tue, Apr 19, 2011 at 12:13 AM, kumar Gaurav <[email protected]> wrote:

> it is still throwing error, but error message is null,
> let me show you ma code
>
> LinearLayout l=(LinearLayout) findViewById(R.id.lview);
>                ImageView im=(ImageView) v;
>                l.setBackgroundDrawable(im.getDrawable());
>                Bitmap bmp= im.getDrawingCache();
>                WallpaperManager wm=
> WallpaperManager.getInstance(getBaseContext());
>                try
>                {
>                        wm.setBitmap(bmp);
>                }
>                catch (Exception e) {
>                        EditText ed= (EditText)findViewById(R.id.editText1);
>                        ed.setText("Error:"+e.getMessage());
>                                }
>
> Please let me know if there's error in this
>
> On Apr 19, 8:48 am, a a <[email protected]> wrote:
> > 2011/4/19 kumar Gaurav <[email protected]>:
> >
> >
> >
> > > i'm using following code in manifest for gettingpermissionfor
> > >changingwallpaper
> > > <?xml version="1.0" encoding="utf-8"?>
> > > <manifest xmlns:android="http://schemas.android.com/apk/res/android";
> > >      package="com.and.third"
> > >      android:versionCode="1"
> > >      android:versionName="1.0">
> > >    <uses-sdk android:minSdkVersion="8" />
> > >    <uses-permissionandroid:name="android.permission.SET_WALLPAPER"></
> > > uses-permission>
> > >    <permissionandroid:protectionLevel="normal"
> > > android:name="android.permission.SET_WALLPAPER" ></permission>
> >
> > >    <application android:icon="@drawable/icon" android:label="@string/
> > > app_name" android:permission="android.permission.SET_WALLPAPER">
> >
> > add belowpermissionto try again.
> >
> > android:permission="android.permission.BIND_WALLPAPER"
> >
> > >        <activity android:name=".com.and.third"
> > >                  android:label="@string/app_name"
> > >                  >
> > >            <intent-filter>
> > >                <action android:name="android.intent.action.MAIN" />
> > >                <category
> > > android:name="android.intent.category.LAUNCHER" />
> > >            </intent-filter>
> > >        </activity>
> >
> > >    </application>
> > > </manifest>
> > > but still it throws an exception. please help me with what else m
> > > required to do.
> > > thank you
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> [email protected]
> > > To unsubscribe from this group, send email to
> > > [email protected]
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to