Higgey
buzztouch Evangelist
Profile
Posts: 394
Reg: Sep 07, 2011
West Midlands
13,540
09/24/12 06:35 AM (13 years ago)

BT 2.0 and using offline

I'm trying to get BTv2.0 working on my own server. I'm making Android apps. Prior to BTv2.0, my apps would download to a device and would not update unless I made any changes. I've found that with BT2.0 that everything is downloaded afresh every time it is looked at. For instance, an html page is downloaded each time the user views it on their device. This is making my apps very slow and not available for use offline. I've also found that custom html (which I use a lot) has an option to allow caching under Document Behaviour, Force Refresh. However, this simply causes an error and the documents will not load at all when I select it. How can I get BTv2.0 to work offline? John
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/24/12 07:11 AM (13 years ago)
Hi John, When you say "an html page is downloaded each time the user views it on their device" are you referring to an HTML page that was included (compiled) with the app, or one referenced via a URL? If it's the latter (URL), then it will be downloaded each time the user tries to access it. However, it is also cached, so it should be available offline. But that assumes the user has accessed it at least once. The Custom HTML screen, which accesses info via a URL, is always downloaded fresh each time the user accesses it. For that screen, the Force Refresh option should have no effect, as a network connection is required to get the content, and it's cached regardless. The best way to ensure offline access to content is to include it with the app. That's not always possible for dynamic content, but static content is a prime candidate for that approach. Mark
 
Higgey
buzztouch Evangelist
Profile
Posts: 394
Reg: Sep 07, 2011
West Midlands
13,540
like
09/24/12 07:24 AM (13 years ago)
Thanks, Mark. I very much appreciate your time, as always. I'm not referencing a url. I'd like to include static content, like html pages, ebooks and text, within the app. How do I do that, please? Sorry for the dumb question but I'm far from being a developer.... John
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
09/24/12 09:24 AM (13 years ago)
Hi John, Not a dumb question at all! For screens like the HTML Doc screen, there is generally the option to specify a filename, or a URL. If you specify the filename, it needs to be included with the app. For both iOS and Android, doc go in the BT_Docs folder. If you are including images in the HTML, then throw those in BT_Images for iOS, and BT_Docs for Android. In your HTML code, you don't need to specify a pathname. Just the filename. For example: <img src="coolimage.png"> Include all the docs you want to make available, and then compile the app. They'll be there and ready for use even if the user is offline. Mark
 
Higgey
buzztouch Evangelist
Profile
Posts: 394
Reg: Sep 07, 2011
West Midlands
13,540
like
09/26/12 07:20 AM (13 years ago)
Thanks, Mark. Most appreciated. John
 
Higgey
buzztouch Evangelist
Profile
Posts: 394
Reg: Sep 07, 2011
West Midlands
13,540
like
10/29/12 05:18 AM (13 years ago)
How do I include documents in the app? I've uploaded a an html doc to Files/Media - Documents Folder on my BT Server. It appears in the File Manager on my server. I've linked a Menu item to it. It does not appear in the Assets/BTDocs Folder when the zip file is downloaded to my PC, and the app displays an error when I select the Menu item that links to the document. I added the html document,again, into the Assets/BTDocs Folder once it the app has been unzipped to my PC. The app give an error message saying "the Web page at file:///android_asset/BT_Docs/ etc might be temporarily down or it may have moved permanently to a new web address" I've definitely made certain that the document is loaded in the file manager and that I have not entered a web address in the "Load from this URL instead" field. Where am I going wrong, please? John
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
10/29/12 08:24 AM (13 years ago)
Hi John, Unfortunately, that's not quite how the File Manager works in buzztouch, here's a video I did that show's how to use it: https://www.youtube.com/watch?v=zEFMUVfxreU What you need to do is copy your media files into your Xcode project itself. Here is how you do that: http://www.buzztouch.com/files/howtos/Adding_Files_To_A_Project_v1.0.pdf Hope this helps a bit! Mark
 
Higgey
buzztouch Evangelist
Profile
Posts: 394
Reg: Sep 07, 2011
West Midlands
13,540
like
10/29/12 09:46 AM (13 years ago)
Hi Mark, Once again, many thanks for your kind assistance. I think that I've got it now! I'll try creating an app from afresh and see how it goes. Kind regards, John.
 

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.