I'm trying to create file at /sdcard/foobar.tmp from one package that needs to be readable by another package. This works fine on the emulator. However, on the G1, if I create the file in package A, then try to read it in package B, the request fails - even tho both packages are signed by the same certificate. I create the file from Package A with:
File myFile = new File("/sdcard/foobar.tmp"); myFile.createNewFile(); FileOutputStream fOut = new FileOutputStream(myFile); String sMofi = "some text"; fOut.write(sMofi.getBytes()); fOut.flush(); fOut.close(); To see if the file exists from Package B, I use: File myFile = new File("/sdcard/foobar.tmp"); if (myFile.isFile()) { bTempFile = true; } myFile.isFile() - returns false - I can see the file using ddms with permissions: ----rw-rw- Why does isFile fail? I cannot use Context.openFileOutput() because that creates a file relative to package A - and B doesn't know where package A is... Is there a way to create a file at /sdcard/foobar.tmp and have any package be able to read or write it? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---