About smartROS Example
개발자는 smartRosActivity를 상속받아 Block Description을 구현 할 수 있다.
소스 다운로드
https://bitbucket.org/isans/smartros/downloads
public class MainActivity extends smartRosActivity {
public MainActivity(){
super("Empty Node");
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
moveTaskToBack(true); // turn background task
}
@Override
protected void onNewMessage(String s) {
String [] parts = s.split("/");
Log.d("test", s);
switch(parts[1]) {
case "em_send_message":
sendRespMessage(String.format("em_get_message %sn", parts[2]));
break;
}
}
} Take developers can implement inherited smartRosActivity Block Description.
Download source
https://bitbucket.org/isans/smartros/downloads
public class MainActivity extends smartRosActivity {
public MainActivity () {
super ("Empty Node");
}
Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
setContentView (R.layout.activity_main);
moveTaskToBack (true); // Turn background task
}
Override
protected void onNewMessage (String s) {
String [] parts = s.split ("/");
Log.d ("test", s);
switch (parts [1]) {
case "em_send_message":
sendRespMessage (String.format ("em_get_message% s n", parts [2]));
break;
}
}
}
Download and install
smartROS Example version 0.6.0.1 on your
Android device!
Downloaded 10+ times, content rating: Everyone
Android package:
com.isans.smartros.empty, download smartROS Example.apk