[guardian-dev] Hi, i' new

arrase arrase at gmail.com
Tue Nov 22 19:12:31 EST 2016

2016-11-23 0:44 GMT+01:00 Mark Murphy <mmurphy at commonsware.com>:

> On Tue, Nov 22, 2016, at 18:34, arrase wrote:
> > Maybe you can help me
> >
> > Hidden services are stored in:
> >
> > /data/data/org.torproject.android/app_data
> Ick.
> > is there a way to share a file stored at app_data with a FileProvider?
> No. FileProvider does not support arbitrary locations, just standard
> ones. It's also not extensible to support other locations.
> My StreamProvider, however, is extensible:
> https://github.com/commonsguy/cwac-provider
> If you give me a few days, I'll release an update that supports your
> desired location. Or, follow the instructions for extending
> StreamProvider with your own custom StreamStrategy.

You mean something like:

public class PrivateDataProvider extends StreamProvider {
  private static final String TAG="privatedata-path";

  protected StreamStrategy buildStrategy(Context context,
                                         String tag, String name,
                                         String path, boolean readOnly,
                                         HashMap<String, String> attrs)
    throws IOException {
    if (TAG.equals(tag)) {
      return(new LocalPathStrategy(name,
        ), readOnly));

    return(super.buildStrategy(context, tag, name, path, readOnly, attrs));

Then I will be able to use PrivateDataProvider instead of FileProvider.

If that is correct I think it's a good solution, thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mayfirst.org/pipermail/guardian-dev/attachments/20161123/bd5bb794/attachment.html>

More information about the guardian-dev mailing list