questions about older Android compatibility
ssuess last edited by ssuess
Hi, I am in testing with my app (cordova and chrome) on Android, and I notice that anything earlier than API 23 will fail in some strange ways:
I am immediately logged out after logging in to my REST API backend
Not entirely sure where the problem lies although in debugging I notice that the JWT token I normally store in localforage is not there (but oddly some of the other data I pull from my server after successful login is).
So I am trying to pinpoint the cause of my app not working (in either cordova or chrome browser) on API 22 and earlier on android. Here are some of my guesses can anyone rule them out:
- I am using es6
- I am using arrow functions
- I am using axios
- I am using localforage (vue-localforage)
Do any of the above have any problems to anyone’s knowledge? Building with Quasar 0.14.3, cordova seems not to be the problem here since it also fails in chrome on android 22…
Cordova apps rely on the internal browser provided by the OS. If you are using some latest web technologies on Android < 5 then you should use the Crosswalk plugin (which embeds a somewhat latest chromium version as browser). On the other hand, it doesn’t matter if you use ES6 (including arrow functions, as part of ES6), axios or probably localforage (haven’t checked it out) too. You app is built before packaged in cordova, which means it’s transpiled to ES5 code. Use remote debugger to detect what errors occur: http://quasar-framework.org/guide/cordova-wrapper.html#Remote-Debugging
Thanks for the reply, I finally figured out what was happening here:
I was testing for the presence of my token on my dashboard page (that was forwarded from the login page) and it was not yet set (promise had not completed, race condition), so I put moved my forward to the callback (then) of my setItem for the token. I can only guess as to why older devices were the only ones with this problem, perhaps the code/emulated hardware is faster on newer ones, so the promise always completed before the page forward, and that is why I never saw it on anything newer. Anyway, thanks for helping me troubleshoot this.
ssuess last edited by ssuess
However, I do have one more question about older Android compatibility: it seems that certain icons are not supported on version 4.4 of Android, resulting in odd layout. For example, I am trying to display
account_circle, either in a q-item-side or q-icon component:
<q-icon name="account_circle" size="50px" />but it and other icons will not display because of ligature support lacking in older browsers (see this:https://github.com/google/material-design-lite/issues/1375)
However, this WILL display:
<i class="material-icons"></i>, but I find that I can’t use the code in quasar components, do you think this is something that might be added in the future, or do I need to use notation above and replace my quasar components that use these icons?
btw, I had to disable crosswalk because I couldn’t use it in any emulator (I am on a Mac) and thus had no way of testing android if it was installed
I just re-enabled crosswalk and it seems to work with the icons, so all good and thanks.