# HG changeset patch # User Da Risk # Date 1293382403 -3600 # Node ID 84cc7ee4b0678b80eecf3c9418f75877d41a3ea5 # Parent 8005cd552571be3a887f3af45f2cba2f19ddd9ef# Parent 696b2880c994b516a3ac5dfc1de4f80802500d58 merge diff -r 696b2880c994 -r 84cc7ee4b067 src/com/beem/project/beem/service/BeemChatManager.java --- a/src/com/beem/project/beem/service/BeemChatManager.java Tue Dec 21 23:50:59 2010 +0100 +++ b/src/com/beem/project/beem/service/BeemChatManager.java Sun Dec 26 17:53:23 2010 +0100 @@ -271,7 +271,7 @@ * Set a notification of a new chat. * @param chat The chat to access by the notification */ - private void notifyNewChat(IChat chat) { + private void notifyNewChat(IChat chat, String msgBody) { SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(mService); try { CharSequence tickerText = mService.getBind().getRoster().getContact(chat.getParticipant().getJID()) @@ -279,8 +279,7 @@ Notification notification = new Notification(android.R.drawable.stat_notify_chat, tickerText, System .currentTimeMillis()); notification.flags = Notification.FLAG_AUTO_CANCEL; - notification.setLatestEventInfo(mService, tickerText, mService - .getString(R.string.BeemChatManagerNewMessage), makeChatIntent(chat)); + notification.setLatestEventInfo(mService, tickerText, msgBody, makeChatIntent(chat)); mService.sendNotification(chat.getParticipant().getJID().hashCode(), notification); } catch (RemoteException e) { Log.e(TAG, e.getMessage()); @@ -293,11 +292,12 @@ @Override public void processMessage(final IChat chat, Message message) { try { - if (!chat.isOpen() && message.getBody() != null) { + String body = message.getBody(); + if (!chat.isOpen() && body != null) { if (chat instanceof ChatAdapter) { mChats.put(chat.getParticipant().getJID(), (ChatAdapter) chat); } - notifyNewChat(chat); + notifyNewChat(chat, body); } } catch (RemoteException e) { Log.e(TAG, e.getMessage());