react-native-webrtc / react-native-webrtc/react-native-callkeep
Android app is not redirecting to phone account settings
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 511
- Avg merge
- 9h 12m
- Merged PRs (30d)
- 2
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-native-callkeep@4.3.8 for the project I'm working on.
I was working on integrating the connection service call feature into an Android app. However, I encountered an issue where the Android app was not properly redirecting to the phone account handle, and instead, it remained in the calling accounts
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java b/node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java
index 82b173d..7ba5f6e 100644
--- a/node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java
+++ b/node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java
@@ -841,23 +841,23 @@ public class RNCallKeepModule extends ReactContextBaseJavaModule {
return;
}
- if (Build.MANUFACTURER.equalsIgnoreCase("Samsung") || Build.MANUFACTURER.equalsIgnoreCase("OnePlus")) {
- Intent intent = new Intent();
- intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
- intent.setComponent(new ComponentName("com.android.server.telecom",
- "com.android.server.telecom.settings.EnableAccountPreferenceActivity"));
- Context context = this.getAppContext();
- if (context == null) {
- Log.w(TAG, "[RNCallKeepModule][openPhoneAccounts] no react context found.");
- return;
- }
+ //if (Build.MANUFACTURER.equalsIgnoreCase("Samsung") || Build.MANUFACTURER.equalsIgnoreCase("OnePlus") || Build.MANUFACTURER.equalsIgnoreCase("Google")) {
+ Intent intent = new Intent();
+ intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
+ intent.setComponent(new ComponentName("com.android.server.telecom",
+ "com.android.server.telecom.settings.EnableAccountPreferenceActivity"));
- context.startActivity(intent);
+ Context context = this.getAppContext();
+ if (context == null) {
+ Log.w(TAG, "[RNCallKeepModule][openPhoneAccounts] no react context found.");
return;
}
- openPhoneAccountSettings();
+ context.startActivity(intent);
+ return;
+
+ //openPhoneAccountSettings();
}
@ReactMethod
This issue body was partially generated by patch-package.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java and inspect the openPhoneAccounts method, including the platform-specific branch and the reported patch. Reproduce the Android connection-service flow and verify that opening phone account settings reaches the phone account handle instead of remaining in calling accounts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java, react-native
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100