Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call requires permission which may be rejected by user #646

Open
2 of 3 tasks
SamuelScheit opened this issue Jan 2, 2023 · 2 comments · May be fixed by #684
Open
2 of 3 tasks

Call requires permission which may be rejected by user #646

SamuelScheit opened this issue Jan 2, 2023 · 2 comments · May be fixed by #684

Comments

@SamuelScheit
Copy link

Bug report

  • I've checked the example to reproduce the issue.

  • Reproduced on:

  • Android

  • iOS

Description

Building the project with react-native-callkeep fails on android

Steps to Reproduce

Android Manifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="app.trant"
	android:exported="true" xmlns:tools="http://schemas.android.com/tools">

	<uses-permission android:name="android.permission.INTERNET" />
	<uses-permission android:name="android.permission.CAMERA" />
	<uses-permission android:name="android.permission.MICROPHONE" />
	<uses-permission android:name="android.permission.RECORD_AUDIO" />
	<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
	<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
	<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
	<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
	<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
	<uses-permission android:name="android.permission.READ_CONTACTS" />
	<uses-permission android:name="android.permission.WRITE_CONTACTS" />
	<uses-permission android:name="android.permission.READ_CALL_LOG" />
	<uses-permission android:name="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
		tools:ignore="ProtectedPermissions" />
	<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
	<uses-permission android:name="android.permission.READ_PHONE_STATE" />
	<uses-permission android:name="android.permission.CALL_PHONE" />
	<uses-permission android:name="android.permission.READ_CALL_LOG" />
	<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
	<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
	<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />

	<uses-feature android:name="android.hardware.camera" />
	<uses-feature android:name="android.hardware.camera.autofocus" />
	<uses-feature android:name="android.hardware.audio.output" />
	<uses-feature android:name="android.hardware.microphone" />


	<application android:usesCleartextTraffic="true" android:name=".MainApplication"
		android:label="@string/app_name" android:icon="@mipmap/ic_launcher"
		android:allowBackup="false" android:theme="@style/AppTheme">
		<activity android:exported="true" android:name=".MainActivity"
			android:label="@string/app_name"
			android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
			android:launchMode="singleTask" android:windowSoftInputMode="adjustResize">
			<intent-filter>
				<action android:name="android.intent.action.MAIN" />
				<category android:name="android.intent.category.LAUNCHER" />
				<action android:name="android.telecom.ConnectionService" />

			</intent-filter>
		</activity>
		<service android:exported="true"
			android:name="io.wazo.callkeep.RNCallKeepBackgroundMessagingService" />
		<service android:exported="true" android:name="io.wazo.callkeep.VoiceConnectionService"
			android:label="Wazo"
			android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
			android:foregroundServiceType="camera|microphone">

			<intent-filter>
				<action android:name="android.telecom.ConnectionService" />
			</intent-filter>
		</service>
	</application>
</manifest>

Versions

- Callkeep: 4.3.3
- React Native: 0.70.6
- Android: 12.0.0

Logs

/node_modules/react-native-callkeep/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java:367: Error: Call requires permission which may be rejected by user: code should explicitly check to see if permission is available (with checkPermission) or explicitly handle a potential SecurityException [MissingPermission]
        telecomManager.placeCall(uri, extras);
@Dharmanath
Copy link

Same issue

ramijarrar added a commit to avorra/react-native-callkeep that referenced this issue Apr 15, 2023
- Add redundant handling for mission permission exceptions. Existing checks work but do not satisfy lint, so this is the only way to resolve react-native-webrtc#646.

- Upgrade gradle to maximum compatible version (3.6.4) to satisfy new minimum (3.2.0).

- Replace use of deprecated API methods and constants.

- Increase android minSdk version to 27 (to use Activity.setShowWhenLocked/setTurnScreenOn).
ramijarrar added a commit to avorra/react-native-callkeep that referenced this issue Apr 15, 2023
- Add redundant handling for missing permission exceptions. Existing checks work but do not satisfy lint, so this is the only way to resolve react-native-webrtc#646.

- Upgrade gradle to maximum compatible version (3.6.4) to satisfy new minimum (3.2.0).

- Replace use of deprecated API methods and constants.

- Increase android minSdk version to 27 (to use Activity.setShowWhenLocked/setTurnScreenOn).
@ramijarrar ramijarrar linked a pull request Apr 15, 2023 that will close this issue
ramijarrar added a commit to avorra/react-native-callkeep that referenced this issue Jun 6, 2023
- Add redundant handling for missing permission exceptions. Existing checks work but do not satisfy lint, so this is the only way to resolve react-native-webrtc#646.

