|
|
|
@ -9,8 +9,9 @@ import android.view.MenuItem;
|
|
|
|
|
|
|
|
|
|
import com.github.rosjava.android_remocons.common_tools.apps.RosAppActivity;
|
|
|
|
|
import com.github.rosjava.android_remocons.rocon_remocon.R;
|
|
|
|
|
import com.github.rosjava.android_remocons.rocon_remocon.fall_dectect.FallDialog;
|
|
|
|
|
import com.github.rosjava.android_remocons.rocon_remocon.fall_dectect.subscriber;
|
|
|
|
|
import com.github.rosjava.android_remocons.rocon_remocon.stranger_detect.StrangerDialog;
|
|
|
|
|
import com.github.rosjava.android_remocons.rocon_remocon.stranger_detect.subscriber;
|
|
|
|
|
import com.github.rosjava.android_remocons.rocon_remocon.stranger_detect.NoStrangerDialog;
|
|
|
|
|
|
|
|
|
|
import org.ros.node.NodeConfiguration;
|
|
|
|
|
import org.ros.node.NodeMainExecutor;
|
|
|
|
@ -62,9 +63,17 @@ public class NewListener extends RosAppActivity
|
|
|
|
|
//sc.getAlertText();
|
|
|
|
|
Log.i("listener", "I heard msg from ubuntu : \"" + sc.getAlertText() + "\"");
|
|
|
|
|
if (sc.getAlertText() != null) {
|
|
|
|
|
Log.e("listener", "收到了");
|
|
|
|
|
Intent intent = new Intent(NewListener.this,FallDialog.class);
|
|
|
|
|
startActivity(intent);
|
|
|
|
|
if (sc.getAlertText() == "有陌生人来访!"){
|
|
|
|
|
Log.e("listener", "收到了");
|
|
|
|
|
Intent intent = new Intent(NewListener.this,StrangerDialog.class);
|
|
|
|
|
startActivity(intent);
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
Log.e("listener", "收到了");
|
|
|
|
|
Intent intent = new Intent(NewListener.this, NoStrangerDialog.class);
|
|
|
|
|
startActivity(intent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
alertConfirm = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|