此代码成功运行,但在android emulator存储中未找到屏幕截图。有什么问题吗?在手机存储中保存截图是否需要任何更改?
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native SnapShot!
</Text>
<Text style={styles.instructions}>
To get started, edit App.js
</Text>
<Text style={styles.instructions}>
{instructions}
</Text>
<Button
onPress={
() => {
captureScreen({
format: "jpg",
quality: 0.8
})
.then(
uri => console.log("Image saved to", uri),
error => console.error("Oops, snapshot failed", error)
);
}
}
title="capture"
color="#841584"
accessibilityLabel="Capture"
/>
</View>
);