Open a file by path from assets folder in Android

Hi all!
I am to read a file of a proprietary file format using a plugin written in c++. To do this I need to pass the path to a file, i have succesfully done this in windows but now i need to migrate and build an app for Android.
So my question is, does unity offer any support for extrating a file from the assetsfolder and then access that file by path in Android

Cheers

Place your assets in Streaming Assets folder and access from Android.

From Android:

InputStream _inputStream = context.getAssets().open(CommonDefines.PROJECT_ASSETS_FOLDER + largeIconName);

//Here PROJECT_ASSETS_FOLDER is subpath under StreamingAssets folder. getAssets will point to in on Android.

From Unity:

string _filePath = "jar:file://" + Application.dataPath + "!/assets/" + filename;
//Read the note on Streaming assets page as the files will be compressed by default when you place in that folder.

Hope this should get you started!

I solved the problem after I added my files in this directory inside the projec Assets/StreamingAssets/

then I read it inside the code

 #if UNITY_ANDROID
       string  path = "jar:file://" + Application.dataPath + "!/assets/alphabet.txt";
         WWW wwwfile = new WWW(path);
         while (!wwwfile.isDone) { }
         var filepath = string.Format("{0}/{1}", Application.persistentDataPath, "alphabet.t");
         File.WriteAllBytes(filepath, wwwfile.bytes);
 
         StreamReader wr = new StreamReader(filepath);
             string line;
             while ((line = wr.ReadLine()) != null)
             {
             //your code
             }
 #endif