protected String[] getTagGroups() throws ServiceException, StatusException {
String[] groupNames = null;
NodeId nodeId = new NodeId(2, "TagGroups");
DataValue value = client.readValue(nodeId);
groupNames = (String[])value.getValue().getValue();
return groupNames;
}
MainActivity.java 파일에 위와 같은 소스가 있다고 치고
onCreate나 onResume시에 위 구문을 실행해서 리턴받은 값을 Toast로 찍어줄려면
어떻게 하면 되나요?
onResume 구간 안쪽에
String[] str_groupTags = getTagGroups();
Toast.makeText(MainActivity.this, str_groupTags, Toast.LENGTH_SHORT).show();
대충 이런식으로 넣어봤는데, 이건 뭐 그냥 구문 자체가 에러라고 나오네요.