我想开发一个android应用程序,它从其他应用程序接收文档,将它们转换为pdf,并将pdf发送到在线API。我的问题是:如何在大多数Android应用程序可用的“共享到”应用程序列表中显示我的应用程序?某处有在线教程吗?例如如果您点击图片上的“分享到”,会显示各种应用程序(消息、gmail、电子邮件等)-如何将我的应用程序添加到此列表? 最佳答案 你可以使用IntentsharingIntent=newIntent(android.content.Intent.ACTION_SEND);sharingIntent.setType(
我有这个代码IntentsharingIntent=newIntent(Intent.ACTION_SEND);if(Build.VERSION.SDK_INT我想将另一条包含文本和图像的消息分享到同一个选择器应用程序。你知道如何解决这个问题吗? 最佳答案 您可以使用ShareActionProvider。在下面的示例中,我使用了一个与Toolbar中的MenuItem相关联的示例,但也可以将它们与例如一个按钮。主菜单.xmlactivity_main.xml主Activity.javapublicclassMainActivity
我有一个图片库,其中的图片来自服务器。我想在gmail中共享/附加图像。我正在使用“添加轻松共享操作”。http://developer.android.com/training/sharing/shareaction.html#set-share-intent最初我尝试从我的SDCard共享图像,我能够通过使用以下代码来实现。IntentsharingIntent=newIntent(android.content.Intent.ACTION_SEND);sharingIntent.setType("image/jpeg");StringshareBody="Hereisthesha
我正在使用一个带有ACTION_SEND的Intent,我需要分享不同的文本。我需要为Gmail发送文本,我需要为Twitter发送其他文本。取决于应用程序。能否在应用发送分享文本前获取用户选择的应用? 最佳答案 是的,你可以在应用发送分享的文本之前获取用户选择的应用。为此,您必须制定解决方法,即:您必须通过以下方式获取支持此Intent的应用程序列表:IntentsharingIntent=newIntent(android.content.Intent.ACTION_SEND);sharingIntent.setType("te
我需要在XamarinAndroid中实现标准共享。我找到并更改了Xamarin的代码。看起来像这样publicvoidShare(stringtitle,stringcontent){if(string.IsNullOrEmpty(title)||string.IsNullOrEmpty(content))return;varname=Application.Context.Resources.GetResourceName(Resource.Drawable.icon_120).Replace(':','/');varimageUri=Uri.Parse("android.reso
我尝试了很多方法,但我做不到。我有一个*.txt文件。我想通过蓝牙、wifi、电子邮件和......分享它。当我使用此代码时,我无法共享文件:Filefile=newFile(Environment.getExternalStorageDirectory(),"Email-Ghap/Emails.txt");IntentsharingIntent=newIntent(Intent.ACTION_SEND);sharingIntent.setType("*/txt");sharingIntent.putExtra(Intent.EXTRA_STREAM,file);startActivi
我正在尝试使用我的应用程序通过蓝牙发送文件。我已经将mime类型更改为随机类型,如asdxasd/asdxa该文件有一个我需要使用的扩展名,即.sso当我使用共享Intent时,它只出现蓝牙和gmail选项,但我不能从列表中删除gmail选项吗?提前致谢!我正在使用此代码发送它,目的是:file=newFileSystem(this).saveTemp();IntentsharingIntent=newIntent(Intent.ACTION_SEND);UriscreenshotUri=Uri.fromFile(file);sharingIntent.setType("test/on
我正在尝试通过Twitter应用分享一些文本和图像。图片来源是一个网址。下面是我的代码:sharingIntent=newIntent(android.content.Intent.ACTION_SEND);sharingIntent.setType("*/*");sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT,"Iamreadingthispublication,checkitouthere:"+bookmark_url+"");sharingIntent.putExtra(android.content.Intent
你好,有一个带有此代码的java来创建共享IntentIntentsendIntent=newIntent();sendIntent.setAction(Intent.ACTION_SEND);sendIntent.putExtra(Intent.EXTRA_TEXT,"text");sendIntent.putExtra(Intent.EXTRA_SUBJECT,"subject");sendIntent.setType("text/plain");它现在会创建一个可用应用程序的弹出窗口,并询问您是否要始终或仅一次使用所选应用程序是否有设置仅将其打开一次并删除这2个按钮?androi
我正在创建一个应用程序来录制视频并将其上传到YouTube和其他社交网站。对于上传,我使用Droid共享功能并且效果很好。在电子邮件、Facebook、Skype等中上传效果很好,但当我选择YouTube时,它不会上传我的视频。这是我用于视频分享的代码。IntentsharingIntent=newIntent(android.content.Intent.ACTION_SEND);sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,"SUBJECT_NAME");sharingIntent.setType("vi