Hi Ajeet,
A quick question, is it possible to accomplish this task in the background with
without harming the present view (that is being displayed) ?
and also sometimes I get illigalArgument Exception for the following statement.
public void onPageFinished(WebView view, String url)
{
Picture picture = view.capturePicture();
Bitmap b = Bitmap.createBitmap(
picture.getWidth(),picture.getHeight(), Bitmap.Config.ARGB_8888);
..
...
}
Error Log:
E/AndroidRuntime( 1141): Uncaught handler: thread main exiting due to uncaught
exception
E/AndroidRuntime( 1141): java.lang.IllegalArgumentException: width and height
must be > 0
E/AndroidRuntime( 1141): at android.graphics.Bitmap.nativeCreate(Native
Method)
E/AndroidRuntime( 1141): at
android.graphics.Bitmap.createBitmap(Bitmap.java:483)
E/AndroidRuntime( 1141):
com.example.myproj.MyActivity$7.onPageFinished(WindRiver_WebHome.java:388)
E/AndroidRuntime( 1141): at
android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:222)
E/AndroidRuntime( 1141): at
android.os.Handler.dispatchMessage(Handler.java:99)
this happens frequently around 50% of deployment of the apk on emulator.
Thanks
umesh
________________________________
From: AJ <[email protected]>
To: Android Developers <[email protected]>
Sent: Mon, 5 October, 2009 6:45:48 PM
Subject: [android-developers] Re: How to take snapshots (Screen shots) of a web
page
This would work fine if you take snapshot of visible portion of
webpage.
Thanks,
AJ
On Oct 5, 6:11 pm, AJ <[email protected]> wrote:
> Hi Umesh,
>
> check the following link
>
> http://groups.google.com/group/android-discuss/browse_thread/thread/c...
>
> Thanks,
> AJ
>
> On Oct 5, 4:25 pm, Umesh <[email protected]> wrote:
>
> > Hi all,
>
> > I want to implement a functionality, wherein I need to take a snapshot
> > (Screen Shot) of a web page opened in android browser, and store that
> > image on sdcard . The image can be either in jpeg or png format. Can some
> > one guide me with a piece of sample code as how to accomplish this.
>
> > Thanks in advance.
> > Umesh.
>
> > Yahoo! India has a new look. Take a sneak
> > peekhttp://in.yahoo.com/trynew
>
>
Now, send attachments up to 25MB with Yahoo! India Mail. Learn how.
http://in.overview.mail.yahoo.com/photos
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---