Comments (11)
In Android there is a method onSketchSaved that help you to get path
onSketchSaved={(success, filePath) => { console.log('onSketchSaved', 'filePath: ' + filePath); }}
from react-native-sketch-canvas.
++
from react-native-sketch-canvas.
You can get the image path after saving now~
from react-native-sketch-canvas.
@terrylinla how does one go about getting the URI after saving?
from react-native-sketch-canvas.
Awesome got it thanks @ankits47b
from react-native-sketch-canvas.
File path seems to be consistently undefined
using onSketchSaved
on iOS and Android emulators, even using the exact component example in the docs, only adding:
onSketchSaved={(success, path) => console.log(success, path)}
This method does run and I can get success to log as false
but even when success is true
, path is always undefined
. How do I get actually get the saved image without using another library to capture the View?
Thanks.
from react-native-sketch-canvas.
@karlsecco you might want to see if this is related to the android 10 permissions issue; there the success value was false
though. Did you change the permissions to get true
? #142 (comment)
from react-native-sketch-canvas.
@palashkaria Thanks for the reply. Yes I am able to get success === true
on both iOS and Android yet even then the path === undefined
every time. I've seen implementations to handle null
returns when a folder and filename are not indicated on save, therefore conditionally fetching from camera roll on iOS, but path for me is never null
, just undefined
. I don't know how to get a return value for path.
from react-native-sketch-canvas.
Always null on save in android :
onSketchSaved={(success, uri) => {
uri = "file:///" + uri;
console.log(success ? 'Image saved!' : 'Failed to save image!', uri);
}
//
'Failed to save image!', 'file:///null'
from react-native-sketch-canvas.
@kunalword your file path is null because your save failed
from react-native-sketch-canvas.
no luck on this either? 👎
from react-native-sketch-canvas.
Related Issues (20)
- Is this maintained and updated HOT 6
- ANDROID ONLY: image is flipped HOT 5
- Android: Error while updating property "LocalSoueceImage" of a view managed by: RNScketchCanvas.
- IOS Only: onPathsChange() & onSketchSaved() Method Not Working in IOS Device HOT 1
- How to get base64? HOT 2
- Add TextInput On Touch
- How to set base64 image to Canvas? HOT 5
- What filename/folder to save to camera roll on Android?
- Errors While Building application HOT 1
- strokeColor is set to #00000000 not working eraser?
- Error while building application on android HOT 1
- * What went wrong: A problem occurred evaluating project ':@terrylinla_react-native-sketch-canvas'. > Could not find method provided() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. HOT 1
- Is it possible to detect if the touch is from apple pencil or hand? HOT 1
- react-native-sketch-canvas does not support new architecture even with RN v0.72 interop layer HOT 17
- Expo build HOT 1
- Could not find method provided() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler HOT 2
- How to save customized SketchCanvas
- Cannot read property 'Constants' of undefined"
- can we add text editor?
- Android Build Issue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-sketch-canvas.