Answers for "get call log in react native android"

0

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);    }   }
Posted by: Guest on September-27-2021

Code answers related to "get call log in react native android"

Code answers related to "Javascript"

Browse Popular Code Answers by Language