仅与蓝牙选项共享意图 [英] Share Intent with Bluetooth Option Only
本文介绍了仅与蓝牙选项共享意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用我的应用程序通过蓝牙发送文件.我已经将 mime 类型更改为随机的 asdxasd/asdxa并且该文件具有我需要使用的扩展名,即 .sso
I am trying to send a file over bluetooth using my app. I already changed the mime type to something random as asdxasd/asdxa And the file has an extension that I need to use, that is .sso
当我使用共享 Intent 时,它只显示蓝牙和 gmail 选项,但我不能从列表中删除 gmail 选项吗?
When I use the share intent it only appears the bluetooth and gmail option, but can't I delete the gmail option from the list ?
非常感谢!我正在使用此代码使用 Intent 发送它:
Thanks alot in advance! I am using this code to send it using the 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, screenshotUri);
startActivity(Intent.createChooser(sharingIntent, "Share image"));
这篇关于仅与蓝牙选项共享意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文