Hi,
For testing, I compiled Drupalgap SDK without modifying the interface and run on phone, thanks, connect to my site successfully. However, the App interface seriously flickers / refreshes on every click / transition and often with intermediate white blank waiting screen while loading. The serious flicker / refresh / white blank screen made me fainted after playing awhile.
I thought Jquery mobile or even Phonegap wasn't ideal for developing Mobile App. However, I downloaded https://github.com/adappt/drupalphonegap (Also using jquery mobile) and compiled and run. Fantastic, the app interface works like native app, no such flickering / refreshes / white blank waiting screen effect like Drupalgap SDK on click & transition.
I really wonder. Thanks
Comments
Comment #1
tyler.frankenstein commentedThis is unfortunately a long standing issue, and is more obvious on older/slower devices...
If anyone is interested in digesting how DrupalGap 1.x handles jQM pages, here are some key source code files of interest:
As you mentioned, the https://github.com/adappt/drupalphonegap has better performance? If so, please digest their page/event handling system and report any findings back here.
I'm open to suggestion and contribution on all of this... for DrupalGap 1.x. Perhaps the fix is really easy, and we just don't know it yet. Any research on why jQuery Mobile would flicker in PhoneGap would be helpful to organize here as well.
DrupalGap 2.x is being built on Angular, so this will no longer be an issue ;)
Comment #2
paulwdru commentedHi,
Thank you for your sharing. I tested it on Samsung S2 & Note4. Also, the Drupalgap SDK App cannot be exited by pressing the back button on phones. I have to end it forcibly under App manager each time.
The said https://github.com/adappt/drupalphonegap SDK is provided by this module https://www.drupal.org/project/phonegap . However, I just compiled the SDK to see if any flicker / refresh / white waiting screen noticed, yet tested it with its phonegap module which seems having been discontinued in development.
I just finished assembling a fully Email-driven Ticketing System on Drupal and now looking into building a simple mobile app interacting with it with push notification and found this https://www.drupal.org/project/drupalgap_mobile_notifications
Drupalgap is resourceful with great suppport. I'll try to figure out the interface and post finding here once identified. Thanks
Comment #3
paulwdru commentedHi,
Finally I tested https://www.drupal.org/project/phonegap with https://github.com/adappt/drupalphonegap , I'm able to login, retrieve the content view list and also post content. After login, the app interface still works nice with NO flickering / refresh / white screen on click / transition / retrieving / posting. Perhaps it's much simpler & light-weight if compared to drupalgap.
Comment #4
paulwdru commentedHi,
I traced out the cause after experimenting http://www.w3schools.com/jquerymobile/tryit.asp?filename=tryjqmob_trans_... . Indeed, it's the default fade transition effect causing flickering.
I added "data-transition": "none" in settings.js for all links. However, it does not work because you use onclick javascript.
Then I was told to add the following between
<script src="jquery-1.9.1.min.js"></script>and<script src="jquery.mobile-1.4.2.min.js"></script>to disable the default transition effect in global scope.It works well without flickering anymore as web app and also on phone (android). However, on phone, after I click Create Content and the page shows, all the links become unresponsive and no longer functioning. I also tested it with emulator resulting in the same.
Now I solved the flickering but it crashed with Create Content page on phone / emulator. Any ideas ? Thanks
Comment #5
WillsCreative commentedFollowing this post. The constant screen flicker on every screen change makes it feel more like a website and less like an app
Comment #6
paulwdru commented@WillsCreative
JQuery Mobile is set with Fade transition by default, just disable it as mentioned in #4, flicking will be gone then. However, I noticed that after disabling using
if your form contains unsupported field types by drupalgap, the form will become unresponsive during submission. I don't know why the codes can become conflicting with drupalgap.
Comment #7
d0t101101 commented@paulwdru - thanks for sharing this detail. I tried placing this in both index.html and in my theme's javascript, but it doesn't seem to take effect. The fade transition and flickering is still there.
Where exactly are you placing this javascript code?
.
Comment #8
tyler.frankenstein commentedHere are some related links from @d0t101101
Comment #9
paulwdru commented@d0t101101
The codes must be put between
<script src="jquery-1.9.1.min.js"></script> and <script src="jquery.mobile-1.4.2.min.js"></script>in index.html. Otherwise it won't work.Comment #10
kinmen commentedAccording to this post https://vjsamuel.wordpress.com/2015/01/12/removing-flickering-seen-in-co... you can try to change "data-transition": "none" to "data-transition": "slide"
OR
for Android ICS & lower, disable hw acceleration in the AndroidManifest.xml
credit to vjsamuel
Comment #11
tyler.frankenstein commentedSome helpful links from @d0t101101:
Comment #12
d0t101101 commentedTyler - thanks again for helping me apply the 'none' transition globally, in my theme's .js, like so:
This really helped with this flickering issue...