- Upgrade gradle to maximum compatible version (3.6.4) to satisfy new minimum (3.2.0).

- Replace use of deprecated API methods and constants.

- Increase android minSdk version to 27 (to use Activity.setShowWhenLocked/setTurnScreenOn).
ramijarrar added a commit to avorra/react-native-callkeep that referenced this issue Oct 31, 2023
- Add redundant handling for missing permission exceptions. Existing checks work but do not satisfy lint, so this is the only way to resolve react-native-webrtc#646.

- Upgrade gradle to maximum compatible version (3.6.4) to satisfy new minimum (3.2.0).

- Replace use of deprecated API methods and constants.

- Increase android minSdk version to 27 (to use Activity.setShowWhenLocked/setTurnScreenOn).
ramijarrar added a commit to avorra/react-native-callkeep that referenced this issue Oct 31, 2023
- Add redundant handling for missing permission exceptions. Existing checks work but
  do not satisfy lint, so this is the only way to resolve react-native-webrtc#646

- Upgrade gradle to maximum compatible version (3.6.4) to satisfy new minimum (3.2.0)

- Use AudioManager.MODE_NORMAL constant explicitly (instead of the equivalent value of
  "0" currently being used) to satisfy lint

- Replace deprecated WindowManager.LayoutParams constants with Activity API methods
  when using Android SDK v27+
ramijarrar added a commit to avorra/react-native-callkeep that referenced this issue Oct 31, 2023
- Add redundant handling for missing permission exceptions. Existing checks work but
  do not satisfy lint, so this is the only way to resolve react-native-webrtc#646

- Upgrade gradle to maximum compatible version (3.6.4) to satisfy new minimum (3.2.0)

- Use AudioManager.MODE_NORMAL constant explicitly (instead of the equivalent value of
  "0" currently being used) to satisfy lint

- Replace deprecated WindowManager.LayoutParams constants with Activity API methods
  when using Android SDK v27+
ramijarrar added a commit to avorra/react-native-callkeep that referenced this issue Oct 31, 2023
- Add redundant handling for missing permission exceptions. Existing checks work but
  do not satisfy lint, so this is the only way to resolve react-native-webrtc#646

- Upgrade gradle to maximum compatible version (3.6.4) to satisfy new minimum (3.2.0)

- Use AudioManager.MODE_NORMAL constant explicitly (instead of the equivalent value of
  "0" currently being used) to satisfy lint

- Replace deprecated WindowManager.LayoutParams constants with Activity API methods
  when using Android SDK v27+
ramijarrar added a commit to avorra/react-native-callkeep that referenced this issue Oct 31, 2023
- Add redundant handling for missing permission exceptions. Existing checks work but
  do not satisfy lint, so this is the only way to resolve react-native-webrtc#646

- Upgrade gradle to maximum compatible version (3.6.4) to satisfy new minimum (3.2.0)

- Use AudioManager.MODE_NORMAL constant explicitly (instead of the equivalent value of
  "0" currently being used) to satisfy lint

- Replace deprecated WindowManager.LayoutParams constants with Activity API methods
  when using Android SDK v27+
ramijarrar added a commit to avorra/react-native-callkeep that referenced this issue Oct 31, 2023
- Add redundant handling for missing permission exceptions. Existing checks work but
  do not satisfy lint, so this is the only way to resolve react-native-webrtc#646

- Upgrade gradle to maximum compatible version (3.6.4) to satisfy new minimum (3.2.0)

- Use AudioManager.MODE_NORMAL constant explicitly (instead of the equivalent value of
  "0" currently being used) to satisfy lint

- Replace deprecated WindowManager.LayoutParams constants with Activity API methods
  when using Android SDK v27+
ramijarrar added a commit to avorra/react-native-callkeep that referenced this issue Oct 31, 2023
- Add redundant handling for missing permission exceptions. Existing checks work but
  do not satisfy lint, so this is the only way to resolve react-native-webrtc#646

- Upgrade gradle to maximum compatible version (3.6.4) to satisfy new minimum (3.2.0)

- Use AudioManager.MODE_NORMAL constant explicitly (instead of the equivalent value of
  "0" currently being used) to satisfy lint

- Replace deprecated WindowManager.LayoutParams constants with Activity API methods
  when using Android SDK v27+
@ngochoang-dev
Copy link

I'm facing the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants