[guardian-dev] Hi, i' new

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


Ouch! the app builds but:

AndroidRuntime: java.lang.RuntimeException: Unable to get provider
com.commonsware.cwac.provider.StreamProvider:
java.lang.IllegalArgumentException: Failed to parse
com.commonsware.cwac.provider.STREAM_PROVIDER_PATHS meta-data

At manifests:

<provider
            android:name="com.commonsware.cwac.provider.StreamProvider"
            android:authorities="org.torproject.android.backup"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data

android:name="com.commonsware.cwac.provider.STREAM_PROVIDER_PATHS"
                android:resource="@xml/hidden_services_paths"/>
</provider>

Xml:

<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
    <app-data-path name="hidden-services" path="hidden_services/"/>

</paths>

I'm doing something wrong?

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.
>
> --
> Mark Murphy (a Commons Guy)
> https://commonsware.com | https://github.com/commonsguy
> https://commonsware.com/blog | https://twitter.com/commonsguy
> _______________________________________________
> List info: https://lists.mayfirst.org/mailman/listinfo/guardian-dev
> To unsubscribe, email:  guardian-dev-unsubscribe at lists.mayfirst.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mayfirst.org/pipermail/guardian-dev/attachments/20161123/7b867a12/attachment.html>


More information about the guardian-dev mailing list