我正在尝试使用我的应用程序通过蓝牙发送文件.
我已经将mime类型更改为随机的asdxasd / asdxa
该文件有一个我需要使用的扩展名,即.sso
我已经将mime类型更改为随机的asdxasd / asdxa
该文件有一个我需要使用的扩展名,即.sso
当我使用共享意图时,它只显示蓝牙和gmail选项,但是我不能从列表中删除gmail选项吗?
非常感谢提前!
我正在使用此代码使用intent发送它:
file = new FileSystem(this).saveTemp();
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
Uri screenshotUri = Uri.fromFile(file);
sharingIntent.setType("test/onlineconfig");
sharingIntent.putExtra(Intent.EXTRA_STREAM,screenshotUri);
startActivity(Intent.createChooser(sharingIntent,"Share Config Using"));
解决方法
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
Uri screenshotUri = Uri.parse(picURI);
sharingIntent.setType("image/*");
sharingIntent.setPackage("com.android.bluetooth");
sharingIntent.putExtra(Intent.EXTRA_STREAM,"Share image"));