mirror of
https://git.quad4.io/RNS-Things/MeshChatX.git
synced 2026-10-23 12:32:35 +00:00
feat(MainActivity): add JavaScript interfaces for handling notifications and incoming calls
This commit is contained in:
1 file changed
+20
@@ -1195,6 +1195,26 @@ public class MainActivity extends AppCompatActivity {
|
||||
activity.attachmentPcmRecorder = null;
|
||||
}
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void showNotification(String title, String body) {
|
||||
AndroidNotificationBridge.showInboundMessage(title, body, null);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void showIncomingCallNotification(String callerName) {
|
||||
AndroidNotificationBridge.showIncomingCall(callerName, null);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void showMissedCallNotification(String title, String body) {
|
||||
AndroidNotificationBridge.showMissedCall(title, body, null);
|
||||
}
|
||||
|
||||
@JavascriptInterface
|
||||
public void cancelIncomingCallNotification() {
|
||||
AndroidNotificationBridge.cancelIncomingCallNotification();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user