Open bhautik-bharadava opened 6 years ago
@bhautik-bharadava The issue is the refs, React doesn't store refs in a global ref object anymore. Try the following ` saveSign() { this.sign.saveImage(); }
render() {
return (
<Modal isVisible={true}>
<View style={{ flex: 1 }}>
<SignatureCapture
style={[{flex:1},styles.signature]}
ref={input => this.sign = input}
onSaveEvent={this.handleSave}
saveImageFileInExtStorage={false}
showNativeButtons={false}
showTitleLabel={true}
viewMode={"landscape"}/>
<View style={{ flex: 0, flexDirection: "row" }}>
<TouchableHighlight style={styles.buttonStyle}
onPress={this.props.handleCancel} >
<Text>Exit</Text>
</TouchableHighlight>
<TouchableHighlight style={styles.buttonStyle}
onPress={() => { this.saveSign() } } >
<Text>Save</Text>
</TouchableHighlight>
</View>
</View>
</Modal>
);
}`
Not working on tablet please other solution ??
Having the same issue where onSaveEvent is not called. Any solution to this issue?
same here.
I opened the android storage permission and it works
Hmmm
I have
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
but I'm still seeing this. What's odd is this was working for me until I updated to RN 0.57.4
.
asked and answered. Even if it's in the manifest you have to ask for it now, https://facebook.github.io/react-native/docs/permissionsandroid
Having the same issue, reset is working fine but after firing for save action the save event is not getting triggered. https://www.npmjs.com/package/react-native-signature-capture#example Tried this example.
asked and answered. Even if it's in the manifest you have to ask for it now, https://facebook.github.io/react-native/docs/permissionsandroid
This saved my day (or week)
I'm still having this issue, even after explicitly requesting Android permissions. RN 0.63.2
I get the same thing. Read/write permission granted, but onSaveImage function doesn't get called on Android only (ios works fine even without the permission) so I have no way to get the image path.
how this issue fixed?
I have enabled saveImageFileInExtStorage={true} but it seems when i call
saveSign = () => { console.log("Here"); this.refs["sign"].saveImage(); };
<SignatureCapture style={styles.signature} ref="sign" onSaveEvent={this._onSaveEvent} onDragEvent={this._onDragEvent} showBorder={false} saveImageFileInExtStorage={true} showNativeButtons={false} showTitleLabel={false} viewMode={'portrait'} />
OnSaveEvent is not calling what to do in this situation?
I have enabled saveImageFileInExtStorage={true} but it seems when i call
saveSign = () => { console.log("Here"); this.refs["sign"].saveImage(); };
<SignatureCapture style={styles.signature} ref="sign" onSaveEvent={this._onSaveEvent} onDragEvent={this._onDragEvent} showBorder={false} saveImageFileInExtStorage={true} showNativeButtons={false} showTitleLabel={false} viewMode={'portrait'} />
OnSaveEvent is not calling what to do in this situation?