Review Request 121980: Added progress bar in notification while sending file.

Albert Vaca Cintora albertvaka at gmail.com
Fri Jan 16 06:35:37 UTC 2015



> On gen. 16, 2015, 7:13 a.m., Albert Vaca Cintora wrote:
> > What app do you use to send files to test it? I have tried both the Gallery and a file browser from Android 4.4 and Android 5.0 and apparently they all think that the file size is indetermined, so no progress is shown.
> 
> Albert Vaca Cintora wrote:
>     Okay I found a bug, there is a line that reads like:
>     
>                         np.set("size", (int)new File(path).length());
>     
>     And should be like:
>     
>                         size = (int)new File(path).length();
>     
>     This code was already there before your patch, so aparently was an existing bug that we just discovered :P
> 
> Vineet Garg wrote:
>     That's what I am thinking, that I used the size from existing code. But it is showing progress bar with increasing progress on my device only indeterminate is shown in same cases of content uri.

It depends on the app, some send the data as a stream and others give you a filename for you to open it. The bug was only in one of the code paths.

After fixing it, works perfectly :D And for the same price we fixed a bug :) I will merge it now.

I've noticed that if you send lots of files, you end having lots of notifications afterwards. Would be nice to join all the success notifications together in a single one, like Google Play does when you install/upload more than one app.


- Albert


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121980/#review74117
-----------------------------------------------------------


On gen. 15, 2015, 7:04 p.m., Vineet Garg wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121980/
> -----------------------------------------------------------
> 
> (Updated gen. 15, 2015, 7:04 p.m.)
> 
> 
> Review request for kdeconnect and Albert Vaca Cintora.
> 
> 
> Repository: kdeconnect-android
> 
> 
> Description
> -------
> 
> Added progress bar in notification while sending file.
> 
> Current changes:
> * Renamed SendPackageFinishedCallback -> SendPackageStatusCallback and added progressChanged to it.
> * Made necessary changes so that the callback instance can reach to sendPayload for getting progress.
> * Made changes in ShareToReceiver to show progress.
> 
> 
> Diffs
> -----
> 
>   res/values/strings.xml 23d10dc 
>   src/org/kde/kdeconnect/Backends/BaseLink.java 242ff67 
>   src/org/kde/kdeconnect/Backends/LanBackend/LanLink.java ca81c13 
>   src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java 19038bb 
>   src/org/kde/kdeconnect/Backends/LoopbackBackend/LoopbackLink.java 0461cf1 
>   src/org/kde/kdeconnect/Device.java b9a876b 
>   src/org/kde/kdeconnect/Plugins/SharePlugin/SharePlugin.java 1e7e509 
>   src/org/kde/kdeconnect/Plugins/SharePlugin/ShareToReceiver.java 170b7eb 
> 
> Diff: https://git.reviewboard.kde.org/r/121980/diff/
> 
> 
> Testing
> -------
> 
> Testing done for both file and content.
> 
> Current issues:
> * sendSuccessful is called much before during file is being sent.
> * Exception in onNotificationPosted due to early call of sendSuccessful.
> 
> Here is logcat output : http://pastebin.com/MvznkrAd
> 
> 
> Thanks,
> 
> Vineet Garg
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20150116/9c3b22bc/attachment.html>


More information about the KDEConnect mailing list