addTrackerData from getFilesDir() [Android]
Hello!
is there a way to load tracker data from folder returned by context.getFilesDir() (
default internal app directory)
on Android?
if you want to load Tracker Data at SDCARD, use code below.
File sdcard = Environment.getExternalStorageDirectory(); String Path = sdcard.getAbsolutePath() + "/Blocks.2dmap"; TrackerManager.getInstance().addTrackerData(Path, false);
thanks for the answer, but this is not exactly what I'm interested in. My goal is to use the internal storage available only to my application. something like:
now this approach does not work
1. are you copy 'Blocks.2dmap" File at Internal Storage? (ex /data/user/0/com.maxst.ar.sample/files/Blocks.2dmap)
We tested to load file at internal storage. like below code.
File external = new File(Environment.getExternalStorageDirectory(), "/Blocks.2dmap"); File internal = new File(this.getFilesDir(), "/Blocks.2dmap"); try { copy(external, internal); } catch (IOException e) { e.printStackTrace(); } TrackerManager.getInstance().addTrackerData(internal.getAbsolutePath(), false);
Please check it again.