I want to send images created using my app using a send intent.
I looked at many examples of such intents and noticed that they all used the external storage to store the temporary image files that will be sent using the intent.
Is there any specific reason why the external storage is being used?
It looks to me like a dangerous choice since the user wouldn’t be able to post images to the web if the external storage is not mounted, which feels rather strange.
Also, where would you save your app’s working data? In onPause(), I am saving the current image the user is working on in the internal storage, but would you recommend storing it in external storage instead?
This is common because images can be fairly large. In some devices internal storage is somewhat precious (hence the popularity of Apps2SD). Additionally, sometimes you might want these images accessible to the user outside of your app. If it’s truly just temporary, you should consider using
getCacheDir()orgetExternalCacheDir().See this doc for info on storage. There’s code in that doc to see if external storage is available if you want to use internal and fallback to external.
Oh, the main reason though in your scenario is simply that your chunk of internal storage is only accessible to your app. If the send intent is to a component that is not your app, it won’t be able to access your area of internal storage.