Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 15    Views: 152

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

FIXED: Android App Needs Refreshed issue...

Hi gang, been trying to figure this out for quite sometime - got it! There have been a few forum posts about it and I'll put the URL to this post in those posts rather posting the same thing in all the related discussions. Symptom: Android app from v2.0 source. App would launch, alert user that new content was available and ask if they wanted to update. Saying YES would download the new data then ask them again. And again and again. Yikes. The fix was related to two files and should be OK now if you re-download the Android package for your app. If you're interested in details... BT_activity_base.java: The Report To Cloud logic was moved to the onResume event from the onCreate event. This should have been done from the beginning! The idea is that the app should check for new content every time the home screen is brought to the forefront - not simply when it's launched. Previously, if it was left running it would NEVER check for updates. Not good. BT_activity_root.java: After the app downloaded new data, it would DELETE the existing data. This makes sense because it's refreshing and should get rid of all the stale / cached files. However, it should NOT have been deleting the "last modified" file. Removing it was forcing it to think it needed to refresh over and over again because it was saving the "last modified" file, then removing it - duh. Both fixes require you to re-download your Android package.
 
naguchennai
Android Fan
Profile
Posts: 28
Reg: Jun 26, 2011
india chennai
280
like
03/28/12 12:11 AM (13 years ago)
I downloaded already 4 to 5 times... its show every time Updates available.. May be some one check again...
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
03/28/12 12:14 AM (13 years ago)
Great fixes, thanks David!
 
ianJamesPiano
Code is Art
Profile
Posts: 2661
Reg: Feb 13, 2011
Palm Springs, C...
37,010
like
03/28/12 12:16 AM (13 years ago)
Fix working fine for me in Android Emulator...should be fine on device as well. Sweet!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/28/12 12:23 AM (13 years ago)
@naguchennai: I just download an Android v2.0 project, no issue. Did you do it after seeing this post? If so, something still isn't right... @GoNorthWest: loadScreenObject WORKS ;-). See email.
 
javooooo
buzztouch Evangelist
Profile
Posts: 719
Reg: Jun 17, 2011
Sydney, Austral...
18,490
like
03/28/12 01:17 AM (13 years ago)
Greeeeeeat David! I'll do the fix the next time I can be bothered to start up my VM...
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
03/28/12 05:14 AM (13 years ago)
Brilliant! Thanks!
 
MGoBlue
Apple Fan
Profile
Posts: 980
Reg: Jun 07, 2011
Gold River, CA
10,600
like
03/28/12 05:59 AM (13 years ago)
Excellent. Thanks, David.
 
XactWeb
Android Fan
Profile
Posts: 85
Reg: Jan 09, 2012
Bangor
850
like
03/28/12 06:18 AM (13 years ago)
Anything we need to do to our self hosted files?
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/28/12 06:22 AM (13 years ago)
Self hosted. Good call! Feel free to updat Custom URL and Custom HTML plugins. They will not show as needing to be updated ( for a fed reasons), just grab them, upload them. You'll end up with the same fixes.
 
XactWeb
Android Fan
Profile
Posts: 85
Reg: Jan 09, 2012
Bangor
850
like
03/28/12 06:22 AM (13 years ago)
Thanks David.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
03/28/12 07:42 AM (13 years ago)
Just curious, did this problem only affect Self-hosted apps using Custom URL and Custom HTML plugins? If not how did the fix (updating the two plugins) 'fix' the problem? Not questioning that it fixed the problem, just trying to understand how the parts are related. Fred
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
03/28/12 07:50 AM (13 years ago)
Affected both but plug files for self hosted servers are not literally the same files. They live on our backend in a different place. So.. we updated the BT.com files and the self hosted files for download. This is why you need to replace the two plugins on your server, so you get the newly updated code.
 
Naes993
Android Fan
Profile
Posts: 49
Reg: Jun 21, 2011
Myrtle beach
490
like
03/28/12 06:40 PM (13 years ago)
So I could really just download the new source and swap the two java files right? lol... kinda have a lot of new stuff added in! :-) #lazywannabedev
 
Worker73
Android Fan
Profile
Posts: 419
Reg: Feb 06, 2012
Austria, Klagen...
4,490
like
03/30/12 01:04 PM (13 years ago)
Hi! Looks that Works.... Thanks David !
 
ylaube73
Android Fan
Profile
Posts: 92
Reg: Jan 30, 2012
Poughkeepsie, N...
1,720
like
03/31/12 06:35 AM (13 years ago)
Worked for me too! Hooray!
 

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.