• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Here is a link to what readers have said about previous edtions of Pro Anroid 3

 
author
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have collected a few kudos from readers of the previous editions of this book and posted at the link below.

This is to convince myself once in a while that the book is not entirely lame and it is being used

http://www.satyakomatineni.com/proandroid3/kudos

Thanks
Satya
 
Ranch Hand
Posts: 154
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Satya,

I have the previous version of your book i.e.,Pro Android 2 and i think its really a great book the attention to detail is so good that even a Novice can pick it up and learn a big deal about android. Thank you guys for such a good book it helped me
 
author
Posts: 51
Android Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Zoheb! We're very glad you were able to learn Android through our book. I know I speak for both of us when I say that we went back and made the content from the previous edition even better. For example, the Controls chapter in PA2 didn't go into much detail on the Adapters (i.e., the mechanism for populating ListViews, GridViews, etc). Now in Pro Android 3 we go into lots of details, and there are several example applications using adapters with several different types of list controls. Besides lots of improvements all over, we added a lot of new content as well. Not just the Android 3.0 topics but also new chapters on Sensors, the Contact API, Alarm Manager and several more that get into the internals of Android so you can really appreciate how it works under the covers.

- dave
 
Ranch Hand
Posts: 81
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This looks like a good book and I look forward to reading it. I have yet to take a look at the android OS and I am very interested. Congrats on the book.

Cheers,
Greg Funston
 
zoheb hassan
Ranch Hand
Posts: 154
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Guys have you written something about loading images into ListView over an network connection, cause i did it the wrong way and found that the list became very sluggish because it has to download images everytime, So i am thinking of cahing those images before putting them for display in list, what is the best form of storage for persisting those downloaded images that beign said there are aout 15 gif images of small size
 
Dave MacLean
author
Posts: 51
Android Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're using an HTTP connection to download the images, there's a way to enable caching within it, so you might achieve what you want that way. Every time you start your app, it would go fetch the images, which may not be exactly what you want. But while your app is running, a new fetch should just find the image in the HTTP cache and avoid another fetch over the network.

Otherwise, you should be able to create an image folder on the SD card to store your downloaded files. Save them off in a format that doesn't require conversion next time you read it back in. Also, if you put an empty file with the filename ".nomedia" in the directory with your image files, Gallery will ignore them. Technically the media scanner will ignore them so Gallery never finds out about them.

- dave
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Dave MacLean wrote:If you're using an HTTP connection to download the images, there's a way to enable caching within it, so you might achieve what you want that way. Every time you start your app, it would go fetch the images, which may not be exactly what you want. But while your app is running, a new fetch should just find the image in the HTTP cache and avoid another fetch over the network.

Otherwise, you should be able to create an image folder on the SD card to store your downloaded files. Save them off in a format that doesn't require conversion next time you read it back in. Also, if you put an empty file with the filename ".nomedia" in the directory with your image files, Gallery will ignore them. Technically the media scanner will ignore them so Gallery never finds out about them.

- dave



So every app has to manually cache it ... would be nice if there was a way to load it via an http service from the browser so you can reuse that cache.

Hadn't thought about this one, I tend to think for most apps you want to have the images in the apk file.
 
zoheb hassan
Ranch Hand
Posts: 154
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will be sure to check what you suggested Dave

Thanks,
Zoheb
 
Dave MacLean
author
Posts: 51
Android Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here is some more information on the topic.

First off, I want to clarify something that Augusto said about wanting all images in the apk file. The apk is static, fixed, read-only. It is ideal if your images don't change so you can include them with your apk (under /res/drawable, or /res/raw or /assets). But of course you can't update these images at runtime. You can only update the images by updating your application by releasing a new apk. So if you want to update images by downloading them, you can't have them in the apk.

There is another method I should have mentioned for downloading files from the network. The DownloadManager class can be used to download files in the background. There's a sample program in chapter 11 to demonstrate this. It would typically be used for large file downloads but you could try it for small files as well.

And one more class that you may want to consider, assuming your image files are small: the brand new LruCache (in Android 3.1 and in the compatibility package). LRU = least recently used. It basically forms a queue of objects and as you access items, it moves them to the front of the queue. When you add an object, if the queue is full, the new object goes on the front and the last object is dropped off the back. If you size this cache to the number of images you want to work with, it should work. It's so new I haven't had a chance to try it out yet myself, but it's worth a look.

- dave
 
zoheb hassan
Ranch Hand
Posts: 154
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there going to be a indian print edition of Pro Android 3
 
Dave MacLean
author
Posts: 51
Android Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Regarding a print version of Pro Android 3 in India, here is the response from our publisher:

Management is working to find a distributor in India but this is still in the works, I believe the books will be significantly cheaper if they are printed and distributed in India. I don't have anything other than that to say on this matter but just know that it is in the works.

So there you have it.

- dave
 
zoheb hassan
Ranch Hand
Posts: 154
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hope the Management's effort come trough

-Zoheb
 
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic