From 73662334ab1c66f78832eea9ad112bf291783e1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Krafft?= Date: Thu, 20 Sep 2018 12:01:06 +0200 Subject: [PATCH] Dynamic permission to allow multiple application to use jitsi-meet on the same mobile --- .../main/java/com/reactnativejitsimeet/JitsiMeetModule.java | 2 +- .../com/reactnativejitsimeet/JitsiMeetNavigatorActivity.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/android/src/main/java/com/reactnativejitsimeet/JitsiMeetModule.java b/android/src/main/java/com/reactnativejitsimeet/JitsiMeetModule.java index 961bd83e..39c59d78 100644 --- a/android/src/main/java/com/reactnativejitsimeet/JitsiMeetModule.java +++ b/android/src/main/java/com/reactnativejitsimeet/JitsiMeetModule.java @@ -36,7 +36,7 @@ public void initialize() { filter.addAction("CONFERENCE_WILL_JOIN"); filter.addAction("CONFERENCE_WILL_LEAVE"); filter.addAction("LOAD_CONFIG_ERROR"); - context.getCurrentActivity().registerReceiver(receiver, filter, "com.reactnativejitsimeet.permission.JITSI_BROADCAST", null); + context.getCurrentActivity().registerReceiver(receiver, filter, context.getPackageName() + ".permission.JITSI_BROADCAST", null); } @ReactMethod diff --git a/android/src/main/java/com/reactnativejitsimeet/JitsiMeetNavigatorActivity.java b/android/src/main/java/com/reactnativejitsimeet/JitsiMeetNavigatorActivity.java index b4f81ec9..4358c6d6 100644 --- a/android/src/main/java/com/reactnativejitsimeet/JitsiMeetNavigatorActivity.java +++ b/android/src/main/java/com/reactnativejitsimeet/JitsiMeetNavigatorActivity.java @@ -16,7 +16,6 @@ public class JitsiMeetNavigatorActivity extends AppCompatActivity implements JitsiMeetViewListener{ private JitsiMeetView view; - private String JITSI_BROADCAST = "com.reactnativejitsimeet.permission.JITSI_BROADCAST"; @Override public void onBackPressed() { @@ -79,7 +78,7 @@ private void on(String name, Map data) { + data); Intent intent = new Intent(name); intent.putExtra("data", (HashMap) data); - sendBroadcast(intent, JITSI_BROADCAST); + sendBroadcast(intent, getApplication().getPackageName() + ".permission.JITSI_BROADCAST"); } public void onConferenceFailed(Map data) {