android - How to add/get the internal application data? -
if have file in /data/data//files/data.dat, how data.dat file ? maked this:
file f1 = new file("data/data/carburant.android.com/files/data.dat"); inputstream in = new fileinputstream(f1); i know it's not 100% coorect ? how correct it? , how add file in path?
thank much.
option #1: call openoutputstream("data.dat");
option #2: call new file(getfilesdir(), "data.dat"); use getfilesdir()
option #3: call getfilestreampath("data.dat");
Comments
Post a Comment