Comments (12)
Okay so I've a good bit of data to throw your way. I tried running your example project on various emulators and a physical device with different OS versions and resolutions and tried rolling back my installation of react-native-canvas to see how the different devices handle the different versions. I'll give the specifications of the devices first then refer to them by number in the findings.
Physical Device (same as listed in previous comment)
1:
Device: OnePlus One
Resolution: 1080 x 1920 xxhdpi
OS: Cyanogen OS version 13.1.2-ZNH2KAS3P0-bacon
Target: 6.0.1
Emulators:
2:
Device: 5.4 FWVGA
Resolution: 480 x 854 mdpi
API: 23
Target: Android 6.0
3:
Device: Galaxy Nexus
Resolution: 720 x 1280 xhdpi
API: 25
Target: Android 7.1.1
4:
Device: Nexus 5
Resolution: 1080 x 1920 xxhdpi
API: 26
Target: Android 8.0
Repository Versions tested:
1: 0.1.14
Device 1: The canvases don't render at all
Device 2: The canvases DO render
Device 3: The canvases don't render at all
Device 4: The canvases don't render at all
2: 0.1.15
Device 1: The canvases don't render at all
Device 2: The canvases DO render
Device 3: The canvases don't render at all
Device 4: The canvases don't render at all
3: 0.1.16
Device 1: The canvases DO render
Device 2: The canvases DO render
Device 3: The canvases DO render
Device 4: The canvases DO render
4: 0.1.17
Device 1: The canvases don't render at all
Device 2: The canvases don't render at all
Device 3: The canvases don't render at all
Device 4: The canvases don't render at all
5: 0.1.18
Device 1: The canvases don't render at all
Device 2: The canvases don't render at all
Device 3: The canvases don't render at all
Device 4: The canvases don't render at all
As you can see from the above tests, it seems that prior to release 0.1.16, many devices fail to render the canvases and for some reason, on of the devices (the 5.4 FWVGA) succeeds in rendering them. After 0.1.16, all of my devices, spanning many resolutions and APIs fail to render the canvases. Release 0.1.16 however seems to succeed on 100% of devices (based on a sample size of 4 at least).
I know you asked me to try 0.1.16 and I thought I had done that but it seems that by the time I got to it, you had released version 0.1.17. As my findings above show, there appears to be regression in that release, with all devices now failing to render the canvases.
I hope this helps you. And hopefully you can recreate my findings and it's not just an issue with my SDK or something
from react-native-canvas.
Yep, seems to be working great on 0.1.20
Thanks
from react-native-canvas.
Interesting. It seems like there are repeating errors for images on Android. Can you please provide the OS version and device you were trying this code on?
from react-native-canvas.
I just tested your example project and again, it worked perfectly on iOS but on Android, none of the left images rendered.
I'm using the latest version of your code.
Android version: 6.0.1
Device: OnePlus One
OS: Cyanogen OS version 13.1.2-ZNH2KAS3P0-bacon
React-native version: 0.48.4
React-native-cli version: 2.0.1
I'll try an android Emulator and see if the same results are observed
from react-native-canvas.
Yeah, it's working fine on the emulator for a Nexus 5X
from react-native-canvas.
Please try version 0.1.16
from react-native-canvas.
Sadly updating to the newest code didn't fix my issue. Both my own application and your example one still aren't rendering the canvas on my Android device
from react-native-canvas.
Can you reproduce the issue on an Android emulator as well?
from react-native-canvas.
Not in the one I have installed but I'll try a few others and see if I can find one that fails like my device
from react-native-canvas.
Amazing, thank you.
from react-native-canvas.
This is very helpful and would be reviewed ASAP. Thank you
from react-native-canvas.
Latest version should fix this
from react-native-canvas.
Related Issues (20)
- New architecture support for fabric HOT 1
- require cycle node_modules\react-native-canvas HOT 1
- canvas.loadFromJSON missing in react-native-canvas
- Error: Unable to resolve module ./CanvasRenderingContext2D HOT 1
- Not able to add fontFamily with font
- Application gets hang after 10 mins due to drawing on canvas continuously
- Can't draw image greater than 2048x2048 HOT 1
- Virtual/In-Memory Canvas HOT 1
- Can't draw Image on release HOT 1
- Doesn't work at all with Expo HOT 5
- Does not work with Expo 50 HOT 1
- `clearRect()` crashes in Expo 49 HOT 1
- does not work in react-native-windows
- How to draw local image on canvas using react-native-canvas HOT 1
- Setting width/height of canvas doesn't work HOT 2
- Error: Unable to resolve module `react/jsx-runtime` from `node_modules/react-native-canvas/dist/Canvas.js HOT 2
- The text truncates and doesn't show in multiline HOT 1
- getting an Object instead of Boolean by using isPointInStroke HOT 3
- getting an Object instead of Boolean by using isPointInStroke
- The return value has a large deviation by using isPointInStroke HOT 1
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-canvas.