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

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -