Android Open Source - AsmackChat Boot Completed Receiver






From Project

Back to project page AsmackChat.

License

The source code is released under:

Apache License

If you think the Android project AsmackChat listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.googlecode.asmack.chat;
/*from   www  . j  av  a  2s  .c  om*/
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

/**
 * A boot receiver to ensure that the chat service is running.
 */
public class BootCompletedReceiver extends BroadcastReceiver {

    /**
     * Start the chat service on boot.
     * @param context The current context.
     * @param intent The boot completed intent.
     */
    @Override
    public void onReceive(Context context, Intent intent) {
        Intent transportService = new Intent();
        transportService.setAction(IChatService.class.getCanonicalName());
        context.startService(transportService);
    }

}




Java Source Code List

com.googlecode.asmack.chat.AutoscrollDataSetObserver.java
com.googlecode.asmack.chat.AutoscrollListView.java
com.googlecode.asmack.chat.BootCompletedReceiver.java
com.googlecode.asmack.chat.ChatNotificationListener.java
com.googlecode.asmack.chat.ChatService.java
com.googlecode.asmack.chat.Chat.java
com.googlecode.asmack.chat.DatabaseOpenHelper.java
com.googlecode.asmack.chat.Database.java
com.googlecode.asmack.chat.HistoryCursorAdapter.java
com.googlecode.asmack.chat.XMPPUtils.java