Android Question How to get "GetSafeDirDefaultExternal" value without RuntimePermissions lib?

JohnC

Expert
Licensed User
Longtime User
I am developing an app that I want to be as small as possible.

Using the GetSafeDirDefaultExternal location is perfect for my needs, but adding the RuntimesPermission lib (that provides this property) adds 500k to my app size.

Is there some other way to get this value without requiring the RuntimePermissions lib to be added to the project?
 
Last edited:

drgottjr

Expert
Licensed User
Longtime User
THIS WENT ON LATE. WE ULTIMATELY REALIZED THERE IS NO SHORTCUT. IF YOU'RE STARTING HERE, DON'T BOTHER GOING BACK TO THE START TO READ THE THREAD. THE SOLUTION LOOKED PROMISING, BUT IT WAS JUST A SIREN LURING US TO FAILURE. WE ENDED UP PM'ING, BUT THAT LEFT ALL OF THIS MESS.
looks like getting around fileprovider is a dead end. but i still believe it's possible to construct the special uri that fileprovider uses by hand, ie, without support-v4. i would imagine that's where all the kb's are. it's just a method that prepends content:// instead of file://. not ready to submit just yet.
 
Last edited:
Upvote 0

JohnC

Expert
Licensed User
Longtime User
So I guess there is no way to grab just the class "android.support.v4.content.FileProvider" without including all the other classes of the whole RuntimetimePermission lib?
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
But, if I want to "share" that directory, I need FileProvider.

[update: but I guess my ultimate need is really different from the title of this thread to just getting the dir vlaue, so I will post another thread)
 
Last edited:
Upvote 0
Top