Re: [android-developers] Re: Share Image files between Applications.
Thx Mark, I'll search about PackageManager, I think this is what I need :) I'll try implement this. -- 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
Re: [android-developers] Re: Share Image files between Applications.
On Mon, Nov 28, 2011 at 3:12 PM, Lucas de Jesus Matias wrote: > Mark, but doing this I will need update the default Aplication every time > that I create a new Package, right? No. > What I want is just read a directory and get all images which there is, > independent of another applications, the other applications just include > files in this directory. Then put them all on the SD card, where any application can delete them, the user can mount the storage (and make it inaccessible to your application on Android 1.x/2.x), etc. I wouldn't do it that way, but, hey, it's your app. > I dont know how to make this with ContentProvider. You wouldn't. Off the cuff, here is how I would approach plug-ins of the sort you are describing: Your main app discovers plug-ins either by watching for package-install broadcasts or querying PackageManager. In either case, you are looking for packages that fit a specific naming convention -- for example, the main app might by com.myfirm.app and plugins would be com.myfirm.app.plugin.*. For each plug-in, you then either: -- have the plug-in implement a ContentProvider, with the main app deriving the content Uri to use for that content provider via a naming convention (e.g., for com.myfirm.app.plugin.one, use content://com.myfirm.app.plugin.one) or: -- have whatever images and stuff you want as resources in the plug-in under well-known names (i.e., same names used across each plug-in), and use PackageManager to access the Resources object of the plug-in to retrieve those resources -- 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! -- 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
Re: [android-developers] Re: Share Image files between Applications.
Mark, but doing this I will need update the default Aplication every time that I create a new Package, right? What I want is just read a directory and get all images which there is, independent of another applications, the other applications just include files in this directory. I dont know how to make this with ContentProvider. -- 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
Re: [android-developers] Re: Share Image files between Applications.
On Mon, Nov 28, 2011 at 2:46 PM, Lucas de Jesus Matias wrote: > I'm searching and i found which with output I can write a file > in getFilesDir().getAbsolutePath() and with sharedUserId I think that I can > access it, I just dont know how to do this, its possible? This is a really bad idea. Not only will it break all your existing users and make your app more fragile, but it does not solve any problems. Every problem you have with using a content provider you will also have with sharedUserId. Use a content provider. Derive the Uri scheme from the package name of the add-on package. Or, use resources. Any app can read any other app's resources. You'd need to do the lookups by name, not R.id value, as those may well differ between apps. -- 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! -- 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
Re: [android-developers] Re: Share Image files between Applications.
When I save a image to SD the people can open this? -- 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
Re: [android-developers] Re: Share Image files between Applications.
On Mon, Nov 28, 2011 at 2:46 PM, Lucas de Jesus Matias < lucas.matias...@gmail.com> wrote: > I'm searching and i found which with output I can write a file > in getFilesDir().getAbsolutePath() and with sharedUserId I think that I can > access it, I just dont know how to do this, its possible? > > http://androidgps.blogspot.com/2008/09/writing-to-sd-card-in-android.html? kris -- 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
Re: [android-developers] Re: Share Image files between Applications.
I'm searching and i found which with output I can write a file in getFilesDir().getAbsolutePath() and with sharedUserId I think that I can access it, I just dont know how to do this, its possible? -- 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
Re: [android-developers] Re: Share Image files between Applications.
On Mon, Nov 28, 2011 at 1:18 PM, Lucas de Jesus Matias < lucas.matias...@gmail.com> wrote: > I dont want use it, but I think I'll need use it :/ only if there's no > alternative way. why not? It should always be there. kris -- 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
Re: [android-developers] Re: Share Image files between Applications.
I dont want use it, but I think I'll need use it :/ only if there's no alternative way. -- 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