Open ahsanparacha02 opened 4 years ago
Hi, can you provide some more details/logs ?
Hi, can you provide some more details/logs ? when i call start recording i m getting this error
You need to add permissions
Please follow this docs https://developer.android.com/guide/topics/media/mediarecorder
You need to add permissions
Please follow this docs https://developer.android.com/guide/topics/media/mediarecorder
permission already added
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" `/>```
You need to ask for permissions before recording, its not part of the library
You need to ask for permissions before recording, its not part of the library
i give permission manually now i got this error
const _handleOnRecording = async () => { if (recording) { setRecording(false); const res = await RecordScreen.stopRecording().catch((error) => console.warn(error), ); console.log('res', res); if (res) { setUri(res.result.outputURL); } } else { setUri(''); setRecording(true); await RecordScreen.startRecording().catch((error) => { console.warn(error); setRecording(false); setUri(''); }); } };
You will have to run it from android studio to see native errors in the log, cant say much from this.
You will have to run it from android studio to see native errors in the log, cant say much from this.
Try to ask for audio permissions before
await PermissionsAndroid.request(
PermissionsAndroid.PERMISSIONS.RECORD_AUDIO,
{
title: 'App audio Permission',
message:
'App needs access to your camera ',
buttonNeutral: 'Ask Me Later',
buttonNegative: 'Cancel',
buttonPositive: 'OK'
}
)
Try to ask for audio permissions before
await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.RECORD_AUDIO, { title: 'App audio Permission', message: 'App needs access to your camera ', buttonNeutral: 'Ask Me Later', buttonNegative: 'Cancel', buttonPositive: 'OK' } )
still same error, i think the issue is with startRecording method
What version of Android do you have?
Try to ask for audio permissions before
await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.RECORD_AUDIO, { title: 'App audio Permission', message: 'App needs access to your camera ', buttonNeutral: 'Ask Me Later', buttonNegative: 'Cancel', buttonPositive: 'OK' } )
still same error
What version of Android do you have?
3.5.3
I mean operating system version
I mean operating system version
AVD Pixel_C_API_28
Are you testing this in emulator? I think you have to use real device for screen recording
Are you testing this in emulator? I think you have to use real device for screen recording
ok let me check on real device and also on ios i m getting error while install pod [!] CocoaPods could not find compatible versions for pod "react-native-screen-recorder":
No idea about ios, it should install from node modules, maybe try to update cocoa pods cache
aybe try to update cocoa pods cache
i m getting same error on real device as well
Running out of ideas, anything else in the logs which may be interesting?
@ahsanparacha02 It might have been related with Android 10. There is a new release with fix.
when i start recording on android it automatically stop after sec and video not save on phone memory, and on ios side i got exception when i start recoding "Recording not active". please help me to fixed this issue