Discussion Forums  >  Maps, Device Location, Tracking

Replies: 13    Views: 209

UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
11/20/12 05:41 AM (11 years ago)

Forcing data refresh in Android

In my BT_config.txt file I have "dataURL": set for the config.txt file on my server. My Android phone is still using the initial file. How do I force it to refresh? I've hit the back button until it goes back to the Android phone home screen.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/20/12 06:43 AM (11 years ago)
I've also gone into Settings > Applications Management, and forced it to stop, and clear all data. It still loads up the original config from the .apk.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/20/12 10:48 AM (11 years ago)
You can force a refresh from the home screen of your app by hitting the device menu button, and choosing "Refresh All App Data" (or something close to that...doing it by memory). That'll force a download of an updated config file. Mark
 
Outbreak
buzztouch Evangelist
Profile
Posts: 452
Reg: May 30, 2011
Colorado
14,620
like
11/20/12 11:12 AM (11 years ago)
Sounds like you have the same problem that I'm having. Are you using 2.0?
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/20/12 11:25 AM (11 years ago)
Yes, BT 2.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
11/28/12 03:44 PM (11 years ago)
The "no refresh button appearing in the menu on the home screen" has been isolated and fixed. There is a typo in your BT_activity_base.java file. Yikes. The download server has been updated so this won't happen the next time you download a project. But, if you've made some changes to you project since downloading it may be easier to just fix the simple typo in your already downloaded project. BT_activity_base.java: Starting on line 143 you'll see where it tries to determine if the screen is the "home screen." This is the updated method. You can copy and paste this as needed. //is this a home screen? if(extras.getString("screenDataIsHomeScreen") != null){ String tmpIsHomeScreen = extras.getString("screenDataIsHomeScreen").toString(); if(tmpIsHomeScreen.trim().equals("1")){ payloadScreen.setIsHomeScreen(true); }else{ payloadScreen.setIsHomeScreen(false); } }
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/28/12 03:47 PM (11 years ago)
Should I download new Self-Hosted Server, or should I just do this edit and save config hassle?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
11/28/12 03:51 PM (11 years ago)
You don't need to download the whole server package. Whenever you request a source package, be it though the buzztouch.com control panel or your own self-hosted control panel, it makes a request of the buzztouch servers to generate the code. So, the fix is already there for you. Just download a new source package from either buzztouch.com or self-hosted for that app, and the fix will be there! Mark
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/29/12 11:58 AM (11 years ago)
I downloaded the project, ran it thru Eclipse, exported new .apk, downloaded to my phone, deleting and replacing the old .apk. I made a change to my SQL table (added a new country> city> category > location listing), and built a new config.txt file. Phone did not tell me there was an update (to config.txt). Nor did I try too hard to see if I could make it tell me. I manually refreshed the data. Spinning Wheel of Death for several minutes, finally went to Settings > Applications > Force Stop. In my DATA URL: statement, the file in the path is www.mydomain.com/config.txt, NOT BT_config.txt. The BT_ part isn't embedded somewhere in the bowels of the .apk, is it? So the two issues I have reported are either not addressed yet, or one has but hasn't happened yet. Update notification, and SWOD.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
11/30/12 02:34 AM (11 years ago)
One thing that I want to look into next: My strategy has been to host the entire config.txt file and update the entire thing, with the idea in mind that eventually I will add more menus and features, beyond the current menu and map structure. While I learned to do that first, with an App that runs just fine, is the matter of the App and the SWOD when trying to update the file. The thing I have not pursued is just a data file for the Map(s) - the 300 locations, separate from being built in to config.txt. Which How To best lays out the best practices for doing that? There's a lot of How To's of varying ages over the life of this site's archive.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
12/01/12 08:42 AM (11 years ago)
Another couple of wasted hours. Still won't refresh the config.txt file at the URL. Neither on the Android phone, nor the emulator. I was watching the LogCat window, and it isn't showing any activity. SWOD in the AVD window, after clicking menu > refresh all data. config.txt file on the URL is 416k. I have another App on the same server, same domain, but different sub directory, that refreshes fine. I see no different in BT Server between the two Apps besides the name, and IDs. Looking for clues.
 
Outbreak
buzztouch Evangelist
Profile
Posts: 452
Reg: May 30, 2011
Colorado
14,620
like
12/01/12 10:31 AM (11 years ago)
It should be fixed now. David corrected some code. Just redownload the source code and compile. It now works for me.
 
UniApps
Aspiring developer
Profile
Posts: 124
Reg: Apr 21, 2012
An American in ...
5,940
like
12/01/12 11:49 AM (11 years ago)
I did yesterday. Did he fix the SWOD as well? Or just what was quoted above?
 
HelperDev
Lost but trying
Profile
Posts: 49
Reg: Nov 16, 2012
New York
3,090
like
02/17/13 04:53 PM (11 years ago)
I am having this issue as well, no refresh is made in Eclipse
 

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.