get call log in react native android
import { PermissionsAndroid } from 'react-native';import CallLogs from 'react-native-call-log' componentDidMount = async() => { try { const granted = await PermissionsAndroid.request( PermissionsAndroid.PERMISSIONS.READ_CALL_LOG, { title: 'Call Log Example', message: 'Access your call logs', buttonNeutral: 'Ask Me Later', buttonNegative: 'Cancel', buttonPositive: 'OK', } ) if (granted === PermissionsAndroid.RESULTS.GRANTED) { console.log(CallLogs); CallLogs.load(5).then(c => console.log(c)); } else { console.log('Call Log permission denied'); } } catch (e) { console.log(e); } }