[guardian-dev] Hi, i' new

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


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

> On Tue, Nov 22, 2016, at 19:12, arrase wrote:
> > You mean something like:
> >
> > public class PrivateDataProvider extends StreamProvider {
> >   private static final String TAG="privatedata-path";
> >
> >   @Override
> >   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,
> >         context.getDir(
> >                 TorServiceConstants.DIRECTORY_TOR_DATA,
> >                 Application.MODE_PRIVATE
> >         ), readOnly));
> >     }
> >
> >     return(super.buildStrategy(context, tag, name, path, readOnly,
> >     attrs));
> >   }
> > }
> >
> > Then I will be able to use PrivateDataProvider instead of FileProvider.
>
> Yes, though boolean readOnly is not yet released. That will be part of
> v0.5.0, which I hope to release soon.  If you want to work with v0.4.4,
> just skip that parameter for now.
>
> I'll also look to add a built-in strategy for this, so you will not need
> to create your own subclass.
>

Thanks! :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mayfirst.org/pipermail/guardian-dev/attachments/20161123/339ab33c/attachment-0001.html>


More information about the guardian-dev mailing list