Currently, I'm using Dropsync for this task, but it is not reliable because it works in the background while my Tasker skript continues and I have no direct means to check from within Tasker if syncing has finished.
First, I check if I can connect to Dropbox. Then I check and confirm the upload success.
Work Log Completion (317)
A1: Profile Status [ Name:Cell Tower Change Set:Off ]
A2: Profile Status [ Name:APP Log Monitor Set:Off ]
A3: Profile Status [ Name:SCREEN Log Monitor Set:Off ]
A4: Profile Status [ Name:CALL Log Monitor Set:Off ]
A5: Profile Status [ Name:TEXT Log Monitor Set:Off ]
A6: Write File [ File:%Work_log Text:End Work Log at %TIME Append:On Add Newline:On ]
A7: Say [ Text:Work Log Monitor Closed Engine:Voice:default:default Stream:5 Pitch:5 Speed:5 Respect Audio Focus:Off Continue Task Immediately:Off ] If [ %SILENT ~ off ]
A8: HTTP Get [ Server:Port:<username>:<password>@www.dropbox.com Path:/m/home?path=/Documents/Documents/Business%20Documents/Work%20Logs/Work Attributes: Cookies: Timeout:15 Mime Type: Output File: ]
A9: If [ %HTTPR ~ 302 ]
A10: Say [ Text:Connected Engine:Voice:default:default Stream:5 Pitch:%Voice_Pitch Speed:%Voice_Speed Respect Audio Focus:Off Continue Task Immediately:On ] If [ %SILENT ~ off ]
A11: Flash [ Text:%Work_log uploading to DropBox Long:Off ]
A12: Dropsync [ Configuration:Sync Now Package:com.ttxapps.dropsync Name:Dropsync Timeout (Seconds):0 ]
A13: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ]
A14: Variable Set [ Name:%Work_log To:%Calloc-%Date.txt Do Maths:Off Append:Off ]
A15: HTTP Get [ Server:Port:<username>:<password>@www.dropbox.com Path:/m/home?path=/Documents/Documents/Business%20Documents/Work%20Logs/Work/%Work_log Attributes: Cookies: Timeout:15 Mime Type: Output File: ]
A16: If [ %HTTPR ~ 302 ]
A17: Say [ Text:%Calloc log uploaded to dropbox Engine:Voice:default:default Stream:5 Pitch:%Voice_Pitch Speed:%Voice_Speed Respect Audio Focus:Off Continue Task Immediately:Off ] If [ %SILENT ~ off ]
A18: Flash [ Text:%Calloc log uploaded to dropbox Long:Off ]
A19: Variable Clear [ Name:%Calloc Pattern Matching:Off ]
A20: Variable Clear [ Name:%Work_log Pattern Matching:Off ]
A21: Variable Clear [ Name:%Date Pattern Matching:Off ]
A22: Else
A23: Say [ Text:An error occurred Engine:Voice:default:default Stream:5 Pitch:%Voice_Pitch Speed:%Voice_Speed Respect Audio Focus:Off Continue Task Immediately:Off ] If [ %SILENT ~ off ]
A24: Flash [ Text:An error occurred Long:Off ]
A25: End If
A26: End If
Hope that helps give you an idea of what you're looking to do.
That will not impact successful completion of the task, actually...
Also, I don't want to store my dropbox credentials within tasker.
It's a secure site. You'll need to provide some level of credentials in order to access and upload... going with a dedicated api key like token login is far, far, less secure. Especially, since I can almost guarantee the process is specifically used in the manner you've utilized... and sticks out like a big red flag.
Trying to narrow security for one process on one application is super easy. Trying to narrow 500 entries for specific data occurring in one random process using Tasker makes circumventing much more difficult.
But the bash script I mentioned in my first post looks very promising indeed. I got it working after installing curl as described here: http://forum.xda-developers.com/showthread.php?t=2362386
We have two very different thoughts about this. Just, FYI...
The script will automatically set itself up with a dedicated dropbox API key.
... oh joy. A third party solution. Which leads you to believe is more secure, why? Because more people were involved in creating it?
But it failed to verify the dropbox SSL certificate. I have to install it manually or disable certificate validation...
So, completely ignore automation or security... yeah, you found a winner with this one.
Well... since you're actually not looking for a way to put/get files from Dropbox using Tasker, I wish you the best.
Hope it works out for you.
Hmm... looks interesting but it won't work in my case because the file name is always the same: todo.txtThat will not impact successful completion of the task, actually...
Also, I don't want to store my dropbox credentials within tasker.
It's a secure site. You'll need to provide some level of credentials in order to access and upload... going with a dedicated api key like token login is far, far, less secure. Especially, since I can almost guarantee the process is specifically used in the manner you've utilized... and sticks out like a big red flag.
Trying to narrow security for one process on one application is super easy. Trying to narrow 500 entries for specific data occurring in one random process using Tasker makes circumventing much more difficult.
But the bash script I mentioned in my first post looks very promising indeed. I got it working after installing curl as described here: http://forum.xda-developers.com/showthread.php?t=2362386
We have two very different thoughts about this. Just, FYI...
The script will automatically set itself up with a dedicated dropbox API key.
... oh joy. A third party solution. Which leads you to believe is more secure, why? Because more people were involved in creating it?
But it failed to verify the dropbox SSL certificate. I have to install it manually or disable certificate validation...
As for workarounds for OP, I'm glad it is working for your needs.
The issue:
but it won't help me to check if the file has been uploaded properly... My phone is not always-online and I want to disable internet connection as soon as dropbox sync has finished.
... is easily addressed with certain modifications to the task.
Your security concerns are well founded, I simply don't use cloud services for secure info. So, I guess I don't have those.
Glad at least the credentials are being managed in a manner you're comfortable with, and you've had overall success.