Discussion Forums  >  Uncategorized

Replies: 10    Views: 315

baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
05/17/11 03:21 AM (14 years ago)

Offline HTML

Are Custom HTML screens stored locally for offline use? (Not just cached) Or would I need to use HTML documents? Thanks.
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/17/11 03:33 AM (14 years ago)
v1.4 or v1.5? iOS or Android? v1.4 doesn't store any document locally but does store HTML text you copy-n-paste in the form in the control panel for Custom Text / HTML screens. V1.5 is far more sophisticated and sometimes does, sometimes doesn't, depending on several things. Custom HTML in v1.5 is saved locally and available offline. You could also use a Custom HTML document and add it to your xcode project to make it available.
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
05/17/11 03:23 PM (14 years ago)
Sorry David is v1.5 iOS I have several custom HTML screens in my app and thought that the data in them was going to be available offline. however in testing on my device when accessing a custom HTML screen (with no connection) I get an error about data for the screen not being downloaded due to no connection. Having looked at the BT config file I can see no sign of the actual html data, is this where it should be stored? It is important for my app to be usable offline so if needed I will use html documents stored within the app, but would prefer to use custom html for ease of updating. Thanks
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/17/11 10:47 PM (14 years ago)
OK, good info. The BT_config.txt file describes where the HTML 'is' not the HTML itself - as you already realize. If you enter the FILE NAME of an HTML document in your control panel, you'll see that in the BT_config.txt. This tells the app to look in the Xcode project for that file. In other words, add the HTML file to the BT_Docs folder, then tell the control panel what the name of it is. Alternatively, if you use the Custom HTML sceen and paste the HTML in the control panel, the BT_config.txt will how a dataURL. This dataURL tell the app where to fetch the HTML from. When it fetches it, it will store it for offline use. This means the app will need the internet the 'first time' that file is loaded but not the next times.
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
05/18/11 12:41 AM (14 years ago)
Thanks as always David - understand about the HTML now. However on full testing of my app without a data connection the following occurs. - The 'Home' screen loads fine - Clicking ANY menu item on the home screen I get the following message: 'There was a problem downloading some data. Check your internet connection then try again.' but the next screen loads behind this error message. - If I remove the error message I can view the new screen but again clicking through to another screen gives the same outcome - i.e. error message with screen data loaded behind it. I have tried this both on my device and on the simulator and the same occurs. I have tried 'disconnecting' from buzztouch (removing config Data URL and Report to Cloud URL) but the same occurs.
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
05/18/11 12:43 AM (14 years ago)
Have also tried using the simulator and console - here is the console output for clicking a menu item on the 'home' screen (this loads another menu in the background with error message on top): 'console output removed'
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/18/11 12:51 AM (14 years ago)
Makes perfect sense - your description. The trick is understanding where all the different data comes from. Example: There are a few screens listed in the console output (like Adventure) that are looking online for their configuration data. This is because a dataURL is set in the control panel (Advanced Settings). The idea is that each screen can 'look' online for dynamic content. If you don't want this to happen, remove the dataURL's. I realize this gets complicated but it's a matter of balancing all the different needs. Some folks LOVE powering their apps from the control panel. Some enjoy powering their apps from their own site and some want no connection to a server at all. This just means you'll need to keep learning how it's setup and where all the data is coming from. Generally speaking: Every screen has a dataURL (not all but most) and if it's set, the app will look online for content and alert the user if it cannot find it. When it cannot find it, it uses the local data from the configuration file. I could go on and on about this and don't want to confuse you more. I think you're beginning to understsand more completely how it works so you should be able to adjust it to best suit your needs. FYI: I shortened your last post to make the thread easier to read ;-)
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
05/18/11 01:08 AM (14 years ago)
And your response makes even more perfect sense - excellent thank you - I understand completely! (for now anyway!!) Just as a quick side did you get anywhere with my post the other day - Custom HTML links v1.5 (strange behaviour)? Just curious really - no pressure - I realise you are very busy and to be honest I would rather your time was spent on more important things! but as I said I am curious if you do find anything out!
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
05/18/11 01:19 AM (14 years ago)
The facebook one right? I looked a bit, didn't get much figured out and added it to a list ;-). NOTHING on the list goes ignored, just takes a bit sometimes.
 
baywebnz
Aspiring developer
Profile
Posts: 92
Reg: Oct 25, 2010
location unknow...
920
like
05/18/11 01:44 AM (14 years ago)
David thanks again - I, like everyone on here appreciate all your help so much. To help you and to make the most of your precious time I will no longer post thank yous - to save you the valuable time taken to open and read it - instead, if I do not reply to a thread please assume that you have answered any query I had and that I am very grateful for your help.
 
Davidwigl
Lost but trying
Profile
Posts: 16
Reg: Aug 02, 2011
Washington DC
160
like
12/21/11 09:53 AM (14 years ago)
Does anyone know what control panel David is referring to in the 4th post of this thread? (also copied below) I'd like to add an html doc to my project for offline use but don't know where to put the file name... -- OK, good info. The BT_config.txt file describes where the HTML 'is' not the HTML itself - as you already realize. If you enter the FILE NAME of an HTML document in your control panel, you'll see that in the BT_config.txt. This tells the app to look in the Xcode project for that file. In other words, add the HTML file to the BT_Docs folder, then tell the control panel what the name of it is. Alternatively, if you use the Custom HTML sceen and paste the HTML in the control panel, the BT_config.txt will how a dataURL. This dataURL tell the app where to fetch the HTML from. When it fetches it, it will store it for offline use. This means the app will need the internet the 'first time' that file is loaded but not the next times. --
 

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.