Android Open Source - Cloud-Phone-client Option Activity






From Project

Back to project page Cloud-Phone-client.

License

The source code is released under:

MIT License

If you think the Android project Cloud-Phone-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 com.networks999.android.app.vspip.main;
/*from   w  ww  .  ja  v a  2s . c om*/
import java.util.ArrayList;

import org.apache.http.NameValuePair;
import org.apache.http.message.BasicNameValuePair;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.widget.Toast;

import com.networks999.android.app.vspip.util.CustomHttpClient;

public class OptionActivity extends Activity {

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_option);
  }
public void onViewAndX(View v)
{
  final ArrayList<NameValuePair> postparameter=new ArrayList<NameValuePair>();
  postparameter.add(new BasicNameValuePair("intoServlet", "HaiServlet"));

  
  new Thread(new Runnable() {
    
    @Override
    public void run() {
      // TODO Auto-generated method stub
      
       final String response;
      try {
        response=CustomHttpClient.executeHttpPost("X86StartServlet",postparameter);
        Log.d("RESPONSE", response+"  test");
        runOnUiThread(new Runnable() {
          
          @Override
          public void run() {
            // TODO Auto-generated method stub
            try {
              Toast.makeText(getApplicationContext(), "Start Capturing", Toast.LENGTH_SHORT).show();
              Intent intent=new Intent(OptionActivity.this,ScreenCapture.class);
              startActivity(intent);
            } catch (Exception e) {
              // TODO: handle exception
              e.printStackTrace();
            }
            
          }
        });
      } catch (Exception e) {
        // TODO: handle exception
        e.printStackTrace();
      }
      
      
    }
  }).start();
  
}
public void onPushFile(View v)
{
Intent intent=new Intent(OptionActivity.this,PushFile.class);
startActivity(intent);
}
public void onPullbtnClick(View V)
{
  Intent intent=new Intent(OptionActivity.this,PullFile.class);
  startActivity(intent);
}
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.option, menu);
    return true;
  }

}




Java Source Code List

com.networks999.android.app.vspip.main.LoginActivity.java
com.networks999.android.app.vspip.main.MenuActivity.java
com.networks999.android.app.vspip.main.OptionActivity.java
com.networks999.android.app.vspip.main.PullFile.java
com.networks999.android.app.vspip.main.PushFile.java
com.networks999.android.app.vspip.main.ScreenCapture.java
com.networks999.android.app.vspip.main.UserRegistration.java
com.networks999.android.app.vspip.util.CustomHttpClient.java
com.networks999.android.app.vspip.util.UrlConnections.java