Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 25    Views: 65

vijaykannan
Android Fan
Profile
Posts: 10
Reg: Aug 28, 2012
bangalore
1,750
08/29/12 10:28 PM (13 years ago)

help

how to access my customize html page in offline
 
SkullyFox
Apple Fan
Profile
Posts: 169
Reg: Jul 15, 2012
Armidale
12,190
like
08/29/12 10:42 PM (13 years ago)
the only way to display a HTML page offline is to use the HTML plugin instead of the Custom URL plugin, and include the HTML page as a document in your project (in the same manner you include pictures). Cheers, Dave
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/30/12 12:28 AM (13 years ago)
Hi @vijaykannan, Welcome to buzztouch! @SkullyFox is absolutely correct. One thing worth mentioning though is that if the user accesses the content from a Custom HTML/Text screen while connected to the network, it will download that content to cache, and it "should" be available offline. Otherwise, though, all Custom HTML/Text screens require a network connection. Mark
 
vijaykannan
Android Fan
Profile
Posts: 10
Reg: Aug 28, 2012
bangalore
1,750
like
08/30/12 02:37 AM (13 years ago)
i add custom HTML-page for my application.but when am using the application in offline the cache memory is not stored the custom HTML-page.am getting the pop-up window as(File's not yet downloaded).
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
08/30/12 07:22 AM (13 years ago)
You need to switch off the force refresh option to make it cache the doc otherwise it will always check via internet to refresh the page.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
08/30/12 08:43 AM (13 years ago)
Another possible error is that you're making a modification to the page and the last save you make is not to the content. Example Save content Save background color You'll encounter error. Save background color Save content You'll not encounter the error. Fred
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/30/12 08:51 AM (13 years ago)
@MrStuck, I asked @David about that once, and he said, for any screen where the default action is to consult a URL for the content (like the Custom HTML/Text screen), that it caches it every time it grabs the info, and ignores the setting you recommended. So, if a user is accessing the content for the first time, and they have a network connection, it should cache the content and make it available for any subsequent requests. If the user is trying to access the content for the first time, and they have NO network connection, it will fail, as there is no cached copy. Unfortunately, there is no way to "pre-cache" the content before the user tries to access it for the first time. Mark
 
vijaykannan
Android Fan
Profile
Posts: 10
Reg: Aug 28, 2012
bangalore
1,750
like
08/30/12 09:58 PM (13 years ago)
@Mrstuck, Heartly thanks for your replay.Where the force refresh option is present and how to off this option.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/30/12 10:00 PM (13 years ago)
It's in the Advanced Properties section for each screen. Check under Document Behavior link for that screen. Mark
 
vijaykannan
Android Fan
Profile
Posts: 10
Reg: Aug 28, 2012
bangalore
1,750
like
08/31/12 12:00 AM (13 years ago)
@Mrstuck, Heartly thanks for your replay.Where the force refresh option is present and how to off this option.
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
08/31/12 12:08 AM (13 years ago)
Like @GoNorthWest stated above its in the advanced properties section (just scroll further down on the page) and select "document behaviour". you will find the dropdown box to turn it off. Check you have working wifi or data connection at first run of the screen so the device grabs and caches a copy of the doc otherwise it will give you error.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/31/12 12:10 AM (13 years ago)
And keep in mind that for the screen we're talking about, the setting has no effect, no matter which option you choose. It will always cache a Custom HTML/Text screen, even if you turn off caching. Mark
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
08/31/12 12:32 AM (13 years ago)
@GoNorthWest. I understand that but I think the problem arises when an android app is first launched as it advises the app content has changed and to refresh. I have just tried on an app I have and once the main screen had loaded I switched off my data connection and true enough I get the same error of file not yet downloaded when attempting to get custom html screen. it seems that these are lost when you choose to refresh so a working internet connection is required when refreshing data. Preventing the initial refresh data at first launch may solve the problem and switching off force refresh in screen may prevent the problems as it should cache the doc that's included in the project.
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
08/31/12 12:41 AM (13 years ago)
@GoNorthWest I remember reading somewhere that matching the config files prevents the message to refresh at launch. can't remember if it was yourself or not that posted it but it may be the answer to the problems that @vjkannan is having.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/31/12 12:57 AM (13 years ago)
Syncing the config files should indeed prevent the request for a refresh when the app opens, provided that NO changes have been made to the control panel. My understanding of the problem here was that he wanted to make his custom HTML/text page available offline. Opening it once should cache that page. You cannot change whether it at least tries to fetch the page...that's the nature of an external resource! In any event, he's got some things to experiment with! Mark
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
08/31/12 01:02 AM (13 years ago)
The "force refresh" setting in Custom HTML / Text does have an effect. If the HTML page caches then it will not refresh even if you set it to refresh. If the HTML page doesn't cache everytime you exit the page it will refresh when you reopen the page. The secret is to set it to "force refresh" before you ever open the screen. Fred
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
08/31/12 01:19 AM (13 years ago)
@GoNorthWest Your understanding is quite correct and your information is also. I was simply looking at from the angle of what's causing the error message and the only conclusion I can draw is that the device installed on may not have a data connection to obtain the doc in the first instance. as you say I'm sure there is enough here now to resolve the issue unless its something completely different
 
vijaykannan
Android Fan
Profile
Posts: 10
Reg: Aug 28, 2012
bangalore
1,750
like
08/31/12 01:51 AM (13 years ago)
@Mrstuck, Heartly thanks for your replay.Where the force refresh option is present and how to off this option.
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
08/31/12 02:10 AM (13 years ago)
please read above posts for solution to your enquiry. please let us know if you get it resolved.
 
vijaykannan
Android Fan
Profile
Posts: 10
Reg: Aug 28, 2012
bangalore
1,750
like
08/31/12 03:48 AM (13 years ago)
Thank u guys.i got it in offline :-)
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
08/31/12 04:20 AM (13 years ago)
@Vjaykannan glad you got it resolved. Can you tell us what was causing the problem for future reference?
 
