retrieve all the images in phone and sdcard

by Xian Chen » Thu, 30 Apr 2009 05:41:10 GMT


Sponsored Links
 Hi,

How can I retrieve all the images both in phone memory and external sdcard?

I need the image path, name and size information.

Thanks in advance,
Xian

--~--~---------~--~----~------------~-------~--~----~



retrieve all the images in phone and sdcard

by Xian Chen » Thu, 30 Apr 2009 06:34:39 GMT


 Maybe I did not make the question clear.

What I want to do is retrieving all the images in phone and sdcard,
including file name, and image size. But I do not want the user to pick one
image, in other words, I want my activity to retrieve all the images the
user can see automatically and return some information.

So, I need the image ( or imageColumn) URI, but I cannot find it from the
document.

Anyone know this?

Thanks,
Xian





--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


retrieve all the images in phone and sdcard

by Peli » Thu, 30 Apr 2009 08:04:40 GMT


 Use the media content provider:
 http://developer.android.com/guide/topics/providers/content-providers.html 
 http://developer.android.com/reference/android/provider/MediaStore.Images.Media.html 

using something like this:
ContentResolver cr = getContentResolver();
Cursor cur = managedQuery
(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, null, null, null,
null);

Peli
www.openintents.org





--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Android's Safari/khtml browser and JQuery

I have a small browser based monitoring application that uses JQuery
(and more specifically the Sparklines chart plugin) to draw onto the
screen. While the drawing initially works, there seems to be an issue
with event handling and JQuery since the chart is not updated
(sometimes I get sporadic updates). The problem can be observed by
going to the sparklines site:

http://omnipotent.net/jquery.sparkline/

The top-most demo, mouse speed, does not update when using Safari/
Khtml. It does appear to work in the emulator, apart from the fact
that it does not receive mouse events so only draws a horizontal line.

So the question is, am I (or the Sparkline plugin) perhaps stressing
the browser event loop and if so, is there a way to find out? Have
anyone else had trouble with JQuery event handling inside the Android
browser?

Thanks,
Casper
--~--~---------~--~----~------------~-------~--~----~

2. Problem in Http Get Method..pls tell me..

can u tell me how to send the Url to the server using Http Get method...

Here i m trying to insert a name into the databse .If i execute the below

showing code  there it tells "Connection to  http:localhost refused "

 i think the error is is in the Http method ..Would u tel me pls how to
Correct
it....


With ragards,

Raghav.S



My Code:


package simpl.http1;

import java.io.IOException;

import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class simplhttp1 extends Activity {
    /** Called when the activity is first created. */


    Button enter;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);


        enter=(Button)findViewById(R.id.enter1);


        enter.setOnClickListener(new OnClickListener(){

            public void onClick(View v)
            {

                openconn();


            }
        });



    }

   public void openconn()

   {

                 String str11="murugan";
               String feed_url="
http://localhost:8080/Serv1/servlet/Servlet1?st1="+str11;
              HttpClient client=new DefaultHttpClient();
              HttpGet siteRequest = new HttpGet(feed_url);
              try {
                HttpResponse httpResponse = client.execute(siteRequest);
                TextView t = (TextView) findViewById(R.id.myTextView);

                 t.setText("Ok");
            } catch (ClientProtocolException e) {

                TextView t = (TextView) findViewById(R.id.myTextView);
                t.setText(e.getMessage());
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (IOException e) {
                TextView t = (TextView) findViewById(R.id.myTextView);
                t.setText(e.getMessage());
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

   }



}

--~--~---------~--~----~------------~-------~--~----~

3. open-source games

4. Can't get my widget to show up?

5. Graphics

6. Map object recycling in MapView

7. Problem in Http Get method....pls tel me ...