Android的:如何添加应用程序,以QUOT&;通过&QUOT分享;名单摄像机图像 [英] Android: how to add app to "Share via" list for camera picture

查看:158
本文介绍了Android的:如何添加应用程序,以QUOT&;通过&QUOT分享;名单摄像机图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立一个应用程序,当用户使用其内置的Andr​​oid摄像头拍照开始,然后水龙头共享按钮,然后选择我的应用程序的共享者,这是预期的传入路径,这仅仅是图片取,它使用用于处理。

I am building an app that starts when a user takes a picture using their build-in Android camera, then taps the Share button, then chooses my app as the sharer, which is expecting an incoming path to the picture that was just taken, which it uses for processing.

问题:我怎么添加一个选项列表中的分享方式,指向我的应用程序?现在有像Facebook,电子邮件,短信,微博,Picasa的选项,我想补充我的应用程序瓦特/图标。

Question: how do I add an option to the "Share via" list that points to my app? Right now there are options like Facebook, Email, Messages, Twitter, Picasa, and I want to add my app w/ an icon.

我卡!而且,Google'ing这是不容易的,因为机器人插件列表,通过摄像头与人​​分享产生了不少成果。我建设与AppInventor(AI)的应用程序,但是,AI不允许开发商通过编辑列表中共享,所以也许这将是一个单独的小应用程序,只是增加了列表...?希望不是,因为这将会是巨大的,有只1的应用程序供用户下载/安装。

I'm stuck! And, Google'ing for this is not easy, as "android add to share via list camera" yields a lot of results. I'm building the app with AppInventor (AI), but, AI does not allow developers to edit the Share via list, so maybe this will have to be a separate mini app that just adds to the list...? Hopefully not, because it'd be great to have just 1 app for users to download/install.

谢谢!

推荐答案

功能类似于Android中工作,广播的意图的。该应用程序创建此意图和系统报告所有可以执行(微博,FB ...)你指定哪些活动可以通过意图过滤器方式做的活动。

Functions like the "share via" in Android work with broadcast intents. The app creates this intent and the system reports all the activities that can execute that (twitter, fb...) You specify what an activity can do by means of intent filters.

在你的情况我搜索Android摄像头份额的意图,一般发现意图过滤器看起来是这样的:

In your case I searched for "android camera share intent" and found generally that the intent filter looks like this:

<intent-filter>
    <action android:name="android.intent.action.SEND" />
    <category android:name="android.intent.category.DEFAULT" />
    <data android:mimeType="image/*" />
</intent-filter>

(不知道数据部分)

(not sure about the data section)

我不知道,如果相机的应用程序使用一个特定的内容提供商,反正你的应用程序应该能够管理至少是应用程序使用URI方案。

I don't know if camera app uses a specific content provider, anyway your app should be able to manage at least the URI scheme that app uses.

这篇关于Android的:如何添加应用程序,以QUOT&;通过&QUOT分享;名单摄像机图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