broadcastreceiver - Android Error receiving broadcast Intent { act=Take_Message flg=0x10 (has extras) } -


below there broadcastreceiver code i'm getting error:

 public class messagereceiver extends broadcastreceiver {              @override             public void onreceive(context context, intent intent) {                 bundle = intent.getextras();                 string username = extra.getstring(messageinfo.userid);                 string message = extra.getstring(messageinfo.messagetext);                  if (username != null && message != null) {                     if (friend.username.equals(username)) {                         myarray.add(username + ":" + "\n" + message);                         adapter.notifydatasetchanged();                         localstoragehandler.insert(username,                                 imservice.getusername(), message);                      } else {                         if (message.length() > 15) {                             message = message.substring(0, 15);                         }                         toast.maketext(messaging.this,                                 username + " says '" + message + "'",                                 toast.length_short).show();                     }                 }             }          }; 

logcat message :

java.lang.runtimeexception: error receiving broadcast intent { act=take_message flg=0x10 (has extras) } in com.android.app.messaging$messagereceiver@535d151c


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -