First, don't hardwire in that path, because it might be wrong. Pass
the path from getFilesDir() to your JNI library.

Beyond that, you might consider asking your question on the NDK Google Group.

On Thu, Apr 21, 2011 at 9:59 AM, Jernej K. <[email protected]> wrote:
> I have a issue regarding files in android applications. I read a file
> in java/android code, but I write to file in native code and I do not
> know how to proceed - SD is not an option!
>
> I am trying to use internal storage - so my file is just visible for
> my application, but I can not open or write to this file in native
> code.
>
> Maybe I have a wrong path, but when I check in adb shell, I can see
> the exact file..
>
> if (log != NULL)
> {
> log = fopen("/data/data/isl.online.connection/files/
> connection.log","w");
> }
>
> --> log stays NULL and I do not know why..
>
> I also saw, I could use external storage (but my file is visible for
> every application), but I do not know how to get to the file in native
> code..
>
> Does anyone have a good Idea?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android 3.0 Programming Books: http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to