react-native-android

WebView should use same cookies as fetch

。_饼干妹妹 提交于 2019-12-10 16:52:59
问题 I have done a sign in to my app using the native fetch API. I now need to load an image, so am loading it in a <WebView> , however the webview is not using the cookies from the fetch API outside of the webview. Is it possible to tell webview to use those cookies? 回答1: You can post a message containing your cookies content to your Webview using postMessage(). You need to get the ref of the Webview then post the message to your webview. let webviewRef = null; const cookiesContent = 'My cookies

react native transform - error couldn't find preset "babel-preset-react-native-stage-0

纵然是瞬间 提交于 2019-12-10 15:29:25
问题 I started ejecting expo, after so much struggle I could able to solve all build issues. When I run the app using 'sudo react-native run-android' I started getting following error Error: The development server returned response code 500 Bundling `index.android.js` [development, non-minified, hmr disabled] 0.0% (0/1), failed. error: bundling failed: "TransformError: /Development/SourceCode/MobileApp/index.android.js: Couldn't find preset \"babel-preset-react-native-stage-0/decorator-support\"

How to create a custom collapsible header in React Native?

。_饼干妹妹 提交于 2019-12-10 14:57:00
问题 Below is a demo screen of what I want to implement. So, what I want to do is that when I swipe up on the green area, I want the yellow area to move up along with it, and also the below blue box area (which is FlatList in my case). When the yellow area is finally hidden, I want the green area to stick at the top of the screen and the user can scroll in the below blue box area. How can I do it with PanResponder and Animated API? As far as I know, it can be done using Interpolation but I'm not

React-Native native-base How to decrease the spacing between card Items?

淺唱寂寞╮ 提交于 2019-12-10 14:16:19
问题 render() { return( <Card style={{ padding: 0 }}> <CardItem listItemPadding={0} header style=styles.Card}> <Text style={styles.cardText}> {this.props.library.title} </Text> </CardItem> </Card> ); } The docs say that listItemPadding can be used but it's not working I have tried to change the padding of to 0 but it's not working either. 回答1: I see that you are trying to use listItemPadding prop which doesn't exist at the moment. ListItem , Card and CardItems , each have some padding or margin of

Bring Android React Native App to Foreground On Receipt of Data Only Firebase Cloud Message

℡╲_俬逩灬. 提交于 2019-12-10 13:58:10
问题 I am successfully using Firebase Cloud Messaging with react-native-firebase to send and receive data only messages between Android devices. When a device receives a message, if the app is in the background or has been killed I would like to bring the app to the foreground. I am getting notifications that will display a console.log() under both circumstances, but I'm having trouble figuring out how to best approach 'waking up' the app / bring it to the foreground: firebase.messaging()

React Native, 'is not usable as a native method argument'

ε祈祈猫儿з 提交于 2019-12-10 13:34:24
问题 I'm new to React Native. While I was developing a native module, I encounter a problem with callbacks. Below is the error message from React Native 02-05 17:43:26.387 32301-32570/com.awesomeproject2 E/ReactNativeJNI: Got JS Exception: Exception calling object as function: abc,function f1() { _ToastExample2.default.show('1111', _ToastExample2.default.SHORT); },72,73 is not usable as a native method argument (<unknown file>:1845) 02-05 17:43:26.387 32301-32570/com.awesomeproject2 E

AutoCompleteTextView in react native compatible with both iOS and Android

核能气质少年 提交于 2019-12-10 13:29:17
问题 I need to implement AutoCompleteTextView in react native. The problem is that there is no such built-in component. All the modules and libraries available to mimic this feature is not completely similar. The main issue is the suggestions are not appearing over the view(like that of select box/picker). Even if it is then it is not behaving perfectly withKeyboardAvoidingView. The whole point is it is not working like native AutoCompleteTextView for Android The other solution is using native UI

How to style a Slider on Android with React Native

半世苍凉 提交于 2019-12-10 12:42:11
问题 I'd like to use a Slider on Android using React Native. Custom tracking images and thumb are iOS only properties, so what are the available options on Android to style the track and the thumb? More specifically I'm looking for a way to change the color of the thumb, the color of min/max track, and their thickness... 回答1: May be too late but will be useful My CustomSlider.js import React, { Component } from 'react'; import { View, TouchableWithoutFeedback, TouchableOpacity, Dimensions, Text,

How can i check app installed in react native code

﹥>﹥吖頭↗ 提交于 2019-12-10 11:12:57
问题 i tried to check other app install in my react native project, I'm used module like: https://www.npmjs.com/package/react-native-check-app-install But always got this error: Cannot read property 'pkgName' of undefined Here is my code: AppInstalledChecker .isAppInstalledAndroid('com.skype.raider') .then((isInstalled) => { // isInstalled is true if the app is installed or false if not console.log('App Skype status: ', isInstalled); }); Anyone can suggest me one way so check app install in react

run-android gives error when connected to a device

半腔热情 提交于 2019-12-10 10:32:49
问题 I added a splash screen,https://medium.com/handlebar-labs/how-to-add-a-splash-screen-to-a-react-native-app-ios-and-android-30a3cec835ae, to the AwesomeProject example to Getting Started ( https://facebook.github.io/react-native/docs/getting-started.html). I connected my nexus 6p and ran react-native run-android and I am getting this error This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html Running /home/Android/Sdk