You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Joe Bowser <bo...@gmail.com> on 2013/01/29 00:50:58 UTC

[Android] xhr2 shim on Android 2.3 - is it worth the effort? I think I need help on this one.

Hey

I'm starting to look at adding the xhr2 shim for Android 2.3, and I've
come to this conclusion:

1. This looks like a LOT of work and I'm way over my head
2. This depends on a lot of the recent work that was put into Android
(ArrayBuffer and Blob)

Also, do we know if the new ArrayBuffer and Blob works with Android
4.x xhr2? Doesn't Android 4.x already have an ArrayBuffer and Blob
object for it's webview?

Anyone want to come in and explain this?  This looks pretty overwhelming.

Joe

Re: [Android] xhr2 shim on Android 2.3 - is it worth the effort? I think I need help on this one.

Posted by Jesse <pu...@gmail.com>.
There are places where the built in FileReader is overwritten, and does not
function, I had some failing tests that I am going to investigate when I
get time.



On Mon, Jan 28, 2013 at 7:07 PM, Andrew Grieve <ag...@chromium.org> wrote:

> Jesse - what's broken about it?
>
>
> On Mon, Jan 28, 2013 at 8:43 PM, Jesse <pu...@gmail.com> wrote:
>
> > Actually the recent checkins break the existing File API that is already
> > there on Windows 8 and Windows Phone 8.
> > Both of these platforms already support ArrayBuffers, Blobs, Typed
> Arrays,
> > et al ...
> >
> >
> > On Mon, Jan 28, 2013 at 5:09 PM, Andrew Grieve <ag...@chromium.org>
> > wrote:
> >
> > > The goal of the recent ArrayBuffer work is to allow the browser's
> native
> > > ArrayBuffers to be passed through the bridge. It doesn't work on
> Android
> > > 2.3, since that version doesn't support ArrayBuffers.
> > >
> > > The recent Blob work applied to Cordova's File plugin and made it so
> that
> > > it has a slice() method (like the native Blob), and a separate change
> was
> > > made so that if you pass a native Blob to FileReader, it will pass
> > through
> > > to the native FileReader.
> > >
> > > So... Cordova File objects do *not* currently work with xhr2.
> > >
> > > I agree that's it's a pretty overwhelming task, and that it's likely
> not
> > > worth the effort unless users really start asking for it.
> > >
> > >
> > >
> > >
> > >
> > > On Mon, Jan 28, 2013 at 6:50 PM, Joe Bowser <bo...@gmail.com> wrote:
> > >
> > > > Hey
> > > >
> > > > I'm starting to look at adding the xhr2 shim for Android 2.3, and
> I've
> > > > come to this conclusion:
> > > >
> > > > 1. This looks like a LOT of work and I'm way over my head
> > > > 2. This depends on a lot of the recent work that was put into Android
> > > > (ArrayBuffer and Blob)
> > > >
> > > > Also, do we know if the new ArrayBuffer and Blob works with Android
> > > > 4.x xhr2? Doesn't Android 4.x already have an ArrayBuffer and Blob
> > > > object for it's webview?
> > > >
> > > > Anyone want to come in and explain this?  This looks pretty
> > overwhelming.
> > > >
> > > > Joe
> > > >
> > >
> >
> >
> >
> > --
> > @purplecabbage
> > risingj.com
> >
>



-- 
@purplecabbage
risingj.com

Re: [Android] xhr2 shim on Android 2.3 - is it worth the effort? I think I need help on this one.

Posted by Andrew Grieve <ag...@chromium.org>.
Jesse - what's broken about it?


On Mon, Jan 28, 2013 at 8:43 PM, Jesse <pu...@gmail.com> wrote:

