Android Open Source - RS-Text-Forwarder-Android-Client Background Intent Service






From Project

Back to project page RS-Text-Forwarder-Android-Client.

License

The source code is released under:

GNU General Public License

If you think the Android project RS-Text-Forwarder-Android-Client 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 net.rolisoft.textforwarder;
//  www. ja  va  2  s  .c om
import android.app.IntentService;
import android.content.Context;
import android.content.Intent;

public class BackgroundIntentService extends IntentService {

    public static final int SMS_RECEIVED  = 0x0A;
    public static final int MMS_RECEIVED  = 0x0B;
    public static final int CALL_RECEIVED = 0x0C;
    public static final int PUSH_RECEIVED = 0x0D;

    public static void start(Context context, Intent intent, int action)
    {
        Intent svc = new Intent(context, BackgroundIntentService.class);
        svc.setAction(Integer.toString(action));
        svc.putExtras(intent.getExtras());
        context.startService(svc);
    }

    public BackgroundIntentService() {
        super("BackgroundIntentService");
    }

    @Override
    protected void onHandleIntent(Intent intent)
    {
        int action = Integer.valueOf(intent.getAction());

        switch (action) {
            case SMS_RECEIVED:  SmsReceiver.handle(this, intent);  break;
            case MMS_RECEIVED:  MmsReceiver.handle(this, intent);  break;
            case CALL_RECEIVED: CallReceiver.handle(this, intent); break;
            case PUSH_RECEIVED: PushReceiver.handle(this, intent); break;
        }
    }

}




Java Source Code List

eu.chainfire.libsuperuser.Application.java
eu.chainfire.libsuperuser.Debug.java
eu.chainfire.libsuperuser.ShellNotClosedException.java
eu.chainfire.libsuperuser.ShellOnMainThreadException.java
eu.chainfire.libsuperuser.Shell.java
eu.chainfire.libsuperuser.StreamGobbler.java
net.rolisoft.textforwarder.BackgroundIntentService.java
net.rolisoft.textforwarder.CallReceiver.java
net.rolisoft.textforwarder.ContactTools.java
net.rolisoft.textforwarder.Contact.java
net.rolisoft.textforwarder.MainActivity.java
net.rolisoft.textforwarder.MmsReceiver.java
net.rolisoft.textforwarder.PrngFix.java
net.rolisoft.textforwarder.PushReceiver.java
net.rolisoft.textforwarder.ServerError.java
net.rolisoft.textforwarder.SmsReceiver.java
net.rolisoft.textforwarder.TextMessage.java
net.rolisoft.textforwarder.Tuple.java
net.rolisoft.textforwarder.WakeLocker.java