Skip to content

gokul1630/expo-telephony

Repository files navigation

Expo Telephony

install

npx expo install expo-telephony

usage

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');

About

Expo package for collection of android Telephony apis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors