Discussion Forums  >  WebViews and HTML for Mobile

Replies: 11    Views: 455

AdamDynamic
Lost but trying
Profile
Posts: 18
Reg: Jul 22, 2012
London
4,530
11/01/12 05:54 AM (13 years ago)

HTML5 BT page / JQuery mobile / location in Eclipse?

Hey, I'm still starting out learning how to make apps, so if this is an obvious question please forgive me! :) Reading through this forum, it seems that you can use JQuery scripts on the Buzztouch HTML5 add-in pages. I'd like to make my app as native as possible (i.e. with as few requirements to be connected to the internet as possible) - my question is, in Eclipse (i'm building for Android), where should I be installing the minimised .js jquery files? Any help on this would be appreciated, if you require any more information please ask! Thanks, Adam
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
11/01/12 06:23 AM (13 years ago)
The easiest approach is to put everything in the assets folder. Use the customURL plugin, not the customHTML plugin and point to the html page like this: file:///android_asset/my_html_page.html. You can put sub-directories in the assets folder just like a regular website set up. So you might put your webpage in a new directory so you can add many, eg: file:///android_asset/directory/directory/index.html etc etc
 
AdamDynamic
Lost but trying
Profile
Posts: 18
Reg: Jul 22, 2012
London
4,530
like
11/01/12 06:55 AM (13 years ago)
Ah ok, so if I put everything (jquery files, css files etc) in the assets folder (with the BT_Audio, BT_Docs folders etc) then I can just set it up like I would a normal web page? (which I know how to do :) That's great, thanks for the help! Adam
 
AdamDynamic
Lost but trying
Profile
Posts: 18
Reg: Jul 22, 2012
London
4,530
like
11/01/12 07:02 AM (13 years ago)
Ah ok, so if I put everything (jquery files, css files etc) in the assets folder (with the BT_Audio, BT_Docs folders etc) then I can just set it up like I would a normal web page? (which I know how to do :) That's great, thanks for the help! Adam
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
11/01/12 07:11 AM (13 years ago)
Yes, for sure! Here's an example: ... So the custom url would be: <a href="file:///android_asset/gallery/gallery/gallery.html" target="_blank" rel="nofollow">file:///android_asset/gallery/gallery/gallery.html</a> and the gallery is pulling images from the puzzle directories, using relative paths, eg: /puzzle1/img/1/xx.jpg ... No internet connection needed.
 
AdamDynamic
Lost but trying
Profile
Posts: 18
Reg: Jul 22, 2012
London
4,530
like
11/01/12 07:41 AM (13 years ago)
Works great, many thanks!
 
Redbullet
Aspiring developer
Profile
Posts: 42
Reg: Mar 05, 2011
Earth
3,170
like
04/22/13 06:07 PM (12 years ago)
Hi raveyd, Can you give an advise, kinda being frustrated now....:( Im working on an Android project, my files sits on /assets/portfolio and all subdirectories and files here also. https://dl.dropboxusercontent.com/u/26678004/screencap1.png I have used Screen webURL and have declared --> file://assets/portfolio/index.html on the control panel. Still complains cant find the file, your expert advise is greatly appreciated. Thanks!
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/23/13 03:31 AM (12 years ago)
The screencap would be: file:///android_asset/portfolio/index.html
 
Redbullet
Aspiring developer
Profile
Posts: 42
Reg: Mar 05, 2011
Earth
3,170
like
04/23/13 06:54 AM (12 years ago)
Hi raveyd, i still have issues the html file not loaded, but if I use external url works perfectly. Im using screen custom url
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/23/13 07:22 AM (12 years ago)
It's definitely the right path - what happens when the screen loads, or tries to load? customURL is the right plugin to use.
 
Redbullet
Aspiring developer
Profile
Posts: 42
Reg: Mar 05, 2011
Earth
3,170
like
04/24/13 02:36 AM (12 years ago)
Hi raveyd, I have followed your instructions still the same issue. The simulator and device itself reports file not found
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
04/24/13 04:15 AM (12 years ago)
What is the path you're using?
 

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.