I want to be able to create links or direct access of files from my folder / data with the directories of the / sdcard. In android I do not know how to create I have had several attempts use the following:
TO)
try {
Process symlink = Runtime.getRuntime().exec("ln -s /data/data/com.Misdatos /sdcard/Misdatos");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
But do not create anything or a direct access file like in linux nothing (I do not know if in android you have to see the symbolic links)
Other:
try {
Os.symlink("/data/data/com.Misdatos", "/sdcard/Misdatos");
} catch (ErrnoException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
But the problem with this one is that it's for Android 5.0 and I need Android 4.0 or higher android 4.1 and up.
And my last attempt was to use the Files class but it is not included in the Android sdk.
If you know any way or observe that I have made an error in my codes or material, please let me know. Thanks