You can use Remote RDP in you application. Please check following code for reference:
public class RemoteTest extends Activity {
// parameters for Remote RDP
public static final String REMOTE_SERVER = "server";
public static final String REMOTE_PORT = "port";
public static final String REMOTE_DOMAIN = "domain";
public static final String REMOTE_USER = "user";
public static final String REMOTE_PASSWORD = "password";
public static final String REMOTE_WIDTH = "width";
public static final String REMOTE_HEIGHT = "height";
public static final String REMOTE_OPTIONS = "options";
public static final String REMOTE_PROGRAM = "program";
public static final String REMOTE_COLOR = "color";
public static final String REMOTE_AS_HOST = "as_host"; //the client computer name
// option values for REMOTE_OPTIONS
public static final int OPTION_CONSOLE = 0x00000001;//connet to console session
public static final int OPTION_CLIPBOARD = 0x00000002;//clipbaord copy/paste
public static final int OPTION_SDCARD = 0x00000004; //mount sdcard
public static final int OPTION_SOUND = 0x00000008; //audio playback
public static final int OPTION_LEAVE_SOUND = 0x00000010; //leave sound in remote computer
public static final int OPTION_BEST_EFFECT = 0x00000020;//best display effect
public static final int OPTION_RECORD_AUDIO = 0x00000040;//audio recording
public static String LOG = "WALTER_RDP_TEST";
public static String walter_rdp_uri = "com.toremote.serversmanager";
public static String HOST = "64.203.39.11";
public static String USER = "ywang";
public static String PORT = "3389";
public static String PWD = "password";
public static String DOMAIN = "";
Button button;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Log.v(LOG, "Application Started");
button = (Button) findViewById(R.id.Button01);
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
walterRdpIntent();
}
});
}
/**
*
* test funtion that sends an Intent object to Walter's ToRemote application
*/
public void walterRdpIntent()
{
Log.v(LOG, "sending an intent to walter App");
Intent intent = new Intent(Intent.ACTION_VIEW);
// Uri m_uri = Uri.parse(walter_rdp_uri);
// for enterprise version
intent.setComponent(new ComponentName("com.toremote.serversmanager",
"com.toremote.RemoteActivity"));
//for standard version
//intent.setComponent(new ComponentName("org.toremote.serversmanager",
// "com.toremote.RemoteActivity"));
//for lite version
//intent.setComponent(new ComponentName("org.toremote.rdpdemo",
// "com.toremote.RemoteActivity"));
intent.putExtra(REMOTE_SERVER, HOST);
intent.putExtra(REMOTE_PORT, PORT);
// following are optional:
intent.putExtra(REMOTE_USER, USER);
intent.putExtra(REMOTE_PASSWORD, PWD);
intent.putExtra(REMOTE_DOMAIN, DOMAIN);
intent.putExtra(REMOTE_WIDTH, "800");//"0" means "fit Device screen"
intent.putExtra(REMOTE_HEIGHT, "600");//"0" means "fit Device screen"
intent.putExtra(REMOTE_COLOR, 16);//16 bit color
intent.putExtra(REMOTE_OPTIONS, OPTION_CLIPBOARD | OPTION_SOUND
| OPTION_SDCARD | OPTION_RECORD_AUDIO | OPTION_CONSOLE
| OPTION_BEST_EFFECT);
startActivity(intent);
}
}