com.googlecode.android_scripting.facade
Class ContactsFacade
java.lang.Object
com.googlecode.android_scripting.jsonrpc.RpcReceiver
com.googlecode.android_scripting.facade.ContactsFacade
public class ContactsFacade
- extends RpcReceiver
Provides access to contacts related functionality.
- Author:
- MeanEYE.rcf (meaneye.rcf@gmail.com
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
mPhoneContent
public Uri mPhoneContent
mContactId
public java.lang.String mContactId
mPrimary
public java.lang.String mPrimary
mPhoneNumber
public java.lang.String mPhoneNumber
mHasPhoneNumber
public java.lang.String mHasPhoneNumber
ContactsFacade
public ContactsFacade(FacadeManager manager)
pickContact
@Rpc(description="Displays a list of contacts to pick from.",
returns="A map of result values.")
public Intent pickContact()
throws JSONException
- Throws:
JSONException
pickPhone
@Rpc(description="Displays a list of phone numbers to pick from.",
returns="The selected phone number.")
public java.lang.String pickPhone()
throws JSONException
- Throws:
JSONException
contactsGetAttributes
@Rpc(description="Returns a List of all possible attributes for contacts.")
public java.util.List<java.lang.String> contactsGetAttributes()
contactsGetIds
@Rpc(description="Returns a List of all contact IDs.")
public java.util.List<java.lang.Integer> contactsGetIds()
contactsGet
@Rpc(description="Returns a List of all contacts.",
returns="a List of contacts as Maps")
public java.util.List<JSONObject> contactsGet(@RpcParameter(name="attributes")@RpcOptional
JSONArray attributes)
throws JSONException
- Throws:
JSONException
contactsGetById
@Rpc(description="Returns contacts by ID.")
public JSONObject contactsGetById(@RpcParameter(name="id")
java.lang.Integer id,
@RpcParameter(name="attributes")@RpcOptional
JSONArray attributes)
throws JSONException
- Throws:
JSONException
contactsGetCount
@Rpc(description="Returns the number of contacts.")
public java.lang.Integer contactsGetCount()
queryContent
@Rpc(description="Content Resolver Query",
returns="result of query as Maps")
public java.util.List<JSONObject> queryContent(@RpcParameter(name="uri",description="The URI, using the content:// scheme, for the content to retrieve.")
java.lang.String uri,
@RpcParameter(name="attributes",description="A list of which columns to return. Passing null will return all columns")@RpcOptional
JSONArray attributes,
@RpcParameter(name="selection",description="A filter declaring which rows to return")@RpcOptional
java.lang.String selection,
@RpcParameter(name="selectionArgs",description="You may include ?s in selection, which will be replaced by the values from selectionArgs")@RpcOptional
JSONArray selectionArgs,
@RpcParameter(name="order",description="How to order the rows")@RpcOptional
java.lang.String order)
throws JSONException
- Exactly as per ContentResolver.query
- Throws:
JSONException
queryAttributes
@Rpc(description="Content Resolver Query Attributes",
returns="a list of available columns for a given content uri")
public JSONArray queryAttributes(@RpcParameter(name="uri",description="The URI, using the content:// scheme, for the content to retrieve.")
java.lang.String uri)
throws JSONException
- Throws:
JSONException
shutdown
public void shutdown()
- Description copied from class:
RpcReceiver
- Invoked when the receiver is shut down.
- Specified by:
shutdown in class RpcReceiver