Android regarding number format exception [duplicate]

Parse the string into int. You can use split method as from documentation to parse each value separated by comma.

if(!yourData.isEmpty()){
    String[] result = yourData.split(",");
    int varOne = Integer.parseInt(result[0]);
    int varTwo = Integer.parseInt(result[1]);
}

Leave a Comment