user3074140
user3074140

Reputation: 857

Getting files from subfolders in assets

I got StreamProvider working with my application allowing me send images from my stamps subfolder inside assets. I was wondering about multiple subfolders in the assets directory.

I added a gifs folder from which i want to share gifs. This worked fine but when i wanted to send images from the stamps folder it would check the gifs folder instead, therefore saying the file was not found.

Is there a way to get different files from different subfolders in assets.

<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">

    <asset name="assets" path="stamps" />
    <asset name="assets" path="gifs" />

</paths>

Upvotes: 1

Views: 78

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007296

They need to have separate names. The name is the first path segment in the Uri. You cannot have content://your.authority.name.here/assets point to two separate places.

Upvotes: 1

Related Questions