我想制作一个文件上传器.因此,我需要一个文件选择器,但我不想自己写这个.我找到了OI文件管理器,我认为它适合我.但是我如何强制用户安装OI文件管理器?如果我不能,是否有更好的方法在我的应用程序中包含文件管理器?谢谢
file-io android file-upload filechooser android-afilechooser
我有一个文本阅读器应用程序,旨在当我点击文本文件打开它时从Android系统接收意图.但我的应用程序不在系统弹出的列表中.以下是我的代码:
表现
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.broadcastreceivertest1"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:label="@string/app_name"
android:name=".BroadcastReceiverTest1Activity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name="MyBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.ACTION_VIEW" />
<action android:name="android.intent.action.ACTION_EDIT" />
<action android:name="android.intent.action.ACTION_PICK" />
<data android:scheme="file" />
<data android:mimeType="*/*" />
<data android:pathPattern=".*\\.txt" />
<data android:host="*" />
</intent-filter>
</receiver>
</application>
</manifest>
Run Code Online (Sandbox Code Playgroud)
我的扩展BroadcastReceiver
public final class MyBroadcastReceiver extends BroadcastReceiver {
private String TAG = "MyBroadcastReceiver";
@Override
public void onReceive(Context context, Intent intent) …Run Code Online (Sandbox Code Playgroud)