|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
com.beem.project.beem
Class BeemService

java.lang.Objectandroid.content.Context
android.content.ContextWrapper
android.app.Service
com.beem.project.beem.BeemService
- All Implemented Interfaces:
- ComponentCallbacks
public class BeemService
- extends Service
This class is for the Beem service. It must contains every global informations needed to maintain the background service. The connection to the xmpp server will be made asynchronously when the service will start.
| Field Summary | |
|---|---|
static int |
NOTIFICATION_STATUS_ID
The id to use for status notification. |
| Fields inherited from class android.app.Service |
|---|
START_CONTINUATION_MASK, START_FLAG_REDELIVERY, START_FLAG_RETRY, START_NOT_STICKY, START_REDELIVER_INTENT, START_STICKY, START_STICKY_COMPATIBILITY |
| Constructor Summary | |
|---|---|
BeemService()
Constructor. |
|
| Method Summary | |
|---|---|
XmppConnectionAdapter |
createConnection()
Create the XmppConnectionAdapter. |
void |
deleteNotification(int id)
Delete a notification. |
IXmppFacade |
getBind()
Return a bind to an XmppFacade instance. |
NotificationManager |
getNotificationManager()
Get the notification manager system service. |
SharedPreferences |
getServicePreference()
Get the preference of the service. |
void |
initJingle(XMPPConnection adaptee)
Initialize Jingle from an XmppConnectionAdapter. |
IBinder |
onBind(Intent intent)
|
void |
onCreate()
|
void |
onDestroy()
|
void |
onStart(Intent intent,
int startId)
|
boolean |
onUnbind(Intent intent)
|
void |
resetStatus()
Reset the status to online after a disconnect. |
void |
sendNotification(int id,
Notification notif)
Show a notification using the preference of the user. |
| Methods inherited from class android.app.Service |
|---|
dump, finalize, getApplication, onConfigurationChanged, onLowMemory, onRebind, onStartCommand, setForeground, startForeground, stopForeground, stopSelf, stopSelf, stopSelfResult |
| Methods inherited from class android.content.Context |
|---|
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
NOTIFICATION_STATUS_ID
public static final int NOTIFICATION_STATUS_ID
- The id to use for status notification.
- See Also:
- Constant Field Values
| Constructor Detail |
|---|
BeemService
public BeemService()
- Constructor.
| Method Detail |
|---|
onBind
public IBinder onBind(Intent intent)
onUnbind
public boolean onUnbind(Intent intent)
onCreate
public void onCreate()
onDestroy
public void onDestroy()
onStart
public void onStart(Intent intent, int startId)
createConnection
public XmppConnectionAdapter createConnection()
- Create the XmppConnectionAdapter.
This method makes a network request so it must not be called on the main thread.
- Returns:
- the connection
sendNotification
public void sendNotification(int id,
Notification notif)
- Show a notification using the preference of the user.
- Parameters:
id- the id of the notification.notif- the notification to show
deleteNotification
public void deleteNotification(int id)
- Delete a notification.
- Parameters:
id- the id of the notification
resetStatus
public void resetStatus()
- Reset the status to online after a disconnect.
initJingle
public void initJingle(XMPPConnection adaptee)
- Initialize Jingle from an XmppConnectionAdapter.
- Parameters:
adaptee- XmppConnection used for jingle.
getBind
public IXmppFacade getBind()
- Return a bind to an XmppFacade instance.
- Returns:
- IXmppFacade a bind to an XmppFacade instance
getServicePreference
public SharedPreferences getServicePreference()
- Get the preference of the service.
- Returns:
- the preference
getNotificationManager
public NotificationManager getNotificationManager()
- Get the notification manager system service.
- Returns:
- the notification manager service.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright © 2009 Beem-project.com. All Rights Reserved.

