Hi all,
I am writing a tutorial about the HTML5 Canvas for mobile and did some
basic tests. While I can call the getDataURL() Method on an iPhone's
HTML5 Canvas Element, it does not seem to return the data URL on
Android 2.1 (Google Nexus One) and it's webkit-based default browser.
Here is the sample:
var dataURL = canvas.toDataURL();
var img = document.createElement('img');
img.setAttribute('src', dataURL);
document.getElementById('box').appendChild(img);
This will work on iPhone, it will add a new image element with the
same content as the canvas. It does nothing or fails on Android 2.1.
Has anyone ever gotten this to work?
I am also wondering if anyone could help me with understanding the
WebKit Build numbers and what it means with regards to what features I
can expect. For the iphone, I see a build number of 528.18, on Android
2.1's Browser I see (from the user agent strign) a WebKit build
530.17.
So it looks Android 2.1's webkit browser is more up to date, still
some features work on iPhone's webkit but not on Android. Does this
comparison just make no sense?
Thanx all!
--
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