On Tuesday, July 26, 2011 4:39:36 AM UTC-4, Jessica wrote:
>
> *Other way round for this problem is --> Is there any folder in the 
> android file system where i could create a database(sqlite) and do the file 
> operation(read write ) in this case I dont have to enable the chmod 
> permission .*


Yes, android provides an internal storage directory for applications and 
also a related place for them to create sqlite databases.

At the java level, finding the appropriate path is handled automatically by 
some of the typical functions, but you can determine it with 
Context.getDir() and Context.getFileDir() - if you want to do something in 
the NDK, probably call one of those from java and pass the result to your 
ndk routines as a java string, where you would convert it to a native string 
for the posix file functions.

Using root access is to be avoided as it's not available on unmodified 
devices, and should cause some due suspicion ("why does this app need 
that?") on the part of the user even where it is.  It's also entirely 
outside the scope of the ndk list.

-- 
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/android-discuss/-/IdiVQai6JIcJ.
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-discuss?hl=en.

Reply via email to