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

Vineet Garg grg.vineet at gmail.com
Mon Jan 12 06:05:44 UTC 2015



> On Jan. 11, 2015, 9:22 p.m., Albert Vaca Cintora wrote:
> > The issue I'm experiencing might be related to what you commented about setProgress being called after sendSuccesfull.
> 
> Vineet Garg wrote:
>     And I am not able to figure out why sendSuccessful is called in midway during sendPayload, thats why I attached the logcat output where sendSuccessful is in midway between the progress, can you please look at it? cause I didn't changed any other segment of code about sending packages except making functions to accept correct arguements.
> 
> Albert Vaca Cintora wrote:
>     As I said in a comment in the code I think the problem is not that progressChanged is called after sendSuccesful, but since you are starting a new thread in there with runOnUiThread, the threads can execute in any order.

I think you are not getting the point. In sendPayload i called progressChanged as payload is being sent and progress is changed in notification from UI thread.
The payload is sent through another thread, but the thread from which originates later wait for it to finish and then later on sendSuccessful is called. So sendSuccessful should be called in last.

I wrote an error log in progressChanged which displays current sent data and total data, and in sendSuccessful there is another line saying about sendSucceesful.
In all respect, sendSuccesful should be called at last, but it is still called in midway and thats what I am not able to find why?
Also that why I attached logcat output to show you how sendSecussful is called in midway.

So I think UI thread is not related to sendSuccessful and progressChanged and also in all respect sendSuccessful should be called after payload is fully sent.


- Vineet


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


On Jan. 11, 2015, 9:42 a.m., Vineet Garg wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121980/
> -----------------------------------------------------------
> 
> (Updated Jan. 11, 2015, 9:42 a.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
> -----
> 
>   src/org/kde/kdeconnect/Device.java b9a876b 
>   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/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/20150112/295d4b4b/attachment-0001.html>


More information about the KDEConnect mailing list