1

Due to 1MB limit on assets and raw, i cannot keep a binary files.

On the Java side we have something like App-specific storage as mentioned here, there is not file size limit too.

Is this storage available on NDK side too? How can access a file in the C/C++(NDK) space?

Milind Deore
  • 2,887
  • 5
  • 25
  • 40
  • 1
    Retrieve the path in Java/Kotlin, pass it to your native code, then use whatever file I/O API you normally use in your C or C++ code. – Michael Jul 27 '21 at 08:09
  • @Michael is it something like `String path = getFilesDir().getAbsolutePath();` and the output i get is following `/data/user/0/com.demo.app/files` – Milind Deore Jul 27 '21 at 08:12
  • 1
    Yeah, `getFilesDir().getAbsolutePath()` ought to work. – Michael Jul 27 '21 at 08:25
  • Thanks a ton @Michael. Can you please put this as an answer? I too verified it and it works. – Milind Deore Jul 27 '21 at 09:39

0 Answers0