You need to use the Java Context API to get the path to the part of your app
data you care about, and can hand that to native code which can use it as
the path in which it creates files.

On Wed, Nov 24, 2010 at 11:34 PM, Chih-Wei <cwhu...@linux.org.tw> wrote:

> Hi,
> I want to create a temporary file in my jni code.
> I hope to use the standard C function
>
> FILE *tmpfile(void);
>
> However, it failed. I believe it is because the
> Android filesystem doesn't have the directory /tmp.
>
> Is there any reliable way to create a temporary file
> in Android? What's the suggested directory to hold
> a temporary file?
>
> --
> unsubscribe: 
> android-porting+unsubscr...@googlegroups.com<android-porting%2bunsubscr...@googlegroups.com>
> website: http://groups.google.com/group/android-porting
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to