Fix upload/download arrow
and add parse for unread messages (voice mail)
This commit is contained in:
parent
9aefffa3de
commit
06073e1c95
2 changed files with 8 additions and 4 deletions
|
@ -358,6 +358,7 @@
|
|||
<string name="pref_rfc2833_dtmf">Send RFC2833 DTMFs</string>
|
||||
<string name="pref_sipinfo_dtmf">Send SIP INFO DTMFs</string>
|
||||
<string name="pref_voice_mail">Voice mail uri</string>
|
||||
<string name="voicemail_unread"> unread messages</string>
|
||||
<string name="error_call_declined">Call declined</string>
|
||||
<string name="error_user_not_found">User not found</string>
|
||||
<string name="error_incompatible_media">Incompatible media parameters</string>
|
||||
|
|
|
@ -147,15 +147,18 @@ public class StatusFragment extends Fragment {
|
|||
public void notifyReceived(LinphoneCore lc, LinphoneEvent ev, String eventName, LinphoneContent content) {
|
||||
|
||||
if(!content.getType().equals("application")) return;
|
||||
if(!content.getSubtype().equals("imple-message-summary")) return;
|
||||
if(!content.getSubtype().equals("simple-message-summary")) return;
|
||||
|
||||
if (content.getData() == null) return;
|
||||
|
||||
//TODO Parse
|
||||
int unreadCount = -1;
|
||||
String data = content.getDataAsString();
|
||||
String[] voiceMail = data.split("voice-message: ");
|
||||
final String[] intToParse = voiceMail[1].split("/",0);
|
||||
|
||||
unreadCount = Integer.parseInt(intToParse[0]);
|
||||
if (unreadCount > 0) {
|
||||
voicemailCount.setText(unreadCount + " unread messages");
|
||||
voicemailCount.setText(unreadCount + " " + getResources().getString(R.string.voicemail_unread));
|
||||
voicemailCount.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
voicemailCount.setVisibility(View.GONE);
|
||||
|
@ -517,7 +520,7 @@ public class StatusFragment extends Fragment {
|
|||
ice.setText(videoStats.getIceState().toString());
|
||||
|
||||
videoResolutionLayout.setVisibility(View.VISIBLE);
|
||||
videoResolution.setText("<EFBFBD><EFBFBD><EFBFBD> " + params.getSentVideoSize().toDisplayableString() + " / <EFBFBD><EFBFBD><EFBFBD> " + params.getReceivedVideoSize().toDisplayableString());
|
||||
videoResolution.setText("\u2191 " + params.getSentVideoSize().toDisplayableString() + " / \u2193 " + params.getReceivedVideoSize().toDisplayableString());
|
||||
}
|
||||
} else {
|
||||
final LinphoneCallStats audioStats = call.getAudioStats();
|
||||
|
|
Loading…
Reference in a new issue