I figured it out. I was getting a Thread blocking issue that was actually unrelated to the getFileStremPath call...
Fixed that, and it works great. Thanks for your help though. Richard On Apr 5, 3:54 pm, Dianne Hackborn <hack...@android.com> wrote: > That should work fine. That function does very little -- just builds a File > with the proper path. > > You might want to attach the debugger and see the stack crawl when you are > stuck. > > On Sun, Apr 5, 2009 at 2:37 PM, Richard Schilling < > > > > > > richard.rootwirel...@gmail.com> wrote: > > > I'm getting some weird behavior when I try to open a file within a > > service: > > > <code> > > > public class MyService extends Service{ > > > public void onCreate(){ > > super.onCreate(); > > > File myFile = getFileStreamPath("myfile.dat"); > > > if (myFile.exists()){ > > Log.i("MyService", "myfile.dat exists"); > > } > > > } > > > </code> > > > Whenever getFileStreamPath is called, the service just freezes and > > does nothing. It's like the call to getFileStremPath is being blocked > > by something. > > > Can someone give an example of how to properly obtain a File object > > reference in a service using getFileStreamPath()? > > > Thanks. > > > Richard > > -- > 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.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---