Discussion Forums  >  Uncategorized

Replies: 1    Views: 407

Hu Cheng
Android Fan
Profile
Posts: 1
Reg: Jun 17, 2011
Bath UK
10
06/24/11 04:53 AM (14 years ago)

Android storing html and images etc locally : HOWTO

In 1.4 Android (I don't think 1.5 is out yet even for early adopters but either way this will should always work). If you have a custom html view and want to pull images or other resources locally for performance put them in the /assets directory of your project. You can then refer to them via 'file:///android_asset/' in your html. So /assets/foo.gif in your project gets pulled locally as <img src='file:///android_asset/foo.gif' /> in your custom html. This works for a custom url also, instead of linking to an external url in the box in buzztouch admin page put in a url to an html file preceded by file:///android_asset/ and so long as you put the html file in you assets directory it will load in a blink of an eye ;) Not sure how this forum deals with html so hopefully the html entities I used above will make this clear. I will be hacking a webpage based game I wrote in 1999 to run in an Android app without having to change hardly any of the html or JavaScript and I will put up a couple of blog posts and link to them here to show what customizations I used on the base Buzztouch project. All in all I think this is a great platform to demystify mobile app development :)
 
Parker @ buzztouch
buzztouch Evangelist
Profile
Posts: 1395
Reg: May 09, 2011
Pacific Grove, ...
24,500
like
06/24/11 03:27 PM (14 years ago)
Sounds Cool! I'm looking forward to seeing this!
 

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.