I have 2 variables inside Object object, when I print it using toString() it showed me {"name"="some_name","phone"="some_phone"} , is it possible to convert that object into string[0] = name and string[1]=phone?
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
Object object = listView.getItemAtPosition(position);
}
});
getItemAtPositionreturns anObjectso what is the actual data type of your dataString[0] = (String) object.name;?Objectclass doesn't have anamefield so error