Hi Chris ,
Thanks for the reply it worked pretty well.
The /data folder in the android file system has the default application
folder where the application specific read write happens
they generally looks like this :
"*/data/data/my.package.name/<app_my custom folder>/*
**    directory=getDir("fodlername", Context.MODE_WORLD_WRITEABLE |
Context.MODE_WORLD_READABLE);

and this directory has been used to do the file ops.

*Also if I want to the same in the SD card is there any way to gain the
permission and then do it on that.ideally once the permission is gained we
can do the normal file operation just like i did above for the android file
system*

Thanks ,
Rgds,
saurabh


"..pain is temporary.....quitting lasts forever......"



On Tue, Jul 26, 2011 at 10:46 PM, Chris Stratton <[email protected]> wrote:

> 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-ndk" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-ndk/-/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-ndk?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Android Discuss" 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-discuss?hl=en.

Reply via email to