react-native-barcode-builder
react-native-barcode-builder copied to clipboard
Barcode not showing on Android but showing on iOS
I think this is a problem with ARTLib, but I don't know how to solve this
<BarCode value={barCode} format="EAN13" height={150} width={2.5} flat fontSize={theme.typography.body1.fontSize} />
Hi Team,
I am also facing same issue. In android mobile device no barcode is getting displayed. I installed react-native-svg still nothing workied. Do we need any more settings to be made in Android specifically.
Kindly provide some solution
Use below code to identify the foreground event and refresh your data.
import React, { Component } from "react"; import { AppState, StyleSheet, Text, View } from "react-native";
class AppStateExample extends Component { state = { appState: AppState.currentState };
componentDidMount() { AppState.addEventListener("change", this._handleAppStateChange); }
componentWillUnmount() { AppState.removeEventListener("change", this._handleAppStateChange); }
_handleAppStateChange = nextAppState => { if ( this.state.appState.match(/inactive|background/) && nextAppState === "active" ) { console.log("App has come to the foreground!"); } this.setState({ appState: nextAppState }); };
render() { return ( <View style={styles.container}> <Text>Current state is: {this.state.appState}</Text> </View> ); } }
const styles = StyleSheet.create({ container: { flex: 1, justifyContent: "center", alignItems: "center" } });
export default AppStateExample;
hi team,
am facing same issue
<Barcode background={"#FF0000"} lineColor={"#00FF00"} format="CODE128" value={345678} />
barcode showing in iOS but not in android.