vijaykannan
Android Fan
Profile
Posts: 10
Reg: Aug 28, 2012
bangalore
1,750
like
08/31/12 05:28 AM (13 years ago)
@Mrstuck, When am using that custom HTML-page in offline.Back end the cache memory stores that page.but when am accessing lot of custom HTML-page the cache memory will be take more space.so it will be a drawback for my app.so kindly say how to store that page in memory card(it is possible to save the custom HTML-page in Memory card automatically??).
 
Mr stuck
Android Fan
Profile
Posts: 974
Reg: Apr 09, 2012
Fife, Scotland
15,740
like
08/31/12 05:51 AM (13 years ago)
Unsure of this. if you enable move to sd this will take the bulk of the main app over to sd. perhaps Fred or Mark can help you further with this.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
08/31/12 07:41 AM (13 years ago)
One must understand that the Custom HTML /Text screen is merely an online HTML Doc stored in the Control Panel and viewed with the HTML Doc WebView. Simply put: Online Doc (stored on Control Panel) + HTML Doc Plugin = Custom HTML /Text Plugin As Buzztouch states in the Buzztouch v1.5 Documentation, "The screen doesn't exist". (BTv2.0 is at it's core simply BTv1.5 on steroids.) (There's actually Custom HTML / Text files (.java &.xml for Android and .h &.m for iOS) but I certain it's the HTML Doc plugin by another name. ) It's just the clever use of a HTML Doc, the HTML Doc plugin and the Control Panel. If you wish to store on memory card you can simply use the HTML Doc (embed) screen and allow the app to move to SD Card. The Custom HTML Doc is not a special type of HTML. HTML is HTML. No need to reprogram BTv2.0 to move the Custom HTML / Text to SD card. Fred
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
08/31/12 11:02 AM (13 years ago)
Good explanation, Fred!
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
08/31/12 11:29 AM (13 years ago)
Every time I explain it I learn something new. Had to take a look, but when I did I realized that in BTv2.0 there are Custom HTML / Text files as opposed to BTv1.5 where there are no Custom HTML, Text files. That explains why in BTv2.0 you can add background color when in BTv1.5 you can't. Fred
 

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.