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 8984685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:10:01+00:00 2026-06-15T21:10:01+00:00

I’m trying to open android’s own camera application from my application.It is working!But i

  • 0

I’m trying to open android’s own camera application from my application.It is working!But i have a problem when i want to get information like,

-Image ID

-Image Display Name

-Image Title

-Image Data

-Image Size

-Image Date Taken

which should be stored at MediaStore.I was successful in getting image’s path.After that, i have to get information like above but when i try to get information , application throws exception.

Partially My Code is something like this:

while(cursor.moveToNext())
    {
        Date date = new Date(Long.valueOf(cursor.getString(5)));
        SimpleDateFormat dateF = new SimpleDateFormat("yyyy/MM/dd");
        SimpleDateFormat timeF = new SimpleDateFormat("HH:mm");

        imageListInfo.add(
                cursor.getString(0) + ";" 
                + cursor.getString(1) + ";" 
                + cursor.getString(2) + ";" 
                + cursor.getString(3) + ";" 
                + cursor.getString(4) + ";"
                + dateF.format(date) + ";"
                + timeF.format(date)
                );
    }

There had been no problem before i captured and saved the photo which from default camera application called from my application.

I think there is one problem that should be solved.It is how can i save the image with its information like capturing the photo without calling from my application?

EDIT:

It is happening when getting id “cursor.getString(0)” code

android.database.StaleDataException: Attempting to access a closed CursorWindow.Most probable cause: 
cursor is deactivated prior to calling this method.
at android.database.AbstractWindowedCursor.checkPosition(AbstractWindowedCursor.java:139)
at android.database.AbstractWindowedCursor.getString(AbstractWindowedCursor.java:50)
at android.database.CursorWrapper.getString(CursorWrapper.java:114)
at com.canberk.data.warehouse.BaseActivity.indexingForImageMediaStore(BaseActivity.java:313)
at com.canberk.data.warehouse.BaseActivity$BackGroundWorker.doInBackground(BaseActivity.java:109)
at com.canberk.data.warehouse.BaseActivity$BackGroundWorker.doInBackground(BaseActivity.java:1)
at android.os.AsyncTask$2.call(AsyncTask.java:264)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
at java.util.concurrent.FutureTask.run(FutureTask.java:137)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:208)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)

Thanks in Advance

  • 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-15T21:10:02+00:00Added an answer on June 15, 2026 at 9:10 pm

    Your stack trace seems self-explantory: you are accessing a closed Cursor from indexingForImageMediaStore().

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

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a view passing on information from a database: def serve_article(request, id): served_article
I want to count how many characters a certain string has in PHP, but
This could be a duplicate question, but I have no idea what search terms
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have been unable to fix a problem with Java Unicode and encoding. The
I want to construct a data frame in an Rcpp function, but when I
I am trying to loop through a bunch of documents I have to put

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.