You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Alexander Heinrich <ak...@aflx.de> on 2011/12/03 18:01:01 UTC
Add download to FileTransfer
Hi,
first I want to introduce myself a little, because I'm very new here.
My name is Alex and I'm living in Berlin, Germany. I'm a 28 years old
Freelancer and enthusiastic PhoneGap-user! So I hope, I can help you a
little with this great project ;-)
Some time ago I wrote a plugin for downloading binary files with
PhoneGap for iOS and Android. Simon now asked me to add it to the
FileTransfer class. That's what I have done. I think it would be great
if this feature would be available on all plattforms. What do you think?
Do you have any suggestions what could be done better/different?
You can find it here (the branch is called "download"):
https://github.com/aflx/callback-ios
https://github.com/aflx/callback-android
Bye,
Alex
--
Alexander Heinrich
Am Steinberg 8
13086 Berlin
Telefon: 0179 / 144 70 30
E-Mail: ak@aflx.de
http://www.aflx.de
Die neue Art Kontaktdaten zu tauschen:
http://www.qodify.com/alex
Mein Xing-Profil:
http://www.xing.com/profile/Alexander_Heinrich37
Re: Add download to FileTransfer
Posted by Simon MacDonald <si...@gmail.com>.
It's a pretty simple test. Here's what I used:
function download() {
console.log("In download");
var fu = new FileTransfer();
fu.download("https://a248.e.akamai.net/assets.github.com/images/modules/header/logov6-hover.svg?1315858549",
"/sdcard/github.svg", downWin, fail);
}
function downWin(entry) {
console.log("FilePath = " + entry.fullPath);
}
Simon Mac Donald
http://hi.im/simonmacdonald
On Mon, Dec 5, 2011 at 6:06 PM, Drew Walters <de...@gmail.com> wrote:
> I've started looking at this for BlackBerry. Are there any existing
> tests for this?
>
> On Mon, Dec 5, 2011 at 1:31 PM, Simon MacDonald
> <si...@gmail.com> wrote:
>> Basically it adds a download method to the FileTransfer object. It is
>> now available on Android/iOS but needs to get to BB/WP7/Docs before we
>> make it public. The method signature is:
>>
>> var ft = new FileTransfer();
>> ft.download(source, target, successCallback, errorCallback);
>>
>> Simon Mac Donald
>> http://hi.im/simonmacdonald
>>
>>
>>
>> On Mon, Dec 5, 2011 at 2:26 PM, Filip Maj <fi...@adobe.com> wrote:
>>> What API changes would this introduce? Something like additional property
>>> on the FileTransferOptions object?
>>>
>>> I agree that this should be incorporated as well.
>>>
>>> If everyone is in agreement on this and we can figure out the specific
>>> changes to the API, then after that we can create issues for the various
>>> platforms *as well as* for callback-js and the docs!
>>>
>>> On 11-12-05 8:11 AM, "Simon MacDonald" <si...@gmail.com> wrote:
>>>
>>>>Hey Alex,
>>>>
>>>>We are glad to have another developer on board and thanks for contributing
>>>>your code to the FileTransfer class. I know that adding the support to
>>>>download binary files had been on my to do list for awhile. Now that we've
>>>>merged your code into Android and iOS we can take a look at doing
>>>>BlackBerry and WP7. It might not make it in time for the 1.3 release on
>>>>Dec
>>>>16th but this is something we want in PhoneGap for sure.
>>>>
>>>>Drew do you think you can take a look at the Android implementation with
>>>>an
>>>>eye on adding it to BlackBerry? It should be very similar as they are both
>>>>Java based.
>>>>
>>>>Jesse, do you think you'll have time to do a similar implementation for
>>>>WP7?
>>>>
>>>>Simon Mac Donald
>>>>http://hi.im/simonmacdonald
>>>>
>>>>
>>>>On Sat, Dec 3, 2011 at 12:01 PM, Alexander Heinrich <ak...@aflx.de> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> first I want to introduce myself a little, because I'm very new here.
>>>>> My name is Alex and I'm living in Berlin, Germany. I'm a 28 years old
>>>>> Freelancer and enthusiastic PhoneGap-user! So I hope, I can help you a
>>>>> little with this great project ;-)
>>>>>
>>>>> Some time ago I wrote a plugin for downloading binary files with
>>>>>PhoneGap
>>>>> for iOS and Android. Simon now asked me to add it to the FileTransfer
>>>>> class. That's what I have done. I think it would be great if this
>>>>>feature
>>>>> would be available on all plattforms. What do you think? Do you have any
>>>>> suggestions what could be done better/different?
>>>>>
>>>>> You can find it here (the branch is called "download"):
>>>>>
>>>>>
>>>>>https://github.com/aflx/**callback-ios<https://github.com/aflx/callback-i
>>>>>os>
>>>>>
>>>>>https://github.com/aflx/**callback-android<https://github.com/aflx/callba
>>>>>ck-android>
>>>>>
>>>>> Bye,
>>>>> Alex
>>>>>
>>>>> --
>>>>> Alexander Heinrich
>>>>> Am Steinberg 8
>>>>> 13086 Berlin
>>>>>
>>>>> Telefon: 0179 / 144 70 30
>>>>> E-Mail: ak@aflx.de
>>>>> http://www.aflx.de
>>>>>
>>>>> Die neue Art Kontaktdaten zu tauschen:
>>>>> http://www.qodify.com/alex
>>>>>
>>>>> Mein Xing-Profil:
>>>>>
>>>>>http://www.xing.com/profile/**Alexander_Heinrich37<http://www.xing.com/pr
>>>>>ofile/Alexander_Heinrich37>
>>>>>
>>>>>
>>>
Re: Add download to FileTransfer
Posted by Drew Walters <de...@gmail.com>.
I've started looking at this for BlackBerry. Are there any existing
tests for this?
On Mon, Dec 5, 2011 at 1:31 PM, Simon MacDonald
<si...@gmail.com> wrote:
> Basically it adds a download method to the FileTransfer object. It is
> now available on Android/iOS but needs to get to BB/WP7/Docs before we
> make it public. The method signature is:
>
> var ft = new FileTransfer();
> ft.download(source, target, successCallback, errorCallback);
>
> Simon Mac Donald
> http://hi.im/simonmacdonald
>
>
>
> On Mon, Dec 5, 2011 at 2:26 PM, Filip Maj <fi...@adobe.com> wrote:
>> What API changes would this introduce? Something like additional property
>> on the FileTransferOptions object?
>>
>> I agree that this should be incorporated as well.
>>
>> If everyone is in agreement on this and we can figure out the specific
>> changes to the API, then after that we can create issues for the various
>> platforms *as well as* for callback-js and the docs!
>>
>> On 11-12-05 8:11 AM, "Simon MacDonald" <si...@gmail.com> wrote:
>>
>>>Hey Alex,
>>>
>>>We are glad to have another developer on board and thanks for contributing
>>>your code to the FileTransfer class. I know that adding the support to
>>>download binary files had been on my to do list for awhile. Now that we've
>>>merged your code into Android and iOS we can take a look at doing
>>>BlackBerry and WP7. It might not make it in time for the 1.3 release on
>>>Dec
>>>16th but this is something we want in PhoneGap for sure.
>>>
>>>Drew do you think you can take a look at the Android implementation with
>>>an
>>>eye on adding it to BlackBerry? It should be very similar as they are both
>>>Java based.
>>>
>>>Jesse, do you think you'll have time to do a similar implementation for
>>>WP7?
>>>
>>>Simon Mac Donald
>>>http://hi.im/simonmacdonald
>>>
>>>
>>>On Sat, Dec 3, 2011 at 12:01 PM, Alexander Heinrich <ak...@aflx.de> wrote:
>>>
>>>> Hi,
>>>>
>>>> first I want to introduce myself a little, because I'm very new here.
>>>> My name is Alex and I'm living in Berlin, Germany. I'm a 28 years old
>>>> Freelancer and enthusiastic PhoneGap-user! So I hope, I can help you a
>>>> little with this great project ;-)
>>>>
>>>> Some time ago I wrote a plugin for downloading binary files with
>>>>PhoneGap
>>>> for iOS and Android. Simon now asked me to add it to the FileTransfer
>>>> class. That's what I have done. I think it would be great if this
>>>>feature
>>>> would be available on all plattforms. What do you think? Do you have any
>>>> suggestions what could be done better/different?
>>>>
>>>> You can find it here (the branch is called "download"):
>>>>
>>>>
>>>>https://github.com/aflx/**callback-ios<https://github.com/aflx/callback-i
>>>>os>
>>>>
>>>>https://github.com/aflx/**callback-android<https://github.com/aflx/callba
>>>>ck-android>
>>>>
>>>> Bye,
>>>> Alex
>>>>
>>>> --
>>>> Alexander Heinrich
>>>> Am Steinberg 8
>>>> 13086 Berlin
>>>>
>>>> Telefon: 0179 / 144 70 30
>>>> E-Mail: ak@aflx.de
>>>> http://www.aflx.de
>>>>
>>>> Die neue Art Kontaktdaten zu tauschen:
>>>> http://www.qodify.com/alex
>>>>
>>>> Mein Xing-Profil:
>>>>
>>>>http://www.xing.com/profile/**Alexander_Heinrich37<http://www.xing.com/pr
>>>>ofile/Alexander_Heinrich37>
>>>>
>>>>
>>
Re: Add download to FileTransfer
Posted by Simon MacDonald <si...@gmail.com>.
Basically it adds a download method to the FileTransfer object. It is
now available on Android/iOS but needs to get to BB/WP7/Docs before we
make it public. The method signature is:
var ft = new FileTransfer();
ft.download(source, target, successCallback, errorCallback);
Simon Mac Donald
http://hi.im/simonmacdonald
On Mon, Dec 5, 2011 at 2:26 PM, Filip Maj <fi...@adobe.com> wrote:
> What API changes would this introduce? Something like additional property
> on the FileTransferOptions object?
>
> I agree that this should be incorporated as well.
>
> If everyone is in agreement on this and we can figure out the specific
> changes to the API, then after that we can create issues for the various
> platforms *as well as* for callback-js and the docs!
>
> On 11-12-05 8:11 AM, "Simon MacDonald" <si...@gmail.com> wrote:
>
>>Hey Alex,
>>
>>We are glad to have another developer on board and thanks for contributing
>>your code to the FileTransfer class. I know that adding the support to
>>download binary files had been on my to do list for awhile. Now that we've
>>merged your code into Android and iOS we can take a look at doing
>>BlackBerry and WP7. It might not make it in time for the 1.3 release on
>>Dec
>>16th but this is something we want in PhoneGap for sure.
>>
>>Drew do you think you can take a look at the Android implementation with
>>an
>>eye on adding it to BlackBerry? It should be very similar as they are both
>>Java based.
>>
>>Jesse, do you think you'll have time to do a similar implementation for
>>WP7?
>>
>>Simon Mac Donald
>>http://hi.im/simonmacdonald
>>
>>
>>On Sat, Dec 3, 2011 at 12:01 PM, Alexander Heinrich <ak...@aflx.de> wrote:
>>
>>> Hi,
>>>
>>> first I want to introduce myself a little, because I'm very new here.
>>> My name is Alex and I'm living in Berlin, Germany. I'm a 28 years old
>>> Freelancer and enthusiastic PhoneGap-user! So I hope, I can help you a
>>> little with this great project ;-)
>>>
>>> Some time ago I wrote a plugin for downloading binary files with
>>>PhoneGap
>>> for iOS and Android. Simon now asked me to add it to the FileTransfer
>>> class. That's what I have done. I think it would be great if this
>>>feature
>>> would be available on all plattforms. What do you think? Do you have any
>>> suggestions what could be done better/different?
>>>
>>> You can find it here (the branch is called "download"):
>>>
>>>
>>>https://github.com/aflx/**callback-ios<https://github.com/aflx/callback-i
>>>os>
>>>
>>>https://github.com/aflx/**callback-android<https://github.com/aflx/callba
>>>ck-android>
>>>
>>> Bye,
>>> Alex
>>>
>>> --
>>> Alexander Heinrich
>>> Am Steinberg 8
>>> 13086 Berlin
>>>
>>> Telefon: 0179 / 144 70 30
>>> E-Mail: ak@aflx.de
>>> http://www.aflx.de
>>>
>>> Die neue Art Kontaktdaten zu tauschen:
>>> http://www.qodify.com/alex
>>>
>>> Mein Xing-Profil:
>>>
>>>http://www.xing.com/profile/**Alexander_Heinrich37<http://www.xing.com/pr
>>>ofile/Alexander_Heinrich37>
>>>
>>>
>
Re: Add download to FileTransfer
Posted by Filip Maj <fi...@adobe.com>.
What API changes would this introduce? Something like additional property
on the FileTransferOptions object?
I agree that this should be incorporated as well.
If everyone is in agreement on this and we can figure out the specific
changes to the API, then after that we can create issues for the various
platforms *as well as* for callback-js and the docs!
On 11-12-05 8:11 AM, "Simon MacDonald" <si...@gmail.com> wrote:
>Hey Alex,
>
>We are glad to have another developer on board and thanks for contributing
>your code to the FileTransfer class. I know that adding the support to
>download binary files had been on my to do list for awhile. Now that we've
>merged your code into Android and iOS we can take a look at doing
>BlackBerry and WP7. It might not make it in time for the 1.3 release on
>Dec
>16th but this is something we want in PhoneGap for sure.
>
>Drew do you think you can take a look at the Android implementation with
>an
>eye on adding it to BlackBerry? It should be very similar as they are both
>Java based.
>
>Jesse, do you think you'll have time to do a similar implementation for
>WP7?
>
>Simon Mac Donald
>http://hi.im/simonmacdonald
>
>
>On Sat, Dec 3, 2011 at 12:01 PM, Alexander Heinrich <ak...@aflx.de> wrote:
>
>> Hi,
>>
>> first I want to introduce myself a little, because I'm very new here.
>> My name is Alex and I'm living in Berlin, Germany. I'm a 28 years old
>> Freelancer and enthusiastic PhoneGap-user! So I hope, I can help you a
>> little with this great project ;-)
>>
>> Some time ago I wrote a plugin for downloading binary files with
>>PhoneGap
>> for iOS and Android. Simon now asked me to add it to the FileTransfer
>> class. That's what I have done. I think it would be great if this
>>feature
>> would be available on all plattforms. What do you think? Do you have any
>> suggestions what could be done better/different?
>>
>> You can find it here (the branch is called "download"):
>>
>>
>>https://github.com/aflx/**callback-ios<https://github.com/aflx/callback-i
>>os>
>>
>>https://github.com/aflx/**callback-android<https://github.com/aflx/callba
>>ck-android>
>>
>> Bye,
>> Alex
>>
>> --
>> Alexander Heinrich
>> Am Steinberg 8
>> 13086 Berlin
>>
>> Telefon: 0179 / 144 70 30
>> E-Mail: ak@aflx.de
>> http://www.aflx.de
>>
>> Die neue Art Kontaktdaten zu tauschen:
>> http://www.qodify.com/alex
>>
>> Mein Xing-Profil:
>>
>>http://www.xing.com/profile/**Alexander_Heinrich37<http://www.xing.com/pr
>>ofile/Alexander_Heinrich37>
>>
>>
Re: Add download to FileTransfer
Posted by Simon MacDonald <si...@gmail.com>.
Hey Alex,
We are glad to have another developer on board and thanks for contributing
your code to the FileTransfer class. I know that adding the support to
download binary files had been on my to do list for awhile. Now that we've
merged your code into Android and iOS we can take a look at doing
BlackBerry and WP7. It might not make it in time for the 1.3 release on Dec
16th but this is something we want in PhoneGap for sure.
Drew do you think you can take a look at the Android implementation with an
eye on adding it to BlackBerry? It should be very similar as they are both
Java based.
Jesse, do you think you'll have time to do a similar implementation for WP7?
Simon Mac Donald
http://hi.im/simonmacdonald
On Sat, Dec 3, 2011 at 12:01 PM, Alexander Heinrich <ak...@aflx.de> wrote:
> Hi,
>
> first I want to introduce myself a little, because I'm very new here.
> My name is Alex and I'm living in Berlin, Germany. I'm a 28 years old
> Freelancer and enthusiastic PhoneGap-user! So I hope, I can help you a
> little with this great project ;-)
>
> Some time ago I wrote a plugin for downloading binary files with PhoneGap
> for iOS and Android. Simon now asked me to add it to the FileTransfer
> class. That's what I have done. I think it would be great if this feature
> would be available on all plattforms. What do you think? Do you have any
> suggestions what could be done better/different?
>
> You can find it here (the branch is called "download"):
>
> https://github.com/aflx/**callback-ios<https://github.com/aflx/callback-ios>
> https://github.com/aflx/**callback-android<https://github.com/aflx/callback-android>
>
> Bye,
> Alex
>
> --
> Alexander Heinrich
> Am Steinberg 8
> 13086 Berlin
>
> Telefon: 0179 / 144 70 30
> E-Mail: ak@aflx.de
> http://www.aflx.de
>
> Die neue Art Kontaktdaten zu tauschen:
> http://www.qodify.com/alex
>
> Mein Xing-Profil:
> http://www.xing.com/profile/**Alexander_Heinrich37<http://www.xing.com/profile/Alexander_Heinrich37>
>
>