English | Site Directory

Android - An Open Handset Alliance Project

com.google.android.gtalkservice
public final class

com.google.android.gtalkservice.Presence

java.lang.Object
com.google.android.gtalkservice.Presence Parcelable

A Presence is an abstract presentation of the user's presence information. Note that changes made to the Presence data won't be reflected to the server until GTalkSession.setPresence is called. Only the logged in user can update its own presence data via GTalkSession.setPresence. Presence contains a int status value as well as a user settable custom text status. The possible values for the int status are defined in Presence. The possible values are OFFLINE INVISIBLE DO_NOT_DISTURB AWAY IDLE AVAILABLE TODO: add priority API to Presence

Summary

Constants

      Value  
Creator  CREATOR       

Public Constructors

          Presence()
Default constructor
          Presence(int status, String customStatus)
Constructor
          Presence(Parcel source)
Constructor

Public Methods

        String  getCustomStatus()
getCustomStatus
        int  getStatus()
getStatus
        boolean  isOnline()
isOnLine
        boolean  isVisible()
isVisible
        void  setCustomStatus(String statusText)
setCustomStatus
        void  setStatus(int status)
setStatus
        void  writeToParcel(Parcel dest)
writeToParcel
Methods inherited from class java.lang.Object
Methods inherited from interface android.os.Parcelable

Details

Constants

public static final Creator CREATOR

Public Constructors

public Presence()

Default constructor

public Presence(int status, String customStatus)

Constructor

Parameters

status the status value for the presence.
customStatus user settable text status.

public Presence(Parcel source)

Constructor

Parameters

source the parcel value.

Public Methods

public String getCustomStatus()

getCustomStatus

Returns

  • the custom text status.

public int getStatus()

getStatus

Returns

  • the integer presence status

public boolean isOnline()

isOnLine

Returns

  • true if the presence status is not OFFLINE or INVITED

public boolean isVisible()

isVisible

Returns

  • true if the presence status is not INVISIBLE, OFFLINE or INVITED

public void setCustomStatus(String statusText)

setCustomStatus

Parameters

statusText the text status.

public void setStatus(int status)

setStatus

Parameters

status the integer presene status

public void writeToParcel(Parcel dest)

writeToParcel

Parameters

dest the destination parcel to be written to.
Build m5-rc15g - 14 May 2008 12:50