android - Get Internal Storage custom directory location -
i' trying location of internal storage dynamically having issues it. following code working with:
context context = this; file dir = context.getdir("appdata", context.mode_private); file file = new file(dir, "name.txt"); system.out.println( file.tostring() );
the return path print /data/data/com.example.application.form/app/name.txt
want internal storage/appdata/name.txt
what doing wrong?
use
file dir = new file(environment.getexternalstoragedirectory().getabsolutepath());
instead
file dir = context.getdir("appdata", context.mode_private);
Comments
Post a Comment