I've used the Sinch SDK to build a test app that implements basic app-to-app calling, and everything worked perfectly.
I'm now trying to move that work over into a more polished/full featured app but I keep getting an exception when I try to initiate a call:
mSinchClient.getCallClient().callUser(userId);
Here is the stacktrace:
02-23 21:37:57.979 W/System.err(15111): com.sinch.android.rtc.MissingPermissionException: Requires permission: android.permission.RECORD_AUDIO
02-23 21:37:57.979 W/System.err(15111): at com.sinch.android.rtc.internal.client.calling.DefaultCallClient.throwIfMissingPermission(Unknown Source)
02-23 21:37:57.979 W/System.err(15111): at com.sinch.android.rtc.internal.client.calling.DefaultCallClient.call(Unknown Source)
02-23 21:37:57.980 W/System.err(15111): at com.sinch.android.rtc.internal.client.calling.DefaultCallClient.callConference(Unknown Source)
02-23 21:37:57.980 W/System.err(15111): at com.sinch.android.rtc.internal.client.calling.DefaultCallClient.callConference(Unknown Source)
02-23 21:37:57.980 W/System.err(15111): at com.brenthiggins.clickapp.vext.VextingManagerSinchImpl.connectContact(VextingManagerSinchImpl.java:122)
02-23 21:37:57.980 W/System.err(15111): at com.brenthiggins.clickapp.fragments.VextFragment.vextContactIfNecessary(VextFragment.java:97)
02-23 21:37:57.980 W/System.err(15111): at com.brenthiggins.clickapp.fragments.VextFragment.onSpeakingCompleted(VextFragment.java:81)
02-23 21:37:57.980 W/System.err(15111): at com.brenthiggins.clickapp.helpers.TextToSpeechManager.isDone(TextToSpeechManager.java:141)
02-23 21:37:57.980 W/System.err(15111): at com.brenthiggins.clickapp.helpers.TextToSpeechManager.onDone(TextToSpeechManager.java:69)
02-23 21:37:57.980 W/System.err(15111): at android.speech.tts.TextToSpeech$Connection$1.onSuccess(TextToSpeech.java:2108)
02-23 21:37:57.980 W/System.err(15111): at android.speech.tts.ITextToSpeechCallback$Stub.onTransact(ITextToSpeechCallback.java:63)
02-23 21:37:57.980 W/System.err(15111): at android.os.Binder.execTransact(Binder.java:453)
I definitely have the record audio permission:
- I have it in the manifest
- I request it from the user
- It shows up under apps > my app > permissions
- I even used the MediaRecorder to successfully test recording audio from the mic
I also called tried calling
SinchClient.checkManifest()
in SinchClientListener.onClientStarted() and no exception was thrown. However when I using checkManifest() before calling CallClient.callUser(), it fails (ie throws an exception).
Any help would be greatly appreciated! Thank you!