Android 当我使用intents it浏览文件时';谁不去文件管理器?

Android 当我使用intents it浏览文件时';谁不去文件管理器?,android,android-intent,file-manager,Android,Android Intent,File Manager,单击浏览按钮时,我添加了以下代码: Intent intent = new Intent(Intent.ACTION_VIEW); intent.setType("*/*"); startActivityForResult(intent, CHOOSE_FILE_REQUESTCODE); 它在一些设备上显示了FileManager,如Redmi、华硕和Micromax。但在三星手机上没有显示,它不会显示file manager 如何让三星手机中的FileManager选择文件?替换

单击浏览按钮时,我添加了以下代码:

Intent intent = new Intent(Intent.ACTION_VIEW);    
intent.setType("*/*");
startActivityForResult(intent, CHOOSE_FILE_REQUESTCODE);
它在一些设备上显示了FileManager,如Redmi、华硕和Micromax。但在三星手机上没有显示,它不会显示file manager

如何让三星手机中的FileManager选择文件?

替换

Intent intent = new Intent(Intent.ACTION_VIEW); 
作为

编辑

@哈努曼:我认为不存在适合所有模型的单一解决方案,所有带有“动作”的意图都必须由选择者处理。如果您使用>=4.4设备,我建议

更换

Intent intent = new Intent(Intent.ACTION_VIEW); 
作为

编辑

@哈努曼:我认为不存在适合所有模型的单一解决方案,所有带有“动作”的意图都必须由选择者处理。如果您使用>=4.4设备,我建议

试试这对我有用

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("*/*");
startActivityForResult(intent , CHOOSE_FILE_REQUESTCODE);
适用于三星设备

String manufactures = android.os.Build.MANUFACTURER;
    if(manufactures.equalsIgnoreCase("samsung")){
        Intent intent = new Intent("com.sec.android.app.myfiles.PICK_DATA");              
        intent.putExtra("CONTENT_TYPE", "*/*");
        startActivityForResult(intent, CHOOSE_FILE_REQUESTCODE); 
    } 

试试看,这对我有用

Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
intent.setType("*/*");
startActivityForResult(intent , CHOOSE_FILE_REQUESTCODE);
适用于三星设备

String manufactures = android.os.Build.MANUFACTURER;
    if(manufactures.equalsIgnoreCase("samsung")){
        Intent intent = new Intent("com.sec.android.app.myfiles.PICK_DATA");              
        intent.putExtra("CONTENT_TYPE", "*/*");
        startActivityForResult(intent, CHOOSE_FILE_REQUESTCODE); 
    } 

它没有显示FileManager,它显示了一些应用程序,如选择音乐曲目、驱动器、联系人、Dropbox、Gallery、照片。但它没有显示FileManager以选择文件(在三星Galaxy、三星Note中)。它没有显示FileManager,它显示了一些应用程序,如选择音乐曲目、驱动器、联系人、Dropbox、Gallery、,照片。但它没有显示文件管理器来选择文件(在三星Galaxy中,三星注释)。