Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

access android external SD card from native code

I'm developing a native apk for android with NDK 5.

My question is, how do I access to write and read from external SD card from native code?

like image 892
Manivel Thiruvengadam Avatar asked Oct 24 '22 18:10

Manivel Thiruvengadam


1 Answers

It works the same as Java code.

You need to use the SDK API Environment.getExternalStorageDirectory() in your Java code and then pass that to your native code, accessing it like a normal path.

like image 158
Matthew Willis Avatar answered Oct 27 '22 10:10

Matthew Willis