android - IF statement in java doesn't work -
i have code in android app:
@override protected void onprogressupdate(byte[]... values) { if (values.length > 0) { string message = new string(values[0]); boolean isconfig = message.contains("messages"); if (isconfig) { string configfile = message; } else { receivetxt.settext(message); vibrator v = (vibrator)getsystemservice(context.vibrator_service); if (vibrate) { v.vibrate(500); } } } } when i'm stepping through code, pass first if statement, never step second if/else statements. steps on time... ideas why?
thank you
if working fine.the boolean value of isconfig false thats why code flow not stepping second if statement.
check content of values[0] using debugger.
Comments
Post a Comment