Hi Mark, I just realised that openFileOutput works but I am trying to change the permission of already existing file.and It is not directly under files,its under files/folder/filename.ppt..Any Ideas on how I could change this permission under subdirectory?
On Nov 4, 1:30 pm, ramya <[email protected]> wrote: > I am so glad that I have reply from you.I tried the openFileOutPut > option.Dunno why,It still said it dint have permission.Kind of > weird ..... > > For Content Provider ,do I have to mention the provider tag in > manifest.I have not worked on that before.Do you know of any examples > of how to access my internal files using content provider? > Thank you so much Mark. > > On Nov 4, 12:06 pm, Mark Murphy <[email protected]> wrote: > > > > > > > > > Or, create a small ContentProvider to serve up the files, and use > > content:// Uri values in your Intents to open them up. > > > On Fri, Nov 4, 2011 at 1:06 PM, Mark Murphy <[email protected]> wrote: > > > The files need to be MODE_WORLD_READABLE for third-party applications > > > to access them. When you create the files, use openFileOutput() and > > > specify MODE_WORLD_READABLE. > > > > On Fri, Nov 4, 2011 at 1:02 PM, ramya <[email protected]> wrote: > > >> Hi > > >> I need your help.Right now,I am struck in here. 1)My device does not > > >> have an sdcard. 2)In my app,I have MS files under my Internal Memory > > >> like ppt,xls and even pdf 3)I have quickoffice in my device. 4)When > > >> ever I launch a view intent using the appropriate Mime type ,I get the > > >> follwing error: > > > >> ERR/Quickoffice(15141): java.io.FileNotFoundException: /data/data/ > > >> packagename/files/folder/something.pptx (Permission denied) 01965 ERR/ > > >> Quickoffice(15141): at > > >> org.apache.harmony.luni.platform.OSFileSystem.openImpl(Native Method) > > >> ERR/Quickoffice(15141): at > > >> org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java: > > >> 152) ERR/Quickoffice(15141): at java.io.FileInputStream. > > >> (FileInputStream.java:82) ERR/Quickoffice(15141): at > > >> java.io.FileInputStream.(FileInputStream.java:134) ERR/ > > >> Quickoffice(15141): at > > >> android.content.ContentResolver.openInputStream(ContentResolver.java: > > >> 300) ERR/Quickoffice(15141): at > > >> com.qo.android.quickcommon.OfficeActivity.a(Unknown Source) ERR/ > > >> Quickoffice(15141): at > > >> com.qo.android.quickcommon.OfficeActivity.a(Unknown Source) ERR/ > > >> Quickoffice(15141): at > > >> com.qo.android.quickword.Quickword.onCreate(Unknown Source) ERR/ > > >> Quickoffice(15141): at > > >> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: > > >> 1052) 01965 ERR/Quickoffice(15141): at > > >> android.app.ActivityThread.performLaunchActivity(ActivityThread.java: > > >> 2627) ERR/Quickoffice(15141): at > > >> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: > > >> 2679) 01965 ERR/Quickoffice(15141): at > > >> android.app.ActivityThread.access$2300(ActivityThread.java:125) 01965 > > >> ERR/Quickoffice(15141): at android.app.ActivityThread > > >> $H.handleMessage(ActivityThread.java:2033) 01965 ERR/ > > >> Quickoffice(15141): at android.os.Handler.dispatchMessage(Handler.java: > > >> 99) 01965 ERR/Quickoffice(15141): at > > >> android.os.Looper.loop(Looper.java:123) 01965 ERR/Quickoffice(15141): > > >> at android.app.ActivityThread.main(ActivityThread.java:4627) 01965 ERR/ > > >> Quickoffice(15141): at java.lang.reflect.Method.invokeNative(Native > > >> Method) 01965 ERR/Quickoffice(15141): at > > >> java.lang.reflect.Method.invoke(Method.java:521) 01965 ERR/ > > >> Quickoffice(15141): at com.android.internal.os.ZygoteInit > > >> $MethodAndArgsCaller.run(ZygoteInit.java:858) 01965 ERR/ > > >> Quickoffice(15141): at > > >> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 01965 ERR/ > > >> Quickoffice(15141): at dalvik.system.NativeStart.main(Native Method) > > > >> Is there any workaround/solution.Please suggest:)Thanks in advance > > > >> -- > > >> You received this message because you are subscribed to the Google > > >> Groups "Android Developers" 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-developers?hl=en > > > > -- > > > Mark Murphy (a Commons Guy) > > >http://commonsware.com|http://github.com/commonsguy > > >http://commonsware.com/blog|http://twitter.com/commonsguy > > > > Warescription: Three Android Books, Plus Updates, One Low Price! > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > > Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups "Android Developers" 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-developers?hl=en

