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. 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 s开发者_C百科everal 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!
Use the widget onUpdate()
and onRecieve()
events to communicate with the RemoteView
like explained here
. The documented source of that discussion is here
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 the ContactContract.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.
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.
精彩评论