Skip to content

Commit

Permalink
v1.2.7; WebCallService.java: show textmode (if given) with contentTex…
Browse files Browse the repository at this point in the history
…t in Andr11+ notification
  • Loading branch information
mehrvarz committed May 8, 2023
1 parent 10e71fb commit 1a485a0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "timur.webcall.callee"
minSdkVersion 21
targetSdkVersion 31
versionCode 115
versionName "1.2.6"
versionCode 116
versionName "1.2.7"
}
signingConfigs {
release {
Expand Down
7 changes: 7 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/116.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
WebCall for Android
Latest info: https://timur.mobi/webcall/update/

Release notes v1.2.7:
- Support for secure e2ee text messaging
- Fixed minor issue related to wsOnOpen() reconnect

13 changes: 11 additions & 2 deletions src/main/java/timur/webcall/callee/WebCallService.java
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ public class WebCallService extends Service {
private static volatile boolean calleeIsReady = false;
private static volatile boolean stopSelfFlag = false;
private static volatile boolean ringFlag = false;
private static volatile String textmode = "";

private volatile WebView myWebView = null;
private volatile WebCallJSInterface webCallJSInterface = new WebCallJSInterface();
Expand Down Expand Up @@ -2496,6 +2497,11 @@ public void onMessage(String message) {
return;
}

if(message.startsWith("textmode|")) {
textmode = message.substring(9);
Log.d(TAG,"onMessage textmode "+message);
}

if(message.startsWith("callerOffer|") && Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
// incoming call!!
// for Android <= 9: wake activity via wakeIntent
Expand Down Expand Up @@ -2543,12 +2549,15 @@ public void onMessage(String message) {
}
}
}
Log.d(TAG,"onMessage incoming call name="+callerName+" ID="+callerID+" txtMsg="+txtMsg);

String contentText = callerName+" "+callerID;
if(textmode.equals("true")) { // set by signalingCommand()
contentText += " TextMode ";
}
if(txtMsg!="") {
contentText += " \""+txtMsg+"\"";
contentText += " \""+txtMsg+"\""; // greeting msg
}
Log.d(TAG,"onMessage incoming call: "+contentText);

if(context==null) {
Log.e(TAG,"onMessage incoming call, but no context to wake activity");
Expand Down

0 comments on commit 1a485a0

Please sign in to comment.