Discussion Forums  >  WebViews and HTML for Mobile

Replies: 14    Views: 360

David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
03/28/12 01:27 AM (12 years ago)

FIXED: Custom HTML / URL Android Spinner...

Wowza, this may be the longest living bug ever. I've been looking at code and solutions for the famous "spinner not hiding" issue on Android. It's amazing how one line of code can hide in thousands and thousands of lines of other code undetected. I've literally been trying to find / fix this since fall '11. Symptom: Not all URL / HTML documents and web pages that loaded in the webView widget could hide the loading spinner "on completion." YouTube URL's were most famous of this. Tons of hacks were tried, some worked, some didn't. The Fix: The showProgress() method (show the spinner) was being called in the very first line of the Android Activities onCreate() method. Then, because some URL's load many files and assets the showProgress() was continued until the final onPageFinished event. I've been convinced for months that the onPageFinished event was not firing on the suspicious URL's. As such, I've focussed on that portion of code with each visit. WRONG! The issue was not the onPageFinished event, it was the original call to showProgress() in the onCreate event. It should never have been there. In fact, it's an "illegal" call to put it there. No sense in trying to explain that. Stoked it's fixed. I'm 100% convinced that the onPageFinished event will fire and will hide the progress spinner - even on YouTube URL's! Naturally you'll need to re-download any affected projects. This fix relates to v1.5 and v2.0 apps.
 
ScifiMan
Code is Art
Profile
Posts: 9
Reg: Dec 16, 2011
Auckland, NZ
90
like
03/28/12 01:55 AM (12 years ago)
Thanks David! Much appreciated
 
mysps
Code is Art
Profile
Posts: 2082
Reg: May 14, 2011
Palma
33,320
like
03/28/12 01:57 AM (12 years ago)
Thanks David! You're on a roll :)
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/28/12 02:04 AM (12 years ago)
Finally getting some uninterrupted Android time is a good thing ;-) It's like open heart surgery...fix one, find more. Too funny. 2:00 AM here, giving up for the night.
 
Skyr0s
Code is Art
Profile
Posts: 196
Reg: Jan 26, 2012
Hong Kong
4,310
like
03/28/12 02:49 AM (12 years ago)
Great job, felt the change already !
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
03/28/12 05:12 AM (12 years ago)
Great stuff! Thanks!
 
ATRAIN53
Code is Art
Profile
Posts: 1755
Reg: Nov 17, 2011
Chicago
26,450
like
03/28/12 06:47 AM (12 years ago)
i like the sound of this, cleaning up issues and new programming for Android. I love the open source and unlimited aspect of Android. i like the iOS apps i've downloaded and used, but they all seem 'entertainment' based like games and photo editors.... but the Android ones i have downloaded and use i find are so much more useful/informational. i want to do more Android dev but waiting for BT to catch up. so this is good to hear - David on Android!
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
03/28/12 10:34 AM (12 years ago)
Question: Is the Wheel of Death fix no longer necessary?? Regarding re-download ing source code. Since a few have made extensive modifications to the source code (not I, just a bit of modifications) redownloading isn't that simple. (Again a big reason to have a folder with all the images you've added to your source code.) What part of the new source code can I cut and paste to accomplish same. Same question regarding 'app has update' issue. Can the problem be solved by making modifications to existing source code? Again not so much my problem, but I imagine a few will cry if they have to rebuild their source code, but perhaps it'll be tears of joy knowing the additional features they'll enjoy. Fred
 
Warren Evans
Apple Fan
Profile
Posts: 277
Reg: Jan 28, 2012
Effingham IL
17,400
like
03/28/12 06:42 PM (12 years ago)
David - If I'm running self-hosted, are there any plugins that need to be updated? Warren
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
04/01/12 04:46 AM (12 years ago)
Hi, I updated the plugins and still seeing wheel of death...maybe just the Emulator? thanks! http://www.linkedin.com is the link not working
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
04/01/12 11:43 AM (12 years ago)
@Warren Evans: You should update the Custom URL and Custom HTML plugins on your self hosted server. They do not show as "needing an update" for a few reasons. Just download them, re-upload them. @ianjamespiano: Don't believe you. LOL. The wheel will continue to spin of the page doesn't load. I'm surprised to here a linked in URL doesn't load on Android? I'm happy to get a look if you post the app name + menu item + screen that won't load.
 
Warren Evans
Apple Fan
Profile
Posts: 277
Reg: Jan 28, 2012
Effingham IL
17,400
like
04/01/12 11:54 AM (12 years ago)
Thanks David - I had already refreshed those two plugins for the looping update problem. Did not know both problems were fixed as a result.
 
nickrick32
Apple Fan
Profile
Posts: 111
Reg: Feb 28, 2011
location unknow...
1,110
like
06/07/12 09:26 AM (11 years ago)
Hi David, I just download source code for BT 1.5 Android app and I have a problem with Custom URL for twitter.com and soundcloud.com (mobile and desktop version doesn't work) youtube open but can't stream videos. How to solve this problem? I try to use external HTML with iframe but the same problem.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
06/07/12 09:42 AM (11 years ago)
See my Buzztouch Process (Android) article for Wheel of Death solution. www.MySkylla.com
 
nickrick32
Apple Fan
Profile
Posts: 111
Reg: Feb 28, 2011
location unknow...
1,110
like
06/07/12 09:43 AM (11 years ago)
Hi David, I just download source code for BT 1.5 Android app and I have a problem with Custom URL for twitter.com and soundcloud.com (mobile and desktop version doesn't work) youtube open but can't stream videos. How to solve this problem? I try to use external HTML with iframe but the same problem.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.