启动 Google 财经并显示特定股票的图表,这可能吗?
我想在我的 Android 应用程序中执行两件事:
检查设备上是否安装了 Google 财经应用程序。应该非常简单,不是吗?
如果是,则启动打开 Google 财经的意图,显示特定股票的图表。因此,我还需要以某种方式将股票行情传递给 Google 财经...但这可能吗?
我可以使用任何其他替代方法来显示任何股票的股票图表(比方说 5 天盘中图表)吗?
感谢您的帮助。
I would like to do two things within my Android app :
Check if the Google Finance app is installed on the device. Should be pretty straighforward, isn't it ?
If yes, launch an intent to Open up Google Finance, displaying a graph on a particular Stock. So I also need to pass the stock ticker to Google Finance in some way... but is this even possible ?
Any other alternative I could use to display Stock Charts (let's say a 5 days intraday chart) on any stock ?
Thanks for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道有任何公开记录的软件包或
Intent
来实现您的目标,更不用说满足您特定的open-a-graph-on-的Intent
了a 库存请求。因为我假设您正在寻找免费的东西,所以我会考虑在一些现有的基于 Web 的金融网站上启动浏览器(或者可能使用
WebView
小部件)。I am not aware of there being any publicly-documented packages or
Intents
to achieve your aim, let alone anIntent
that would meet your specific open-a-graph-on-a-stock request.Since I am assuming you are looking for something that is free, I would look into launching the Browser (or perhaps using the
WebView
widget) on some existing Web-based finance site.不幸的是,很少有带有参数的意图被发布和记录。
OpenIntents 尝试收集其中的一些 http://www.openintents.org/
另一种查找可用意图的方法就是查看已部署应用程序的AndroidManifest.xml(通常只压缩,不加密)。当然,这种方法发现的意图可能不公开,并且会随着时间的推移而改变。
最近遇到了 ManifestExplorer https://www.isecpartners.com/manifest_explorer.html 我有内置于 http://dl.dropbox.com/u/ 的 .apk 中4379928/android/ManifestExplorer.apk
它允许您查看所有已安装应用程序的AndroidManifest.xml。
com.google.android.apps.finance 的 manfiest 不包含任何相关意图。
不过,有趣的是,它包含 http://finance.google.com 的数据方案,因此如果您使用浏览器导航到此页面,它会询问您是否要在财务应用程序中打开它。
最好的方法可能是遵循 CommonsWare 的建议
Unfortunately, very few intents with parameters are published and documented.
OpenIntents tries to collect some of them http://www.openintents.org/
Another way of finding available intents is to look at the AndroidManifest.xml of the deployed application (usually only compressed, not encrypted). Of course, this method discovers intents that may not be public and will change over time.
Recently came across ManifestExplorer https://www.isecpartners.com/manifest_explorer.html which I have built into an .apk at http://dl.dropbox.com/u/4379928/android/ManifestExplorer.apk
It allows you to see the AndroidManifest.xml of all installed applications.
The manfiest of com.google.android.apps.finance doesn't include any relevant intents.
However, it is interesting that it contains a data scheme for http://finance.google.com so that if you use the browser to navigate to this page it asks if you want to open it in the finance app instead.
Best way would probably be to follow the advice from CommonsWare