react-native-barcode-builder icon indicating copy to clipboard operation
react-native-barcode-builder copied to clipboard

Barcode not showing on Android but showing on iOS

Open zausailov opened this issue 5 years ago • 3 comments

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} />

zausailov avatar Jun 11 '19 09:06 zausailov

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

NKGS avatar Jun 25 '19 05:06 NKGS

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;

SahanDll avatar Jul 16 '20 10:07 SahanDll

hi team,

am facing same issue

<Barcode background={"#FF0000"} lineColor={"#00FF00"} format="CODE128" value={345678} />

barcode showing in iOS but not in android.

ravindersistic avatar Sep 22 '22 03:09 ravindersistic