java.lang.numberformatexception null solution code example
Example: java.lang.NumberFormatException: s == null
You can use TextUtils utility method like this,
if (!TextUtils.isEmpty(content_id) && TextUtils.isDigitsOnly(content_id)) {
ids[0] = Integer.parseInt(content_id);
} else {
ids[0] = 0;
}
and while setting content_id you can set like this, content_id = message.getContentId().toString(); instead of content_id.valueOf(message.getContentId().toString()) ;