Question

I want to produce .patt files of augmented reality marker dynamically and at run-time. In the AndAR Library .patt files must be in the asset folder. But since I generate these files in my Android program at run-time, I cannot save them in asset folder. (Because the folder becomes read-only at run-time.) How must I change the AndAR to read .patt files from sdcard? My problem is that AndAR library searches the asset folder to find .patt files by default, but I want AndAR search another location.

Was it helpful?

Solution

You should add WRITE_EXTERNAL_STORAGE permission to your Android_Manifest.xml then you can write and read from sdcard but be careful, you should test if you can write to external before writing anything to make sure you are actually writing to SDcard. Other than eveyrthing is same as just regular Java io coding

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top