我正在开发我的第一个 Android 应用程序,并尝试为 QuickContact
面板获取 Intent
。我在某处发现提到了 QuickContact.getQuickContactIntent(...)
方法。但是当我尝试使用它时,它告诉我它对于 QuickContact
类型未定义。经过几天的谷歌搜索后,我发现了一堆在代码中使用它的页面,但没有任何关于如何使用它或需要哪些导入或任何内容的信息。那么我该如何使用这个方法呢?我需要获取用于启动面板的Intent
。
我已在我的文件中包含以下导入内容:
import android.provider.ContactsContract.QuickContact;
或者,我可以使用什么其他方法来获取 QuickContact
意图以传递给需要意图的对象?我希望将 LiveFolder 提供程序的意图传递回光标。
我正在针对 Google API 9 级、平台号 2.3.1 进行开发。
谢谢!
I'm working on my first Android application, and am trying to get an Intent
for the QuickContact
panel. Somewhere I had found mention of the method QuickContact.getQuickContactIntent(...)
. But when I try to use it, it tells me that it is undefined for the type QuickContact
. After googling for several days, I find a bunch of pages using it in code, but nothing about how to use it or what imports are necessary or anything. So how do I use this method? I need to get the Intent
used to launch the panel.
I've included the following import in my file:
import android.provider.ContactsContract.QuickContact;
Alternatively, what other method could I use to get a QuickContact
intent for passing to something expecting an intent? I am looking to pass the intent back in the cursor for a LiveFolder provider.
I am developing against the Google APIs Level 9, platform number 2.3.1.
Thanks!
发布评论
评论(2)
使用小部件
onUpdate()
和onRecieve()
事件与RemoteView
进行通信,如此处
。该讨论的记录来源位于此处
如果你想要一些阅读材料。我无法开始假设您为什么要尝试获取意图,或者您最初如何创建您所指的ContactContract.QuickContact
对象。更多信息可能会获得更多观点,并可能获得替代解决方案;因此,如果这没有帮助,请考虑发布更多信息。Use the widget
onUpdate()
andonRecieve()
events to communicate with theRemoteView
like explainedhere
. The documented source of that discussion ishere
if you want some reading material. I can't begin to assume why you're trying to get the intent, or how you initially created theContactContract.QuickContact
object you're referring to. Little more information might get a few more views, and probably alternate solutions; so if this doesn't help consider posting a bit more info.好吧,我让它工作的方法是放弃使用 LiveFolders 的想法,并编写我自己的“文件夹”对话框,我可以使用我自己设计的适配器向其中添加实际的 QuickContactBadge 小部件。
Well, the way I got this to work was to instead abandon the idea of using LiveFolders, and write my own "folder" dialog, to which I can add actual QuickContactBadge widgets using an adapter of my own devising.