- Home /
Can an Android AAR plugin access Unity's Application.Persistentdatapath filepath?
Hello,
I'm attempting to read a png file using an AAR plugin I created. The png file is stored via C# at the Application.Persistentdatapath filepath. I'm not getting any specific errors, because the failure to read the PNG seems to be happening on the AAR side. The AAR is a Java+NDK plugin that uses the STBI_Image library to load in the PNG from the given filepath.
This whole process works when I manually store the PNG in the "/sdcard/Android/data/com.example.examplePlugin/files". But it does not read the PNG if it is stored in "file:///storage/emulated/0/Android/data/com.example/files/" (which is the filepath provided by Application.persistentdatapath).
Your answer
![](https://koobas.hobune.stream/wayback/20220612173724im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to get an Android reference to an Audio Clip? 0 Answers
Regarding Unity's Main Android Activity 1 Answer
Googleplay games integration error 0 Answers
Plugin Android service do not call onStartCommand when app is closed 0 Answers
How to write a java lib for unity as a plugin to make run another android app? 1 Answer