Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 package org.ros.rosserial;
00018
00019 import android.app.Activity;
00020 import android.content.ActivityNotFoundException;
00021 import android.content.Intent;
00022 import android.os.Bundle;
00023 import android.util.Log;
00024
00025
00026
00027
00028 public final class UsbAccessoryActivity extends Activity {
00029
00030 static final String TAG = "UsbAccessoryActivity";
00031
00032 @Override
00033 protected void onCreate(Bundle savedInstanceState) {
00034 super.onCreate(savedInstanceState);
00035
00036 Intent intent = new Intent(this,org.ros.rosserial.RosserialLauncherActivity.class);
00037
00038
00039 intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
00040 | Intent.FLAG_ACTIVITY_CLEAR_TOP);
00041 try {
00042 startActivity(intent);
00043 } catch (ActivityNotFoundException e) {
00044 Log.e(TAG, "unable to start Rosserial Launcher activity", e);
00045 }
00046 finish();
00047 }
00048 }