Android Open Source - AndroidConcurrency Posting Service






From Project

Back to project page AndroidConcurrency.

License

The source code is released under:

Apache License

If you think the Android project AndroidConcurrency 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.marakana.android.labs.concurrency.svc;
/*  w w  w  .j a  v  a  2s. c  om*/
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.os.Looper;
import android.util.Log;


/**
 *
 * @version $Revision: $
 * @author <a href="mailto:blake.meike@gmail.com">G. Blake Meike</a>
 */
public class PostingService extends Service {
    private static final String TAG = "POST_SVC";

    Poster.PostHandler postHandler;
    private Thread looper;

    @Override
    public void onCreate() {
        super.onCreate();
        looper = new Thread() {
            @Override
            public void run() {
                Looper.prepare();
                postHandler = new Poster.PostHandler();
                Looper.loop();
            }
        };
        looper.start();
    }

    @Override
    public IBinder onBind(Intent intent) {
        Log.d(TAG, "bound");
        return new Poster(postHandler);
    }
}




Java Source Code List

com.marakana.android.labs.concurrency.MainActivity.java
com.marakana.android.labs.concurrency.MainActivity.java
com.marakana.android.labs.concurrency.MainActivity.java
com.marakana.android.labs.concurrency.MainActivity.java
com.marakana.android.labs.concurrency.client.NetworkClient.java
com.marakana.android.labs.concurrency.client.NetworkClient.java
com.marakana.android.labs.concurrency.client.NetworkClient.java
com.marakana.android.labs.concurrency.client.NetworkClient.java
com.marakana.android.labs.concurrency.svc.Poster.java
com.marakana.android.labs.concurrency.svc.PostingServiceHelper.java
com.marakana.android.labs.concurrency.svc.PostingService.java
com.marakana.android.labs.concurrency.svc.PostingService.java