(Android) Find path /Android in internal storage -


is there method in android returns data path on internal storage?

i have 2 android smartphone (samsung s2 , s7 edge) installed application. want take sqlitedb situated in path:

/android/data/application.most/files/most_db 

the problem in samsung s2 must use path take db:

private static final string db_path = "/storage/sdcard0/android/data/org.application/files/application_db"; 

instaed, in s7 must use this:

private static final string db_path = "/storage/emulated/0/android/data/application.most/files/application_db"; 

i want take path independently device.

can me?

thanks in advance.

i think you're looking that

string path = getfilesdir().getabsolutepath(); 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -