Dianne, Thanks for the suggestion. I have to use content provider because my application use webview to display local file, and the local file can change over time.
Is there a way my ContentProvider can find out what is the defined authority in AndroidManifest.xml at RUN TIME? Thanks, David On 4月4日, 下午8时02分, Dianne Hackborn <hack...@android.com> wrote: > Permissions are not relevant for this. Just make sure each of the providers > is published under a unique authority (please please please use a name > properly scoped to your own namespace) and you should be fine. > > But if you are making these things for only private access in your app, you > might to back up and ask: why are you using a content provider at all? It > would probably be easier to just have a singleton in each application that > provides direct access to the database. > > On Fri, Apr 3, 2009 at 9:23 PM, ylx_presid...@hotmail.com < > > > > ylx_presid...@hotmail.com> wrote: > > > How about use "permission" in your AndroidManifest.xml to impl. it? > > > <uses-permission > > android:name="android.permission.ACCESS_TEST_PROVIDER" /> > > ... > > <provider android:name=".TestProvider" ... > > android:permission="android.permission.ACCESS_TEST_PROVIDER"/> > > > android:permission="android.permission.ACCESS_BLUETOOTH_SHARE"/> > > On Apr 3, 9:34 am, "davidandroid2...@yahoo.com" > > <davidandroid2...@yahoo.com> wrote: > > > I have multiple applications which use the same ContentProvider code > > > for internal WebView to access local files (application private). > > > Because the ContentProvider has the same code base (package name, > > > content uri), this will cause problem when deployed 2 or more of my > > > application in the same device? How do I make the contentProvider only > > > accessible by its application and prefer a solution without code > > > changes. > > > > Thanks, > > > David > > -- > 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. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---