expo-telephony
v0.1.1
Published
expo package for android telephony framework apis
Downloads
4
Maintainers
Readme
Expo Telephony
install
npx expo install expo-telephonyusage
Note: this library requires SMS, Phone & Call-logs permissions to work.
// Must call this method otherwise you won't receive any events for missed calls
ExpoTelephony.startListening();
ExpoTelephony.addListener('onReceiveSMS', (data) => {
console.log(data.body, data.sender, data.simIndex);
// implement your code
});
ExpoTelephony.addListener('onMissedCall', (data) => {
console.log(data.phoneNumber);
// implement your code
});
// cleanup
ExpoTelephony.stopListening();
ExpoTelephony.removeAllListeners('onMissedCall');
ExpoTelephony.removeAllListeners('onReceiveSMS');