【问题标题】:share a byte[] file via bluetooth通过蓝牙共享一个 byte[] 文件
【发布时间】:2014-08-23 10:42:20
【问题描述】:

我想通过蓝牙共享一个字节[]的文件。

            Intent intent = new Intent();  
            intent.setAction(Intent.ACTION_SEND);  
            intent.setType("text/byte");//what type ?


            String uri = Environment.getExternalStorageDirectory() + "/Keys/"+"public.key";
            intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(uri)));
            startActivity(intent);

我应该叫什么类型???

我还需要更改清单文件吗?

【问题讨论】:

    标签: android file bluetooth share manifest


    【解决方案1】:

    可能清单文件丢失

    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    

    【讨论】:

      猜你喜欢
      • 2012-06-11
      • 2011-09-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多