Giter Site home page Giter Site logo

Comments (26)

jonathantneal avatar jonathantneal commented on July 19, 2024

I could cut a release that utilizes https://code.google.com/p/canvg/ based on this post from 2012.

Related; what are the other methods? I will link to them in the README.

from svg4everybody.

edge0703 avatar edge0703 commented on July 19, 2024

That would be great. Alas I never thought much about SVG polyfills and have no experience on this topic. However should I help yiu to search for alternatives?

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

@edge0703, Yes, thank you, and please do. I shift back and forth between a few projects. Also, it would be useful to know which version of Android things started working in.

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

I have confirmed that the Android 4.0-4.3 stock browsers don't support external SVG spritemaps and that the svg4everybody polyfill makes them work fine when activated.

Android 2.3 doesn't support inline SVG at all and in Android 4.4 Google Chrome is the new stock browser so external SVG spritemaps work fine there.

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

Great info. This should be added to the README, too!

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

More importantly, a detect for Android 4.0-4.3 should be added. 😉

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

@Rowno, how is this working on your end?

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

I'm pretty sure this will execute on Chrome for Android as well when it doesn't need it because it's user agent is:

Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B)
AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile
Safari/535.19

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

Firefox Mobile and Opera Mobile will get targeted by the current regex as well. (both support external SVG spritemaps)

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

I’m sorry. User Agent strings are terrible things. Is there something unique about the default browser?

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

Not sure, looks like you'll need to check the Android version and the AppleWebKit version unfortunately: https://stackoverflow.com/questions/14403766/how-to-detect-the-stock-android-browser

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

Or the absence of Chrome or Firefox?

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

That wouldn't be very safe, there's a lot of other Android browsers (including Opera).

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

I think checking the webkit version is probably the safest and most future proof. Since technically it's that webkit version that's lacking support.

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

Very well. Sorry, I don’t have multiple Android devices to test.

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

With the latest update, are we good, @Rowno?

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

The only thing is that this will target all old Webkits (including Safari desktop and mobile) even if they don't support inline SVG, which may be a problem? If so, you could check the Android version and the Webkit version.

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

Or add an inline SVG feature detect for when Webkit is detected.

from svg4everybody.

edge0703 avatar edge0703 commented on July 19, 2024

Is it already supposed to work in Android? Tried it now and still no display of external SVGs.

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

Is it already supposed to work in Android? Tried it now and still no display of external SVGs.

Yes it does (Android 4.0-4.3).

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

@edge0703, which version of Android are you testing?

from svg4everybody.

edge0703 avatar edge0703 commented on July 19, 2024

I tried it on Browserstack with several versions of Android. Didn't work on any. But I didn't try it on an actual device. Maybe I will do that now.

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

I was testing on Browserstack and it was working fine.

from svg4everybody.

edge0703 avatar edge0703 commented on July 19, 2024

You were right, it works. Just tried it on my Nexus 4. Don’t know why it didn’t work in Browserstack before.

Am 16.06.2014 um 08:53 schrieb Roland Warmerdam [email protected]:

I was testing on Browserstack and it was working fine.


Reply to this email directly or view it on GitHub.

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

FYI, svg4everybody is executing on Chrome now because /Trident\/[567]\b|/.test(navigator.userAgent) is returning true. :(

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

Double check that, @Rowno ;)

from svg4everybody.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.