expo

FormData POST request throws Network error

南笙酒味 提交于 2020-01-03 18:45:08
问题 I have a react native app that allows users to upload images to the server along with additional data. I'm using NodeJS and ExpressJS as my backend framework. The route for posting images: router.post("/", checkAuth, upload.single("gallery_item_image"), function (req, res, next) { Branch .findById({ _id: req.body.branch_id }) .exec() .then((doc) => { if(!doc) { return res.status(404).json({ message: "Invalid Branch ID", }) } galleryItem = new GalleryItem({ _id: mongoose.Types.ObjectId(),

Is it actually possible to make Detox/Jest tests pass with a React Native app running with Expo?

我们两清 提交于 2020-01-03 16:53:18
问题 I'm attempting to create an automated UI test suite for my React Native app with Expo. I have looked everywhere for good tutorials but when I get to the actual test writing portion, my tests never even run because of environment issues such as "Unexpected Identifier/Token" on import Icon from... or other stupid issues that I cannot find any tutorials on how to fix them. I literally have spent a week trying to resolve these issues. I am new to React Native and new to Jest/Detox/Expo Here's my

KeyboardAvoidingView works on EXPO but not on APK?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-03 08:26:13
问题 I bought this Theme which in Expo works flawlessly, but as soon as I build the APK, the Keyboard will cover the whole screen and wont work as supposed. I'm using expo for testing and it works just fine. return ( <SafeAreaView style={styles.container}> <NavHeader title={thread.name} {...{navigation}} /> <FlatList inverted data={messages} keyExtractor={message => `${message.date}`} renderItem={({ item }) => ( <Msg message={item} name={item.me ? name : thread.name} picture={thread.picture} /> )}

In Expo, Requiring module “fetch”, threw an exception: ReferenceError: Can't find variable: self

眉间皱痕 提交于 2020-01-02 08:07:42
问题 I have searched across different possible answers, but didn't find any appropriate addressing this specific error. I have mentioned the exact error string in the question title. This error started appearing when I installed fetch npm module in my ReactNative app. This error appears just at the time app is launched/loaded on my phone during development. Before installing fetch , my app was loading correctly on the phone. In windows CLI there is no such error that assist me to resolve the issue

Is Expo Pedometer supported on Android?

拥有回忆 提交于 2019-12-30 11:19:50
问题 I'm setting up a Pedometer app in React Native using Expo, testing the code on my real Samsung s10 device. I am using the Expo Pedometer documentation However, when I use the Pedometer.getStepCountAsync method, I get returned an error "Getting step count for date range is not supported on Android yet." I am trying to make a pedometer app that reads users steps, and then puts them into some visuals for the user but I can't get the steps data. My code is below: it reaches the error => line and

Share extension react native - expo

怎甘沉沦 提交于 2019-12-30 10:13:00
问题 I have created a react-native app using expo. Now I am looking for share-extension to the app to import CSV data from email attachment to my app. I have tried npm package but that does not work for me(I was not able to build my project with that npm package in Xcode) I think react-native or expo does not have any share API In this picture, you can see how he got the option to import data into the app. I understand that without share extension API, I think react-native and Expo both are

Share extension react native - expo

落爺英雄遲暮 提交于 2019-12-30 10:12:06
问题 I have created a react-native app using expo. Now I am looking for share-extension to the app to import CSV data from email attachment to my app. I have tried npm package but that does not work for me(I was not able to build my project with that npm package in Xcode) I think react-native or expo does not have any share API In this picture, you can see how he got the option to import data into the app. I understand that without share extension API, I think react-native and Expo both are

Share extension react native - expo

六月ゝ 毕业季﹏ 提交于 2019-12-30 10:12:05
问题 I have created a react-native app using expo. Now I am looking for share-extension to the app to import CSV data from email attachment to my app. I have tried npm package but that does not work for me(I was not able to build my project with that npm package in Xcode) I think react-native or expo does not have any share API In this picture, you can see how he got the option to import data into the app. I understand that without share extension API, I think react-native and Expo both are

Expo LAN configuration doesn't work for New ReactNative Project

99封情书 提交于 2019-12-30 03:10:27
问题 I have seen similar questions on Stackoverflow but none sorted the problem. I have just created new ReactNative project from Expo desktop app. But I can not run it on my Android phone via QR code scan when Expo configuration is set to LAN mode. Which seems not accessible on my Android phone (looks like). My phone is on same Wifi network. I have also tried to run Expo demo app by turning off Firewalls but still no success. I'm sure your one technical look might soft my issue. Note: The Expo

How can I upload a photo with Expo?

徘徊边缘 提交于 2019-12-29 14:34:10
问题 I'm making an app with Expo and want to let the user take a photo or pick one from their camera roll and upload it to my server. How do I do this? 回答1: Use the Expo ImagePicker API to display either the camera or the camera roll and get back information about the selected image: async function takeAndUploadPhotoAsync() { // Display the camera to the user and wait for them to take a photo or to cancel // the action let result = await ImagePicker.launchCameraAsync({ allowsEditing: true, aspect: