[android-developers] Re: getExternalStorageDirectory() on NEXUS S

2011-01-29 Thread Tabman
It's forced into the built-in space that will get picked up by the
Android media scanner when it indexes EXTERNAL_CONTENT_URI.

btw I don't think the media scanner picks it up. The media scanner
would need to be explicitly told to look at '/mnt/emmc'

On Jan 4, 12:45 pm, Tabman tabishfay...@gmail.com wrote:
 Thanks Doug,

 Your reply is very helpful, you also replied to another post of mine
 so thanks again :)

 On Dec 20 2010, 1:51 am, Doug beafd...@gmail.com wrote:







  On Dec 19, 2:14 pm, Tabman tabishfay...@gmail.com wrote:

   I have a question related to this. How many phones are out there with this
   type of behavior ? I want to access Camera Photos/Videos on a phone and 
   for
   that I've used EXTERNAL_CONTENT_URI but it seems that approach would fail 
   on
   a phone likeDroidIncredible. How should I design my app such that it is
   able to get camera data from any android phone ?

  It will fail on theDroidIncrediblebecause they didn't wire up that
  URI to point to the external storage mounted at, I think, /emmc.
  That's fragmentation for you.  (I think they did it wrong.)  But at
  least their camera app doesn't put content on the sdcard.  It's forced
  into the built-in space that will get picked up by the Android media
  scanner when it indexes EXTERNAL_CONTENT_URI.

  However, it works on Galaxy S devices because its built-in external
  space is wired to that URI --AND-- if you do have a sdcard in the
  device, it will mount THAT filesystem underneath the internal storage
  space.  So if the internal storage space was at /mnt/sdcard, your
  additional sdcard would be at /mnt/sdcard/external_sd.  And when the
  Android media scanner runs to index media referenced by
  EXTERNAL_CONTENT_URI, it will scan all of /mnt/sdcard, including the
  sdcard.  So they're doing it in a more compatible way that lets you
  get at the media on the user's sdcard in addition to the built-in
  space.

  I don't know what the Nexus S or HTC Hero do.  I also don't know what
  this Picasa Tool Pro does.  Maybe it doesn't query against the Android
  content providers for media and does its own thing instead.

  Doug

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] push audio to caller on android

2011-01-24 Thread Tabman
Is it possible in android to push an audio to the listener (caller) at
the other end without using phone's speaker ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] getThumbnails through droid incredible phoneStorage mount

2011-01-21 Thread Tabman
I used the following method to access droid incredible onboard memory
data:

photosCursor =
mActivity.managedQuery(MediaStore.Images.Media.getContentUri(phoneStorage),
photoColumns, null, null, MediaStore.Images.Media.DATE_MODIFIED + 
DESC);

How will it effect the following methods, right now it looks up
thumbnails with wrong id:

MediaStore.Images.Thumbnails.getThumbnail(activity.getContentResolver(),
Long.valueOf(id), MediaStore.Images.Thumbnails.MINI_KIND,
thumbBitmapOptions );

or

MediaStore.Video.Thumbnails.getThumbnail(activity.getContentResolver(),
Long.valueOf(id), MediaStore.Video.Thumbnails.MINI_KIND,
thumbBitmapOptions);


I understand these methods are also somehow linked with phoneStorage
URI ?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: getThumbnails through droid incredible phoneStorage mount

2011-01-21 Thread Tabman
What I mean to ask is that I think the getThumbnail() looks for media
in the wrong location and somehow it should be made aware of the
correct URI perhaps someway through ContentResolver.

On Jan 21, 4:43 pm, Tabman tabishfay...@gmail.com wrote:
 I used the following method to access droid incredible onboard memory
 data:

 photosCursor =
 mActivity.managedQuery(MediaStore.Images.Media.getContentUri(phoneStorage),
 photoColumns, null, null, MediaStore.Images.Media.DATE_MODIFIED + 
 DESC);

 How will it effect the following methods, right now it looks up
 thumbnails with wrong id:

 MediaStore.Images.Thumbnails.getThumbnail(activity.getContentResolver(),
 Long.valueOf(id), MediaStore.Images.Thumbnails.MINI_KIND,
 thumbBitmapOptions );

 or

 MediaStore.Video.Thumbnails.getThumbnail(activity.getContentResolver(),
 Long.valueOf(id), MediaStore.Video.Thumbnails.MINI_KIND,
 thumbBitmapOptions);

 I understand these methods are also somehow linked with phoneStorage
 URI ?

 Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to monitor android application memory leak? is there tools do it?

2011-01-10 Thread Tabman

http://www.curious-creature.org/2009/02/07/track-memory-allocations-on-android/
http://www.curious-creature.org/2008/12/18/avoid-memory-leaks-on-android/

On Jan 10, 10:36 am, water boiled boiledwater4...@gmail.com wrote:
 I want to find my android application whether has memory leak  . and
 some tool help me do i

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] partial wakelock for 3G in Android

2011-01-08 Thread Tabman
Hello,

Anyone from android development team confirm the answer to this:
http://stackoverflow.com/questions/4628058/partial-wakelock-for-3g-in-android/

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Trying to get my head around multi screen densities. With more info

2011-01-07 Thread Tabman
Not exactly the answer to your question but eventually I think you
will find this helpful to test that you got what you are intending
from your application:

http://2cupsoftech.wordpress.com/2011/01/01/checking-your-app-against-android-market-technical-filters/

On Jan 6, 1:22 pm, Damien Cooke cooke.dam...@gmail.com wrote:
 I have the following:

 supports-screens
        android:smallScreens=false
        android:normalScreens=false
        android:largeScreens=true
        android:anyDensity=true /

 My app currently only support the 480x800 screen size (I will be improving 
 this, but that is how it is right now)  my question is:  Does 
 android:anyDensity=true mean Android will sort out the densities (despite 
 the fact I have only provide 240dpi assets) or does it mean I need to provide 
 assets for all known density classes?

 I want to support the Galaxy TAB - it is a large screen (600x1024) with 
 density of hdpi, it turns out that my HTC desire  has a large screen 
 (480x800) with a density of hdpi.  So these devices are indistinguishable to 
 android as they fit into the same categories. Now the issue is that i 
 designed it to look great on the HTC and now I have the Galaxy I want to fix 
 it to look good on that too.  So the background image on the listView is 800 
 wide which looks great on the HTC but not so much on the TAB as it is centred 
 and the icon that is on the left side on the HTC is blowing in the breeze on 
 the TAB.  So I have some issues and I am really not getting anywhere.  So if 
 anyone could point me in the right direction as to the proper process to 
 follow to solve this I would be eternally grateful.  

 Regards
 Damien

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to interrupt a blocking I/O operation?

2011-01-07 Thread Tabman
I think you can extend the InputStream class and override its read
method and inside read you can cancel/stop the read loop operation
whenever you want to.

Here is the source for InputStream.java 
http://www.docjar.com/html/api/java/io/InputStream.java.html

Let me know if this solves your problem.

On Jan 7, 7:07 pm, ivan istas...@gmail.com wrote:
 I'm wondering what the currently suggested method is for interrupting
 a read operation of a socket input stream?

 I know that traditionally the read could be interrupted by closing the
 socket from another thread and catching an IOException, but I'm not
 quite sure how to get at the socket from the apache classes.

 Maybe I should use some sort of interruptible channel instead ... ?

 Any links or help is greatly appreciated.

 My code looks like this -- minus most of the error handling:

 org.apache.http.impl.client.DefaultHttpClient
 org.apache.http.client.methods.HttpGet
 org.apache.http.HttpResponse

 DefaultHttpClient client = new DefaultHttpClient(httpParameters);

 HttpGet request = new HttpGet(Uri);

 HttpResponse response = client.execute(request);

 InputStream entityStream = response.getEntity().getContent();

 try
 {
    bytesRead = entityStream.read(data);}

 catch (IOException ex)
 {

 }



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: getExternalStorageDirectory() on NEXUS S

2011-01-04 Thread Tabman
Thanks Doug,

Your reply is very helpful, you also replied to another post of mine
so thanks again :)


On Dec 20 2010, 1:51 am, Doug beafd...@gmail.com wrote:
 On Dec 19, 2:14 pm, Tabman tabishfay...@gmail.com wrote:

  I have a question related to this. How many phones are out there with this
  type of behavior ? I want to access Camera Photos/Videos on a phone and for
  that I've used EXTERNAL_CONTENT_URI but it seems that approach would fail on
  a phone likeDroidIncredible. How should I design my app such that it is
  able to get camera data from any android phone ?

 It will fail on theDroidIncrediblebecause they didn't wire up that
 URI to point to the external storage mounted at, I think, /emmc.
 That's fragmentation for you.  (I think they did it wrong.)  But at
 least their camera app doesn't put content on the sdcard.  It's forced
 into the built-in space that will get picked up by the Android media
 scanner when it indexes EXTERNAL_CONTENT_URI.

 However, it works on Galaxy S devices because its built-in external
 space is wired to that URI --AND-- if you do have a sdcard in the
 device, it will mount THAT filesystem underneath the internal storage
 space.  So if the internal storage space was at /mnt/sdcard, your
 additional sdcard would be at /mnt/sdcard/external_sd.  And when the
 Android media scanner runs to index media referenced by
 EXTERNAL_CONTENT_URI, it will scan all of /mnt/sdcard, including the
 sdcard.  So they're doing it in a more compatible way that lets you
 get at the media on the user's sdcard in addition to the built-in
 space.

 I don't know what the Nexus S or HTC Hero do.  I also don't know what
 this Picasa Tool Pro does.  Maybe it doesn't query against the Android
 content providers for media and does its own thing instead.

 Doug

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Sensitivity of SCROLL_STATE_FLING event

2011-01-04 Thread Tabman
Hello,

I'm using AbsListView.onScrollListener, is there a way to decrease the
sensitivity of when SCROLL_STATE_FLING is detected, I feel even on
small scroll it fires the SCROLL_STATE_FLING event

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Submitting one application with different apk files for different screen sizes

2011-01-04 Thread Tabman
Why do you wanna such a thing ?

Have you read the following:
http://developer.android.com/guide/practices/screens_support.html

On Dec 30 2010, 3:31 am, edm...@gosub60.com edm...@gosub60.com
wrote:
 Hi,

 We want to submit one application but separate the different sizes
 with separate apk files. How can we do this and how can we make sure
 each apk file for the application is made available for it's specific
 size only. We want to make sure each apk file submitted for the one
 application wont be available for all sizes. We appreciate any
 information you can help us with. Thank you so much for your time and
 help.

 Thank you,
 Edmond

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Does SoftReference calls .recyle() on a Bitmap ?

2011-01-02 Thread Tabman
Hi,

If I store bitmaps in a hashmap using SoftReference, will
SoftReference call .recycle() on the Bitmap ? And if it doesn't then
what would be a way to clear the bitmap properly from memory under the
given situation ?

thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Drawable advantage over bitmap for memory in android

2011-01-01 Thread Tabman
This question is linked with the answers in the following question:

http://stackoverflow.com/questions/4259851/error-removing-bitmapsandroid/4260269#4260269

Is there any advantage of using Drawable over Bitmap in Android in
terms of memory de-allocation ?

I was looking at Romain Guy project Shelves and he uses SoftReference
for images caches but I'm unable to search where is the code which is
de-allocating these Drawables when SoftReference automatically
reclaims the memory for Bitmap. As far as I know .recycle() has to be
explicitly called on the Bitmap for it to be de-allocated.

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Phones with Large Internal Storage EXTERNAL_CONTENT_URI

2010-12-25 Thread Tabman
Hi,

Has anyone development experience with any of the following large
internal storage phones:

Nexus S http://www.google.com/phone/detail/nexus-s
Droid 2 Global http://www.google.com/phone/detail/droid-2-global-by-motorola
Samsung Captivate 
http://www.google.com/phone/detail/samsung-captivate-a-galaxy-s-phone
Samsung Vibrant 
http://www.google.com/phone/detail/samsung-vibrant-a-galaxy-s-phone

Can there camera data be accessed using EXTERNAL_CONTENT_URI or they
would give similar problem as the Droid Incredible:
http://stackoverflow.com/questions/2673323/programmitically-accessing-internal-storage-not-sd-card-on-verizon-htc-droid-in

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] getExternalStorageDirectory() on NEXUS S

2010-12-19 Thread Tabman
Hi,

I have a question related to this. How many phones are out there with this 
type of behavior ? I want to access Camera Photos/Videos on a phone and for 
that I've used EXTERNAL_CONTENT_URI but it seems that approach would fail on 
a phone like Droid Incredible. How should I design my app such that it is 
able to get camera data from any android phone ?

I saw an app *Picasa Tool Pro* and they give a list of categories to choose 
from as if all phones are implementing different directories for Camera 
photos/videos:

Camera Photo Folder (default)
Camera Photo Folder (For HTC Hero, Eris .)
Camera Photo Folder (For Incredible)

Is there anything special about HTC Hero, Eris ?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] getExternalStorageDirectory() on NEXUS S

2010-12-19 Thread Tabman
In fact to add to that is there a link between EXTERNAL_CONTENT_URI  
.getExternalStorageDirectory() as I use attributes from MediaStore 
(DATE_MODIFIED etc.) how could I use those with 
.getExternalStorageDirectory(). 

Is 
getContentUrihttp://developer.android.com/reference/android/provider/MediaStore.Images.Media.html#getContentUri%28java.lang.String%29
(String 
http://developer.android.com/reference/java/lang/String.htmlvolumeName) of 
any help here ?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] How to access internal storage on htc incredible

2010-09-20 Thread Tabman
Hello,

How do I access photos/videos on htc incredible ? Will
INTERNAL_CONTENT_URI work? I don't have the phone to actually test it.
I designed my whole app around EXTERNAL_CONTENT_URI and just today
came to know about htc incredible internal storage issues. Has anyone
address this problem ?

Thanks in advance.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: testing android app for different devices

2010-09-19 Thread Tabman
Indicator,
Thanks for a detailed answer.

For anyone who come across this post the following could be a solution
to the fragmentation problem:
http://duarlander.ning.com/

Promote this community, developers can help other developers.


On Sep 19, 12:03 pm, Indicator Veritatis mej1...@yahoo.com wrote:
 That is a very open-ended question. But I can make a good start on
 answering it by saying:

 1) before you even test on various phones, you should test in the
 emulator using AVD files for versions 1.5, 1.6, 2.0, 2.1 and 2.2 and
 with a variety of different screen sizes and densities. Complete
 coverage is a good idea (large screen, small screen, normal; medium,
 low and high density).

 2) Depending on what you are doing, you may need to test on multiple
 vendors and models of phones for each of the combinations listed in 1.
 This is because multimedia support has different limitations and bugs
 on different phones and versions. Similarly with OpenGL: what looks
 fine on one vendors phone may look bad on another; it may even crash.

 3) If you are doing a r-e-a-l simple app, you can get away with less.
 But be careful. Do Google searches in these groups and elsewhere to
 determine what the fragmentation is like for the particular Android
 features your app requires.

 On Sep 18, 2:24 pm, Tabman tabishfay...@gmail.com wrote:



  hello

  my app works fine on samsung galaxy and nexus one. It is giving
  problem on htc incredible. How should I test my application for
  various phones ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] testing android app for different devices

2010-09-18 Thread Tabman
hello

my app works fine on samsung galaxy and nexus one. It is giving
problem on htc incredible. How should I test my application for
various phones ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: when video duration or date_modified attribute available through content provider

2010-08-09 Thread Tabman
Just to save someone the misery I had to go through. What is required
is a media scan of the SDCARD to make these properties available
through the content provider and android does this when the media is
mounted:

sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED,
Uri.parse(file:// + Environment.getExternalStorageDirectory(;

On Aug 8, 6:48 pm, Tabman tabishfay...@gmail.com wrote:
 I'm having some trouble accessing attributes like DURATION and
 DATE_MODIFIED of video and image. My app access these attributes for
 both type of data but if I take a picture or shoot a video the related
 attributes are not immediately available through content provider e.g.
 for DURATION for that specific video it returns 0.

 If I restart the phone the attribute for the newly shoot video or
 picture taken becomes available.

 The other way to make the attributes available is to plug in and out
 your phone to a computer through usb cable. Once that is done the
 attributes are available.

 Any comments on why this is happening ?

 Is this a bug ? I need a resolution for this.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] when video duration or date_modified attribute available through content provider

2010-08-08 Thread Tabman
I'm having some trouble accessing attributes like DURATION and
DATE_MODIFIED of video and image. My app access these attributes for
both type of data but if I take a picture or shoot a video the related
attributes are not immediately available through content provider e.g.
for DURATION for that specific video it returns 0.

If I restart the phone the attribute for the newly shoot video or
picture taken becomes available.

The other way to make the attributes available is to plug in and out
your phone to a computer through usb cable. Once that is done the
attributes are available.

Any comments on why this is happening ?

Is this a bug ? I need a resolution for this.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: ListView with lazy loading of images

2010-07-22 Thread Tabman
Hi Davide,

see the logic for calling two functions in the following code (private
void updateBookCovers()  private void postUpdateBookCovers() ) It
implements lazy loading of images. The idea is to load images when
scrolling stops.

http://code.google.com/p/shelves/source/browse/trunk/Shelves/src/org/curiouscreature/android/shelves/activity/ShelvesActivity.java?r=19

On Jul 22, 11:44 am, Davide d...@vide.bz wrote:
 Hi,

 I try to implements lazy loading of images in a listview. There is no
 android features to make this,
 so I should implement it by myself.

 Have anyone alread done this? Take the solution care of scrolling and
 lazy loading new
 images and stop to load not more necessary images?

 --
   _|  _.    o  _|  _
  (_| (_| \/ | (_| (/_

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] MediaStore.Images.Thumbnails sort order

2010-07-20 Thread Tabman
Hello,

I want to change the sort order for the query given to
MediaStore.Images.Thumbnails Is that possible ? I want it sorted by
DATE_MODIFIED which is a column available in MediaStore.Images.Media
but not in MediaStore.Images.Thumbnails How can I achieve this ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: How to obtain ID of an image by the id of the thumbnails?

2010-07-15 Thread Tabman
IMAGE_ID of the Thumbnail record is the id of the original image.

On Jun 25, 2:27 pm, ReyLith jesus...@gmail.com wrote:
 Hi!

 I'm developing animageeditor for android. In the main activity, I
 get to show all images by viewing thethumbnailsto make the process
 faster. The problem it's that I need to process theimagelater and I
 would get the normalimageID(with theoriginalsize, which I think
 is in MediaStore.Images.Media). I can't get the form of the query. The
 code that I have is the following but I can't obtain the realimageID
 (in the IDImage variable):

         int columnIndex = 0;
         String[] projection = {MediaStore.Images.Thumbnails._ID,
 MediaStore.Images.Thumbnails.DATA};

         // It is necessary to use EXTERNAL_CONTENT_URI ofThumbnails
 because it contains the
         // littleimageand not theoriginal
         Cursor cursor =
 managedQuery(MediaStore.Images.Thumbnails.EXTERNAL_CONTENT_URI,
                                                          projection,
                                                          null,
                                                          null,
                                                          null);

         if(cursor != null)
         {
                 cursor.moveToPosition(position);

                 columnIndex =
 cursor.getColumnIndexOrThrow(MediaStore.Images.Thumbnails.DATA);
                 String imagePath = cursor.getString(columnIndex);

                 columnIndex =
 cursor.getColumnIndexOrThrow(MediaStore.Images.Thumbnails._ID);
                 String _IDThumbnails = cursor.getString(columnIndex);

                 String[] nProjection = {MediaStore.Images.Media._ID,
                                                                 
 MediaStore.Images.Media.PICASA_ID};
                 String nSelection = MediaStore.Images.ImageColumns.PICASA_ID
 +  =  + _IDThumbnails;

                 Cursor nCursor =
 managedQuery(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
                                                                           
 nProjection, nSelection, null, null);

                 nCursor.moveToFirst();

                 columnIndex =
 cursor.getColumnIndexOrThrow(MediaStore.Images.Media._ID);
                 String _IDImage = cursor.getString(columnIndex);

                 FileInputStream is = null;
                 BufferedInputStream bis = null;
                 try
                 {
                         is = new FileInputStream(new File(imagePath));
                         bis = new BufferedInputStream(is);

                         // Imagen is a class that I have defined
                        image= new Imagen(BitmapFactory.decodeStream(bis),
 _IDImage);
                 }
                 catch(Exception e)
                 {

                 }
                 finally
                 {
                         try
                         {
                                 if(bis != null)
                                         bis.close();

                                 if(is != null)
                                         is.close();

                                 cursor.close();
                                 projection = null;
                         }
                         catch(Exception e)
                         {

                         }
                 }
         }

 Thank you. Regards,
 Jesús

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] GridView zoom in/out

2010-06-19 Thread Tabman
I have a GridView that displays thumbnails of images, I want to change
the thumbnail size (zoom in/out) during runtime, what is the best way
to achieve this ?

I changed the columnWidth of gridView during runtime but after that I
scroll the gridview and I get memoryoutoferror exception.

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] accessing phone images through content provider

2010-05-22 Thread Tabman


Hi,

I need a sample code or tutorial for accessing phone images/media
through content provider ?

I know the following, what next ?

ContentResolver cr = mContext.getContentResolver(); Cursor cursor =
cr.query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null,
null, null);

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Picassa Like Pictures Album Zoom

2010-05-19 Thread Tabman
Hi,

I want to implement a custom UI component that acts in a similar
manner to picassa web albums for zooming in-out of pictures. If you
open an album in picassa there is a horizontal slider that is used to
increase decrease zoom of the thumbnails. So I want to make a similar
UI control for Android. Can anyone please guide me to what direction
to take in going about to implement such a component ?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en