Reputation: 335
How to read messages on Expo managed project?
i am working on react native project managed by expo. i want to read messages from the devices. how can i get access to messages?
i came across some packages but did not find any legit one. So is there a package which can work on expo?
{
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject"
},
"dependencies": {
"@react-native-community/masked-view": "0.1.10",
"@react-native-community/netinfo": "5.9.2",
"@react-navigation/bottom-tabs": "^5.8.0",
"@react-navigation/material-top-tabs": "^5.2.16",
"@react-navigation/native": "^5.7.3",
"@react-navigation/stack": "^5.9.0",
"axios": "^0.20.0",
"expo": "~38.0.8",
"expo-camera": "~8.3.1",
"expo-file-system": "~9.0.1",
"expo-font": "~8.2.1",
"expo-linear-gradient": "~8.2.1",
"expo-sms": "~8.2.1",
"expo-sqlite": "~8.2.1",
"expo-status-bar": "^1.0.2",
"firebase": "7.9.0",
"formik": "^2.1.5",
"react": "~16.11.0",
"react-dom": "~16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native-gesture-handler": "~1.6.0",
"react-native-reanimated": "~1.9.0",
"react-native-safe-area-context": "~3.0.7",
"react-native-screens": "~2.9.0",
"react-native-tab-view": "^2.15.1",
"react-native-vector-icons": "^7.0.0",
"react-native-web": "~0.11.7",
"react-redux": "^7.2.1",
"redux": "^4.0.5",
"redux-thunk": "^2.3.0",
"yup": "^0.29.3"
},
"devDependencies": {
"@babel/core": "^7.8.6",
"babel-preset-expo": "~8.1.0"
},
"private": true
}
Upvotes: 2
Views: 5789
Reputation: 897
React Native doesn't provide any API to consume out of the box.
Expo also, doesn't expose any API.
I have created a library to use in Expo: https://www.npmjs.com/package/@maniac-tech/react-native-expo-read-sms
The purpose is to read the incoming SMS
Upvotes: 2
Reputation: 335
I have researched enough but there is not any support for reading messages in expo. We can send messages with expo-sms but we cant read and receive messages on expo.
So if you are using expo and want to use this native feature then you have to eject project from expo. And then you can use some library like react-native-get-sms-android to read and send SMS. i have used it in my project and works absolutely fine.
Upvotes: 0