You can add images and files to your BTv1.5 & BT2.0 Android App several ways.
This is a How-To: Adding Images to the Android Source Code:
You can add images via Eclipse, or by adding them directly to the Source Code files.
In BTv1.5 I prefer adding the images directly to the Source Code files because it’s easier and less confusing.
In BTv2.0 I prefer adding via Eclipse because as soon as you add an image that not supported because of file type or file name, you’ll immediately get an error in Eclipse, allowing you to remedy the problem.
In BTv2.0 it’s basically the same as BTv1.5 except:
Images go in res > drawable folder
You can’t use UpperCase letters or – in Eclipse.
If you created the Dropbox folder & downloaded your Source Code as I recommended previously, you’ll find in your App’s Source Code a folder called “Assets”.
Inside the Assets folder are several folders:
BT_Docs (Place HTML Images here)
Add your files accordingly.
After you add the files to the Source Code you must Compile the App and create and publish a new APK before you’ll see the images in your device.
Tip: Create a folder for all of the images you add to your Buzztouch app. Place copies of your images there. You may (Almost never!) need to re-download the Source Code. If you download the Source Code to the same location all of your images will be lost if you don’t have a backup copy.
Same for docs and other files you add to buzztouch, plus any modifications you’ve made to the Source Code. Yes, see many hours, days, months of work disappear in a fraction of the time it takes you to blink.
You may consider using an image url when building an app to avoid compiling every time you add an image. (I don’t do this, it might be more useful for iOS.)
Consider storing the images locally (in the Source Code) so people wouldn’t have to download them after they’ve already downloaded the app.
HTML Images: I had placed an html file (Map of an area) in an app. I tried placing the .png in the image folder and the HTML in the docs folder but it didn’t work, then placed both in BT_Docs & it worked.
PNG images work the best, as they tend to be smaller in file size. JPG is good for images that are of photographic quality, but generally have bigger file sizes.
In BTv1.5 I give every image in my desktop image folder a prefix, then I select all the items and drag them together into the BT_image folder. Plus it’s easier to locate the image later.
To manage you images it’s easier to add a prefix to each image. By doing do, all your images will be grouped together in Eclipse. The “ahf” stands for “aHelloFred”. I use the “a” to keep the images at the beginning of the list of images to eliminate needless scrolling.
Note you can use ” – ” and capital letters with BTv1.5, but it’ll be a problem if you try to use those images in BT Server v2.1.6.
So avoid future troubles now, and don’t use ” – ” and Capital letters in you image names.
And you cannot use spaces in the image name.
You store the HTML and css docs needed in your BT_docs folder.
Small Device vs Large Device
If you images don’t appear on Large Devices simply add the image to the Large Device box via the BTv2.0 control panel. Since the image has already been added to the Source Code you don’t need to re-publish the app.
example code to use image in HTML doc:
The End / Fred