I have a String which goes like this in my logcat
24:John Smith
Contact Number: 999999999
Customer Address: Texas 47
Store: Subway
Time Frame: 4:00pm - 5:00pm
Request: One sandwhich
SMS ID: 2493
Job Submitted at: 2015-03-14 18:27:45
And I assigned the SMS ID to a String variable smsCode with the following code:
smsCode = str.split("SMS ID: ")[1].split("Job Submitted at: ")[0];
And in my logcat it shows that smsCode is equals to 2493
However when I pass the variable to PHP it doesn't work. It could be due to the spacing. I have used smsCode.trim() and it doesn't work as well.
It works if I put in the real value without variable:
nameValuePairs.add(new BasicNameValuePair("smsCode", "2493"));
It doesn't when its the variable as below.
nameValuePairs.add(new BasicNameValuePair("smsCode", smsCode));