Crash when mounting obb file

126 views
Skip to first unread message

beinan li

unread,
Aug 8, 2013, 5:37:12 PM8/8/13
to andro...@googlegroups.com
I'm using an obb file to hold data:

AStorageManager* man = AStorageManager_new();

char* data = malloc(256);

AStorageManager_mountObb(man, "main.1.com.example.native_activity.obb", "somekey", my_obbCallbackFunc, data);

char* obbPath = AStorageManager_getMountedObbPath(man, "main.1.com.example.native_activity.obb");

LOGI("mounted path: %s", obbPath);

free(data); 

data = NULL;

AStorageManager_delete(man);

man = NULL;


With this code, I got empty obbPath string.

My obb file is named as main.1.com.example.native_activity.obb under /sdcard/data/Android/obb/com.example.native_activity folder as suggested in NDK APK Expansion Files  documentation. I also tried to replace the filename with fullpaht.

The documentation of the native API is next to nothing, so it's really hard to find out the fix myself.

What am I missing here?


Reply all
Reply to author
Forward
0 new messages