Please provide the following:
- SDK Version: 46.0.0
- Platforms(Android/iOS/web/all): Android
expo-print only works in expo go. when i build the apk it doesn’t work, it just doesn’t do anything.
I would like to know if I am doing something wrong or if I am missing some configuration, because when I generated it with the expo build command it always worked, now that I generate it with eas build it is no longer working.
import * as React from 'react';
import { View, StyleSheet, Button, Platform, Text } from 'react-native';
import * as Print from 'expo-print';
import { shareAsync } from 'expo-sharing';
const html = `
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
</head>
<body style="text-align: center;">
<h1 style="font-size: 50px; font-family: Helvetica Neue; font-weight: normal;">
Hello Expo!
</h1>
<img
src="https://d30j33t1r58ioz.cloudfront.net/static/guides/sdk.png"
style="width: 90vw;" />
</body>
</html>
`;
export default function App() {
const print = async () => {
await Print.printAsync({html});
};
return (
<View style={styles.container}>
<Button title="Print" onPress={print} />
</View>
);
}