简体   繁体   English

您如何获得显示“ QuickContact”的Android Intent?

[英]How do you get Android Intent for showing “QuickContact”?

I'm working on my first Android application, and am trying to get an Intent for the QuickContact panel. 我正在开发我的第一个Android应用程序,并试图为QuickContact面板获取一个Intent Somewhere I had found mention of the method QuickContact.getQuickContactIntent(...) . 我发现某处提到了QuickContact.getQuickContactIntent(...)方法。 But when I try to use it, it tells me that it is undefined for the type QuickContact . 但是当我尝试使用它时,它告诉我对于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. 我需要获取用于启动面板的Intent

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? 另外,我还可以使用什么其他方法来获取QuickContact意图,以传递给期望该意图的东西? I am looking to pass the intent back in the cursor for a LiveFolder provider. 我正在寻找将意图返回给LiveFolder提供程序的光标。

I am developing against the Google APIs Level 9, platform number 2.3.1. 我正在针对Google API Level 9(平台编号2.3.1)进行开发。 Thanks! 谢谢!

Use the widget onUpdate() and onRecieve() events to communicate with the RemoteView like explained here . 使用Widget onUpdate()onRecieve()事件与沟通RemoteView一样解释here The documented source of that discussion is here if you want some reading material. 如果您需要一些阅读材料,可以here该讨论的书面记录。 I can't begin to assume why you're trying to get the intent, or how you initially created the ContactContract.QuickContact object you're referring to. 我无法开始假设您为什么要获取意图,或者您最初是如何创建要引用的ContactContract.QuickContact对象的。 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小部件。

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

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