> Actually the recent checkins break the existing File API that is already
> there on Windows 8 and Windows Phone 8.
> Both of these platforms already support ArrayBuffers, Blobs, Typed Arrays,
> et al ...
>
>
> On Mon, Jan 28, 2013 at 5:09 PM, Andrew Grieve <ag...@chromium.org>
> wrote:
>
> > The goal of the recent ArrayBuffer work is to allow the browser's native
> > ArrayBuffers to be passed through the bridge. It doesn't work on Android
> > 2.3, since that version doesn't support ArrayBuffers.
> >
> > The recent Blob work applied to Cordova's File plugin and made it so that
> > it has a slice() method (like the native Blob), and a separate change was
> > made so that if you pass a native Blob to FileReader, it will pass
> through
> > to the native FileReader.
> >
> > So... Cordova File objects do *not* currently work with xhr2.
> >
> > I agree that's it's a pretty overwhelming task, and that it's likely not
> > worth the effort unless users really start asking for it.
> >
> >
> >
> >
> >
> > On Mon, Jan 28, 2013 at 6:50 PM, Joe Bowser <bo...@gmail.com> wrote:
> >
> > > Hey
> > >
> > > I'm starting to look at adding the xhr2 shim for Android 2.3, and I've
> > > come to this conclusion:
> > >
> > > 1. This looks like a LOT of work and I'm way over my head
> > > 2. This depends on a lot of the recent work that was put into Android
> > > (ArrayBuffer and Blob)
> > >
> > > Also, do we know if the new ArrayBuffer and Blob works with Android
> > > 4.x xhr2? Doesn't Android 4.x already have an ArrayBuffer and Blob
> > > object for it's webview?
> > >
> > > Anyone want to come in and explain this?  This looks pretty
> overwhelming.
> > >
> > > Joe
> > >
> >
>
>
>
> --
> @purplecabbage
> risingj.com
>

Re: [Android] xhr2 shim on Android 2.3 - is it worth the effort? I think I need help on this one.

Posted by Jesse <pu...@gmail.com>.
Actually the recent checkins break the existing File API that is already
there on Windows 8 and Windows Phone 8.
Both of these platforms already support ArrayBuffers, Blobs, Typed Arrays,
et al ...


On Mon, Jan 28, 2013 at 5:09 PM, Andrew Grieve <ag...@chromium.org> wrote:

> The goal of the recent ArrayBuffer work is to allow the browser's native
> ArrayBuffers to be passed through the bridge. It doesn't work on Android
> 2.3, since that version doesn't support ArrayBuffers.
>
> The recent Blob work applied to Cordova's File plugin and made it so that
> it has a slice() method (like the native Blob), and a separate change was
> made so that if you pass a native Blob to FileReader, it will pass through
> to the native FileReader.
>
> So... Cordova File objects do *not* currently work with xhr2.
>
> I agree that's it's a pretty overwhelming task, and that it's likely not
> worth the effort unless users really start asking for it.
>
>
>
>
>
> On Mon, Jan 28, 2013 at 6:50 PM, Joe Bowser <bo...@gmail.com> wrote:
>
> > Hey
> >
> > I'm starting to look at adding the xhr2 shim for Android 2.3, and I've
> > come to this conclusion:
> >
> > 1. This looks like a LOT of work and I'm way over my head
> > 2. This depends on a lot of the recent work that was put into Android
> > (ArrayBuffer and Blob)
> >
> > Also, do we know if the new ArrayBuffer and Blob works with Android
> > 4.x xhr2? Doesn't Android 4.x already have an ArrayBuffer and Blob
> > object for it's webview?
> >
> > Anyone want to come in and explain this?  This looks pretty overwhelming.
> >
> > Joe
> >
>



-- 
@purplecabbage
risingj.com

Re: [Android] xhr2 shim on Android 2.3 - is it worth the effort? I think I need help on this one.

Posted by Andrew Grieve <ag...@chromium.org>.
The goal of the recent ArrayBuffer work is to allow the browser's native
ArrayBuffers to be passed through the bridge. It doesn't work on Android
2.3, since that version doesn't support ArrayBuffers.

The recent Blob work applied to Cordova's File plugin and made it so that
it has a slice() method (like the native Blob), and a separate change was
made so that if you pass a native Blob to FileReader, it will pass through
to the native FileReader.

So... Cordova File objects do *not* currently work with xhr2.

I agree that's it's a pretty overwhelming task, and that it's likely not
worth the effort unless users really start asking for it.





On Mon, Jan 28, 2013 at 6:50 PM, Joe Bowser <bo...@gmail.com> wrote:

> Hey
>
> I'm starting to look at adding the xhr2 shim for Android 2.3, and I've
> come to this conclusion:
>
> 1. This looks like a LOT of work and I'm way over my head
> 2. This depends on a lot of the recent work that was put into Android
> (ArrayBuffer and Blob)
>
> Also, do we know if the new ArrayBuffer and Blob works with Android
> 4.x xhr2? Doesn't Android 4.x already have an ArrayBuffer and Blob
> object for it's webview?
>
> Anyone want to come in and explain this?  This looks pretty overwhelming.
>
> Joe
>