iPaulPro / aFileChooser

[DEPRECATED] Android library that provides a file explorer to let users select files on external storage.
Apache License 2.0
1.79k stars 850 forks source link

Sometimes not displaying "choose a file" option in File Chooser #47

Open pratikbutani opened 10 years ago

pratikbutani commented 10 years ago

This is preview. can you tell why it is going to hide?

device-2014-05-23-183521

pratikbutani commented 10 years ago

Finally i got solution:

I just forgot to declare FileChooserActivity.java in AndroidManifest.xml

   <activity
        android:name="com.ipaulpro.afilechooser.FileChooserActivity"
        android:enabled="@bool/use_activity"
        android:exported="true"
        android:icon="@drawable/ic_chooser"
        android:label="@string/choose_file" >
        <intent-filter>
            <action android:name="android.intent.action.GET_CONTENT" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.OPENABLE" />

            <data android:mimeType="*/*" />
        </intent-filter>
    </activity>

    <provider
        android:name="com.ianhanniballake.localstorage.LocalStorageProvider"
        android:authorities="com.ianhanniballake.localstorage.documents"
        android:enabled="@bool/use_provider"
        android:exported="true"
        android:grantUriPermissions="true"
        android:permission="android.permission.MANAGE_DOCUMENTS" >
        <intent-filter>
            <action android:name="android.content.action.DOCUMENTS_PROVIDER" />
        </intent-filter>
    </provider>
bdrhoa commented 9 years ago

I have this same problem. And it doesn't work even with the correct entry in AndroidManifest.xml. Is the LocalStorageProvider needed to the Choose a File option?

pratikbutani commented 9 years ago

Yes of course, you have to add this entry in AndroidManifest.xml

jtbuaa commented 8 years ago

not work for me, even with LocalStorageProvider declared in AndroidManifest.xml

jtbuaa commented 8 years ago

it works for me if remove android:enabled="@bool/use_activity" in AndroidManifest.xml