android - 如何在android中检索存储在外部USB设备中的数据?

标签 android database speech usb-drive text-to-speech

我正在 android 中做一个文本到语音转换的项目。我如何检索存储在外部存储设备中的语音文件??

我首先尝试了一张图片,这是我的代码......它不起作用......没有显示错误......但没有显示任何内容。这是我的代码

 package com.org.sd;

import android.app.Activity;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.widget.ImageView;

public class SdcardActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ImageView myImageView = (ImageView)findViewById(R.id.imageview);
        Bitmap bitmap = BitmapFactory.decodeFile("/F/cameraman.bmp");
        myImageView.setImageBitmap(bitmap);             


    }
}

最佳答案

您可以在以下链接中找到一些解决方案:

它具有通用格式,您仍然可以对其有所了解...

链接是here

关于android - 如何在android中检索存储在外部USB设备中的数据?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9175090/

相关文章:

java - 击打: "Trust anchor for certification path not found"

android - 更换 Lollipop 5.0.1 中的锁屏壁纸

python - django: select_related() 在一个已经存在的对象上?

asp.net - 通过 IIS 运行 Microsoft.Speech?

c# - 我应该使用哪种音频编解码器?

c - 关于在 C 中使用 LAME 的问题

android - 什么决定了 View 中的初始 Canvas 尺寸?

android - 如何在没有 Android Studio 的情况下使用模拟器在 VS 代码中安装 flutter ?

ruby-on-rails - 期待 Rails 文件中的 tASSOC

database - Oracle SQL 开发人员中的 DB2 数据库