java - How does Dropbox app access my app-cache? (Android) -


I'm trying to implement a "share image" button in my Android app. Since the image can be private to the user, I did not want to save it publicly on the device, so I chose to use the cache.

Before I understood that the cache directory can only be accessed by the owner app, I found that sharing the image to Dropbox works fine (whereas other apps throw exceptions) The dropbox accesses the file that is located in my app cache?

My share-bitmap method (exception handling is stripped): final file outputFile = new file (getCacheDir (), File name); // Save File FileOutputStream Out = New FileOutputStream (outputFile); Bitmap.compress (bitmap.compress format.png, 100, out); // Get the path to the file URI bmpUri = Uri.parse (outputFile.getAbsolutePath ()); // Share Image Last Intent Intention = New Intent (android.content.Intent.ACTION_SEND); Intent.setData (bmpUri); intent.putExtra (Intent.EXTRA_STREAM, bmpUri); intent.setType ("image / *"); Start creating activity (intent (intent, "shared image"));

I think that's because it has specific permissions:

  System tool tests test for protected storage   

I also find that this permission will allow a child of WRITE_EXTERNAL_STORAGE is.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -