Fix comments and send again. https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... File spfaq/src/app/shoppoke/faq/receiver/PhoneCallReceiver.java (right): https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... spfaq/src/app/shoppoke/faq/receiver/PhoneCallReceiver.java:34: private Context pcontext; pcontext => context https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... spfaq/src/app/shoppoke/faq/receiver/PhoneCallReceiver.java:44: if (state == 1 && !StringUtil.isNullOrEmpty(storephone.phone) && !StringUtil.isNullOrEmpty(storephone.phone) && (storephone.phone).equals(incomingNum these 2 conditions are totally unnecessary. if state ==1 should be the first line in this code. https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... spfaq/src/app/shoppoke/faq/receiver/PhoneCallReceiver.java:56: notificationHelper.buildNotification(); if (sro == null) { return; } move this conditional check inside notificationHelper.buildNotification() https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... File spfaq/src/app/shoppoke/faq/receiver/SmsReceiver.java (right): https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... spfaq/src/app/shoppoke/faq/receiver/SmsReceiver.java:13: final SmsManager sms = SmsManager.getDefault(); this is not used anywhere? https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... spfaq/src/app/shoppoke/faq/receiver/SmsReceiver.java:39: SmsReceiverHandler smsReceiverHandler = new SmsReceiverHandler( SmsReceiverHandler smsReceiverHandler = new SmsReceiverHandler( 40 context); 41 smsReceiverHandler.request(shortcode); move this also inside try/catch block. https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... File spfaq/src/app/shoppoke/faq/receiver/SmsReceiverHandler.java (right): https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... spfaq/src/app/shoppoke/faq/receiver/SmsReceiverHandler.java:29: if (item == null) { remove this null if check.
fix comments and send it again.
Fixes https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... File spfaq/src/app/shoppoke/faq/receiver/PhoneCallReceiver.java (right): https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... spfaq/src/app/shoppoke/faq/receiver/PhoneCallReceiver.java:34: private Context pcontext; On 2014/04/23 06:58:07, mail2coolgarg wrote: > pcontext => context Done. https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... spfaq/src/app/shoppoke/faq/receiver/PhoneCallReceiver.java:44: if (state == 1 && !StringUtil.isNullOrEmpty(storephone.phone) On 2014/04/23 06:58:07, mail2coolgarg wrote: > && !StringUtil.isNullOrEmpty(storephone.phone) && > (storephone.phone).equals(incomingNum > > these 2 conditions are totally unnecessary. > > if state ==1 should be the first line in this code. >> have used if(storePhone !=null) condition after if state == 1 as if the db return null as in case the mobile no does not exist in the DB it should handle that . https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... spfaq/src/app/shoppoke/faq/receiver/PhoneCallReceiver.java:56: notificationHelper.buildNotification(); On 2014/04/23 06:58:07, mail2coolgarg wrote: > if (sro == null) { > return; } > > move this conditional check inside notificationHelper.buildNotification() Done. https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... File spfaq/src/app/shoppoke/faq/receiver/SmsReceiver.java (right): https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... spfaq/src/app/shoppoke/faq/receiver/SmsReceiver.java:13: final SmsManager sms = SmsManager.getDefault(); On 2014/04/23 06:58:07, mail2coolgarg wrote: > this is not used anywhere? Done. https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... spfaq/src/app/shoppoke/faq/receiver/SmsReceiver.java:39: SmsReceiverHandler smsReceiverHandler = new SmsReceiverHandler( On 2014/04/23 06:58:07, mail2coolgarg wrote: > SmsReceiverHandler smsReceiverHandler = new SmsReceiverHandler( > 40 context); > 41 smsReceiverHandler.request(shortcode); > > move this also inside try/catch block. Done. https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... File spfaq/src/app/shoppoke/faq/receiver/SmsReceiverHandler.java (right): https://codereview.appspot.com/90520043/diff/1/spfaq/src/app/shoppoke/faq/rec... spfaq/src/app/shoppoke/faq/receiver/SmsReceiverHandler.java:29: if (item == null) { On 2014/04/23 06:58:07, mail2coolgarg wrote: > remove this null if check. Done.
1 minor comment, fix and commit. https://codereview.appspot.com/90520043/diff/20001/spfaq/src/app/shoppoke/faq... File spfaq/src/app/shoppoke/faq/receiver/SmsReceiver.java (right): https://codereview.appspot.com/90520043/diff/20001/spfaq/src/app/shoppoke/faq... spfaq/src/app/shoppoke/faq/receiver/SmsReceiver.java:31: SmsReceiverHandler smsReceiverHandler = new SmsReceiverHandler( these 2 lines can be moved inside if block.