Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7768089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:49:59+00:00 2026-06-01T15:49:59+00:00

Is it possible to read and write to the gallery on Android? I want

  • 0

Is it possible to read and write to the gallery on Android?
I want to be able to get a list of all images in the gallery, and store those images onto a server. I also want to be able to download the images from the server and save them into the gallery. Is that possible?

I can’t seem to find the API for doing this, so it would be great if you could point me in the right direction! Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T15:50:00+00:00Added an answer on June 1, 2026 at 3:50 pm

    You can read from the gallery using the ContentResolver.query() method. For example:

    Cursor c = getContentResolver().query( Images.Media.EXTERNAL_CONTENT_URI, IMAGES_PROJECTION, null, null, Images.Media.DEFAULT_SORT_ORDER );
    

    This will give you a Cursor to all photos in the database. IMAGES_PROJECTION is a String[] of columns you are interested in getting values from. These columns are listed in Images.ImageColumns.

    To get the Bitmap for each image in the gallery, you need to get the _ID value for each row in the cursor, then call this:

    Images.Media.getBitmap( getContentResolver(), Uri.withAppendedPath( Images.Media.EXTERNAL_CONTENT_URI, Integer.toString( id ) ) );
    

    To write to the content database, you can use:

    Images.Media.insertImage( getContentResolver(), bitmap, title, description );
    

    To insert a video is a bit more involved. If you need sample code for that, let me know and I can get that for you also.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to know is it possible to read/write google spreadsheets using GET/POST methods
Possible Duplicate: read/write to Windows Registry using Java I want to read the registry
Is it possible to handle (read and write) binary data to SQL Server using
Is it possible to read/write from/to a specific USB port, avoiding all that USB
I know that it is possible read and write data from mongodb via hadoop.
Is it possible to read and write Word (2003 and 2007) files in Python
Is it possible to read and write Word (2003 and 2007) files in PHP
how can I write and read files in JavaScript? Is it possible?
Possible Duplicate: Invalid read/write sometimes creates segmentation fault and sometimes does not I have
Possible Duplicate: Read/write .txt file with special characters Im reading a file but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.