On Tue, Apr 26, 2011 at 12:46 AM, Paul <pmmen...@gmail.com> wrote: > > > share.setType(getString(R.string.note_default_mime_png)); > > There is no reason for this string to come from a resource; it is not > > something that gets localized, it is just a constant. > I am storing it in the XML as a way of storing the value... any other > standard conventions that are recommended? Store this as a static > constant in a static 'settings' class maybe? >
Just a static constant is fine. For example: http://developer.android.com/reference/android/provider/MediaStore.Audio.Media.html#CONTENT_TYPE > > ACTION_SEND is not specified to return anything, so if you are getting > any > > result at all you can't count on what you get back being useful. > I'm not counting on it returning anything useful, just having the > functionality indicate that it has finished is enough, I am then > setting a boolean field to true when it does, so that I know I that > the app has created a temporary copy of the file in the app's cache > directory. On exiting the program, if the field is true, I then empty > the cache directory. Obviously don't need to do this if I am no > longer copying the file if/when I get the method you suggest using > onFile() to work. > This may not be a safe assumption. For example the send will often take a while, so an implementation may very likely exit once the send has been confirmed and execute the operation in a background service. > On that front, I have overriden the onFile() method in my content > provider, but it is not being triggered by the above code, any > suggestions? > @Override > public ParcelFileDescriptor openFile(Uri uri, String mode) { > Log.d(LOG_TAG, "openFile() called"); > return null; > } > Have you published the content provider in your manifest and ensured you have set the authority correctly there in and the Intent's URI? Have you tried opening it yourself to see if it works? Is anything interested printed in the log? -- 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