Discussion Forums  >  WebViews and HTML for Mobile

Replies: 8    Views: 90

gogotiti
Android Fan
Profile
Posts: 7
Reg: Apr 08, 2013
curry
70
07/06/13 02:11 PM (10 years ago)

Html 5 homescreen no internet.

hi , i can't set up my app to work without internet. my home screen is an html5 file but the app need an internet connection it doesn't matter if the page is cached. The file is attached in the right place for no need of internet (assets/BT_doc/). What can an i do to solve this ? my Bt_config {"BT_appConfig": { "BT_items":[ {"itemId":"JA0549DC1B5967E1DB6F0E3F2", "itemType":"BT_app", "buzztouchAppId":"JA0549DC1B5967E1DB6F0E3F2", "buzztouchAPIKey":"6C33DEA5DEBBFFEA80E461E", "dataURL":"", "reportToCloudURL":"", "registerForPushURL":"", "lastModified":"Thu, 04 Jul 2013 06:26:51 -0700", "lastPublished":"Thu, 04 Jul 2013 06:26:51 -0700", "name":"Kings", "version":"1.0", "currentMode":"Design", "startLocationUpdates":"0", "promptForPushNotifications":"0", "allowRotation":"0", "BT_themes":[{"itemId":"75167C04AF8DB15BFCD6A98", "itemType":"BT_theme", "itemNickname":"Default Theme", "navBarStyle":"solid", "statusBarStyle":"hidden", "backgroundColor":"#000000"} ], "BT_tabs":[ ], "BT_screens":[{"itemId":"02E1EF2CE098B6DEA9B8834", "itemType":"BT_screen_htmlDoc", "itemNickname":"juego", "navBarTitleText":"juego", "navBarStyle":"hidden", "localFileName":"index.html", "forceRefresh":"0","dataDetectorType":"0", "preventAllScrolling":"1", "hideVerticalScrollBar":"1", "hideHorizontalScrollBar":"1", "preventScrollBounce":"1", "preventUserInteraction":"1"} ] } ] }}
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/06/13 03:26 PM (10 years ago)
Mark (GoNorthWest) did a nice little write up on the 'ins and outs' of online/offline apps. Perhaps that may shed some light on the situation. https://www.buzztouch.com/files/howtos/Understanding_App_Refresh_and_Offline_Apps_v1.0.pdf The fundamental key is that for an offline app to work, the resource *must* be included in the app bundle. your 'index.html' file will need to be 'added' to your project before it will work. Cheers! -- Smug
 
gogotiti
Android Fan
Profile
Posts: 7
Reg: Apr 08, 2013
curry
70
like
07/06/13 03:35 PM (10 years ago)
Thanks for reply. As it says in the document, I have my file index.html packaged in my app and in the proper place and also removed the data and cloud URL link, as you can see in my bt_config, but for some reason my app still need internet to work . :S
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/06/13 03:52 PM (10 years ago)
If you're somewhat familiar with the code, you can put this on line 310 of your BT_screen_htmlDoc.m file: [BT_debugger showIt:self theMessage:[NSString stringWithFormat:@"This is my file: %@", saveAsFileName]]; And when you run your app, look in the logfile for this log entry. If it does not appear, then iOS is not finding your document in the app bundle. Also, look for other log entries, such as "Loading file from Xcode bundle", File does not exist in bundle or cache", or some of the other log entries; they give great hints. Let us know what you find! Cheers! -- Smug
 
gogotiti
Android Fan
Profile
Posts: 7
Reg: Apr 08, 2013
curry
70
like
07/06/13 04:12 PM (10 years ago)
i forgoted to say that i'am using and adroid device , that code would work anyway? maybe is a silly question , but i'am a noob with this.
 
gogotiti
Android Fan
Profile
Posts: 7
Reg: Apr 08, 2013
curry
70
like
07/06/13 04:16 PM (10 years ago)
i forgoted to say that i'am using and adroid device , that code would work anyway? maybe is a silly question , but i'am a noob with this.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/06/13 04:34 PM (10 years ago)
Oh, no that would not work for Android. But there is logging for Android, I just don't have one of those projects in front of me right now... Check the LogCat output from your Android debugger; there should be similar log statements that can tell you if your resource is being used. And seek out GoNorthWest on YouTube; Mark has some excellent Android tutorials. Cheers! -- Smug
 
gogotiti
Android Fan
Profile
Posts: 7
Reg: Apr 08, 2013
curry
70
like
07/06/13 04:38 PM (10 years ago)
ok a will , thanks . As soon i got something , i will shared.
 
gogotiti
Android Fan
Profile
Posts: 7
Reg: Apr 08, 2013
curry
70
like
07/07/13 02:40 PM (10 years ago)
I'm sorry , there was a problem in my html file that i have forgotten to fix . thats why the application needs internet connection. Thanks so much for your help.
 

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.