Android Open Source - ShareManager Connection Thread

From Project

Back to project page ShareManager.


The source code is released under:

Copyright (c) 2013, Nelspike All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Red...

If you think the Android project ShareManager 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 share.manager.connection;
/*from  w w w.  jav a 2  s .com*/
import java.util.ArrayList;

import share.manager.utils.RESTFunction;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;

public class ConnectionThread extends Thread {

  private ConnectionRunnable runConnection;
  private Handler mHandler;
  private RESTFunction current;

  public ConnectionThread(String link, Handler handler, Activity context,
      RESTFunction current) {
    this.runConnection = new ConnectionRunnable(link);
    this.mHandler = handler;
    this.current = current;

  public void run() {

  public ArrayList<String> getResult() {
    return runConnection.getResultObject();

  private void threadMsg() {
    Message msgObj = mHandler.obtainMessage();
    msgObj.obj = getResult();
    msgObj.what = current.toInt();


Java Source Code List