mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
12/02/12 03:24 PM (11 years ago)

Long time issue with custom url (android)

Hi all, Sorry for the inactivity with plugins and posting, been so busy with everything it's crazy.. still lurking forums so if you need me just call. Been working hard on this android development thing, and most of my headaches are gone. I plan on posting a little pdf that will hopefully help BT iOS dev's transition better to android, think it will be super useful for those specifically. Still have a few more bumps to fix. Was hoping I could get some advice. No matter what URL I load (other then the standard google.com url) in the CUSTOM URL plugin, it always loads the webpage in the simulator, but then continues to have the circle loading icon in the middle, freezing me from doing anything in the app (even the back button wont work). This is on self hosted, latest version of the server, with the new android development kit, google api 2.2/8, mac, all that good stuff. It seems the custom url plugin always freezes with the loading icon, even through the page is definitely finished loading. Any useful tips for debugging/fixing? I believe it does this on the phone too, not just the simulator, super frustrating as I need to kill everything and reboot the app and simulator to use it again. Cheers all, David https://buzztouchmods.com
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
12/02/12 03:32 PM (11 years ago)
Just search for ring of death solution. It just involves removing the code to remove the spinner altogether. Will post link in a min once i find it
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
12/02/12 03:39 PM (11 years ago)
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
12/02/12 03:51 PM (11 years ago)
Awesome, you rock! Commented out the line 129, showProgress(null, null); Even through the user won't see the page load icon anymore (thus might be confusing if they have slow internet) it atleast WORKS and won't freeze the app - so much better then before. Cheers to you and to fred, thanks! David https://buzztouchmods.com
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
12/02/12 04:00 PM (11 years ago)
Glad it helped. I think most users with a slow internet connection will look at the screen in bewilderment asking themselves (or the phone) "why is nothing loading" long enough for the page to appear. Lol
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
12/02/12 04:17 PM (11 years ago)
Hopefully they will be used to their slow internet by the time they download my clients app! LOL! Nice to see you posting around here Mr. Stuck, seems you're helping more people be unstuck then being stuck yourself! Cheers, David https://buzztouchmods.com
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
12/02/12 04:32 PM (11 years ago)
I am very much stuck most of the time but more than happy to pitch in with any help i can offer anyone. The forum has been of great assistance to me in the past so more than happy to return the favour.
 
0z2000tv
Aspiring developer
Profile
Posts: 315
Reg: Sep 10, 2011
Nashville
11,950
like
12/02/12 07:02 PM (11 years ago)
David I look forward to your PDF. Making the Android plunge after the holidays. Mike
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
12/02/12 07:04 PM (11 years ago)
You got it Mike :-) David https://buzztouchmods.com
 
Absentia
buzztouch Evangelist
Profile
Posts: 960
Reg: Oct 20, 2011
Alaska
20,600
like
12/03/12 04:10 AM (11 years ago)
the iOS to Android PDF sounds like an amazing idea! I've been procrastinating on getting familiar with Android for way too long
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
12/03/12 10:33 AM (11 years ago)
Spinning wheel of death - too funny. It would be super-duper easy to remove the showProgress from the plugin, permanently, on our end. BUT, I've made tons and tons of Android apps without ever running into this problem. Ever. I'm convinced that it has to do with the combination of the device + the URL that's loading. In almost all cases, the apps I create load URL's that I also create. In other words, I don't load content from other sites in to Android apps. It's important to understand what's happening here. The showProgress graphic shows when the WebView first starts to load. Then, when it's "done" it hides. It's the "done" thing that doesn't necessarily happen when you may think. And, it's different on different devices. The "done loading" event on the built in Android WebView is widely regarded as a giant pain in the butt. LOL So, why does it matter where the content comes from? I can only speculate about this, but, it's my opinion that most folks don't realize entirely what a browser does when you load a URL. I say this because people (app owners) don't necessisarily understand that a heavy web-page with tons of resources will make lots and lots of HTTP requests to grab all kinds of resources. Every image, script, .css style sheet, etc, etc, while it gathers all the assets for the HTML content. Each and every time it begins one of these requests, it triggers the showProgress() method (the loading wheel). Then, when it completes, it turns it off. But, and this is where the Android debate begins, depending on the type of content being downloaded and where the content is (same server as root URL, https, etc, etc) Android will not always fire the "done loading" event. All this means is that when I make the HTML and load it, it works 100% of the time on every device I've ever tested on. But, if you load HTML content that you didn't author, you never really know what's "trying to load" and how Android will report it's progress. Maybe we should re-invent the showProgress method. LOL.
 
mrDavid
BTMods.com
Profile
Posts: 3936
Reg: May 21, 2011
San Diego, CA
51,910
like
12/03/12 11:08 AM (11 years ago)
Hi David, This explains why it would load google.com, but not the URL I was attempting. Some resources would have a constant connection on that page, so makes sense now that you explained it - android simply did not know to release the showProgress. In any case I was able to remove it and all works fine, I rarely use custom HTML, so in my case it did not work often for me. Glad you guys always have my back! I was able to release the app for my client on-time. Thanks a ton again, excited to release the PDF, just looking through GoNorthWest's ones, don't want to repeat anything he's already said. :-) Cheers all, David https://buzztouchmods.com
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
12/03/12 01:42 PM (11 years ago)
I personally find Yola websites a constant pain with the wheel of death
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
12/03/12 01:57 PM (11 years ago)
Can anyone point me in the direction of where I can perhaps get some "clients" as could sure do with some extra $$$'s
 
Hmmm
buzztouch Evangelist
Profile
Posts: 67
Reg: Sep 17, 2013
location unknow...
6,670
like
05/29/14 03:47 PM (9 years ago)
Here is a url that will reproduce this every time: https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.buzztouch.com We commented out the showProgress line which fixed it but it appears to have killed the emulator as now we cannot start any project in it.
 
Hmmm
buzztouch Evangelist
Profile
Posts: 67
Reg: Sep 17, 2013
location unknow...
6,670
like
05/29/14 03:53 PM (9 years ago)
Emulator crash problem is unrelated. Was a second screen issue.
 

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.