Page 1 of 1

Move file to a Sandbox for kitkat users

Posted: 27 May 2015 09:11
by wfrcrd
Hi, sorry for my bad english.
Never tried your app, I'm just asking you if this feature is possible:

I'd like to set some directories, and every time a file is added to those directories, that file should be moved in another
directory.
I already know an app that have this feature, but that app is not allowed to write on the extsdcard due to shitty kitkat limitation.

But I think that it's possibile to bypass those limitation.
It's necessary to create a Sandbox on the extsdcard (where your app is allowed to read/write) and the right triggers to check the presence of the new files, and the action ..copy and move.

thank you in advice !

Re: Move file to a Sandbox for kitkat users

Posted: 29 May 2015 07:26
by Martin
Hi,

You can use the somewhat unofficial script functions logExternalFilesDirs() to write the path of the sandbox directory to the log file of Automagic or use list = getExternalFilesDirs() to get the available directories into a list variable.
On a device with an extsdcard the path will look about like this: /storage/extSdCard/Android/data/ch.gridvision.ppam.androidautomagic/files/ (Samsung). It should be possible to copy files into this directory using the regular actions.
You can probably also use a similar directory within the other tool, you just have to use the package name of the other tool instead of ch.gridvision.ppam.androidautomagic.

Please be aware that Android probably deletes this directory when Automagic is uninstalled so it's risky to use this directory for backup purposes of important files.
If you are rooted, you can also use a tool like SDFix to change the permissions and allow all apps to write to the extsdcard again.

Regards,
Martin