简体   繁体   English

使用其他应用程序组件的Android服务

[英]Android service using components from other applications

I'm trying to write an Android application that will use plugins. 我正在尝试编写一个将使用插件的Android应用程序。 These plugins will just be other Android applications without a launcher. 这些插件将只是没有启动器的其他Android应用程序。 For instance my application can fire an intent saying "I want to get a list of images". 例如,我的应用程序可以激发一个意图,说“我想获取图像列表”。 Then, the user can pick from which application he/she wishes to find the list of images (typical facebook-plugin, flicker-plugin etc.). 然后,用户可以选择他/她希望从哪个应用程序中找到图像列表(典型的Facebook插件,闪烁插件等)。 The choice the user makes may or may not show an activity, but it will return the list of images to the application. 用户所做的选择可能显示也可能不显示活动,但是它将图像列表返回给应用程序。 However, this 'list' of images, isn't just a list of URLs to the image itself, because some sites which the user should be able to get the images from needs parsing, and that takes time, rather it's a resource as of how to obtain the list of images, so that later, I can connect to a content-provider that will download the images needed on the fly. 但是,此图像“列表”不仅是图像本身的URL列表,因为用户应该能够从中获取图像的某些站点需要解析,而且这需要时间,而从某种意义上说,这是一种资源。如何获取图像列表,以便稍后,我可以连接到内容提供程序,该程序将即时下载所需的图像。

However, I also have a service running that gives the user the ability to mark a given set of images (like a chapter, or album) for downloading, and then the service will download the images specified, but my application doesn't know how to get images from flicker/facebook/any other plugin, so I was wondering how I can make my service "talk" to the plugin to download the images in the background (without having to fire an activity that the user needs to see). 但是,我还运行了一项服务,该服务使用户能够标记一组给定的图像(如章节或相册)以供下载,然后该服务将下载指定的图像,但是我的应用程序不知道如何从flicker / facebook /任何其他插件获取图像,所以我想知道如何使我的服务与插件“对话”以在后台下载图像(而不必触发用户需要查看的活动)。

Any thoughts of how this can be achieved would be appreciated. 关于如何实现这一点的任何想法将不胜感激。

PS. PS。 Sorry about bad English, not my native language. 对不起英语不好,不是我的母语。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM