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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:31:50+00:00 2026-05-27T02:31:50+00:00

I am running into an issue with my app that I wasn’t running into

  • 0

I am running into an issue with my app that I wasn’t running into before hand. What I am trying to do is to allow the option for a user to pic a photo from the device using intents. Then return that photo back to the calling activity to then be displayed in an image view (for now…). Problem is that yesterday everything was working for me and today (…haven’t changed anything with the code…) nothing seems to be doing anything at all. It almost seems like the app is “hanging”. Not sure how to resolve this or even trouble shoot the root cause of this. If anyone has any suggestions please post, here is the code:

//---Pressing this button will allow for user to choose what photo should return---
    Button b2 = (Button) findViewById(R.id.btn_getPhotos);
    b2.setOnClickListener(new OnClickListener()
    {

        public void onClick(View arg0)
        {
            Intent i = new Intent(Intent.ACTION_GET_CONTENT);
            //Intent i = new Intent(Intent.ACTION_PICK);
            i.setType("image/*");

            //**Keep in mind after calling the StartActivityForResult() it seems to hang...**
            startActivityForResult(i, PIC_REQUEST);

        }

    });

Here is the OnActivityResult():

 protected void onActivityResult(int requestCode, int resultCode, Intent data )
{   
    if (resultCode == Activity.RESULT_CANCELED)
    {
       //handles when camera was canceled...
       Toast.makeText(this, "Cancelled by user...", Toast.LENGTH_LONG).show();

    } 

    else if (requestCode == PIC_REQUEST) 
    {   
       Uri photoUri = data.getData();

       try 
       {
            Bitmap galleryPic = Media.getBitmap(getContentResolver(), photoUri);
            ImageView image = (ImageView) findViewById(R.id.currentPhoto); 
            image.setImageBitmap(galleryPic);

        } 
       catch (FileNotFoundException e) 
       {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } 
       catch (IOException e) 
       {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

} 

Last but not least here is the waring/error log:

11-09 10:07:47.060: WARN/InputManagerService(142): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@407d13a8
11-09 10:07:56.330: WARN/ActivityThread(3957): Application king.chad.SDE is waiting for the debugger on port 8100...
11-09 10:08:06.250: WARN/ActivityManager(142): Launch timeout has expired, giving up wake lock!
11-09 10:08:06.320: WARN/ActivityManager(142): Activity idle timeout for ActivityRecord{40939988 king.chad.SDE/.MainActivity}

I want to say that my problem lies within this section of the log (based on other forum related issues that I’ve researched…), but I’m not sure:

11-09 10:08:23.090: WARN/InputManagerService(142): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@407f37e0 (uid=10022 pid=238)
11-09 10:08:45.890: WARN/InputManagerService(142): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40ce5140

Uninstalled app, re-installed, dubugged, error log on 2nd run:

11-09 10:23:59.690: WARN/ActivityManager(142): No content provider found for: 
11-09 10:23:59.700: WARN/PackageParser(142): Unknown element under <manifest>: uses-library at /data/app/vmdl1692687349.tmp Binary XML file line #8
11-09 10:23:59.700: WARN/ActivityManager(142): No content provider found for: 
11-09 10:24:00.730: WARN/ResourceType(273): getEntry failing because entryIndex 1041 is beyond type entryCount 185
11-09 10:24:00.760: WARN/ResourceType(273): Failure getting entry for 0x7f020411 (t=1 e=1041) in package 0 (error -2147483647)
11-09 10:24:00.760: WARN/ResourceType(273): getEntry failing because entryIndex 1042 is beyond type entryCount 185
11-09 10:24:00.760: WARN/ResourceType(273): Failure getting entry for 0x7f020412 (t=1 e=1042) in package 0 (error -2147483647)
11-09 10:24:00.760: WARN/ResourceType(273): getEntry failing because entryIndex 1043 is beyond type entryCount 185
11-09 10:24:00.760: WARN/ResourceType(273): Failure getting entry for 0x7f020413 (t=1 e=1043) in package 0 (error -2147483647)
11-09 10:24:00.760: WARN/ResourceType(273): getEntry failing because entryIndex 1420 is beyond type entryCount 185
11-09 10:24:00.760: WARN/ResourceType(273): Failure getting entry for 0x7f02058c (t=1 e=1420) in package 0 (error -2147483647)
11-09 10:24:00.770: WARN/ResourceType(273): getEntry failing because entryIndex 223 is beyond type entryCount 185
11-09 10:24:00.770: WARN/ResourceType(273): Failure getting entry for 0x7f0200df (t=1 e=223) in package 0 (error -2147483647)
11-09 10:24:01.500: WARN/ActivityThread(5952): Application king.chad.SDE is waiting for the debugger on port 8100...
11-09 10:24:11.330: WARN/ActivityManager(142): Launch timeout has expired, giving up wake lock!
11-09 10:24:11.470: WARN/ActivityManager(142): Activity idle timeout for ActivityRecord{408a9dc8 king.chad.SDE/.MainActivity}
11-09 10:24:14.510: WARN/InputManagerService(142): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@407f37e0 (uid=10022 pid=238)
11-09 10:24:53.730: WARN/InputManagerService(142): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4090b358
  • 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-05-27T02:31:51+00:00Added an answer on May 27, 2026 at 2:31 am

    Well, not sure why the above code wasn’t working, but I did find a work around for this. After much reading and searching I found that this issue may not actually be related to my code but the device that I was using. I ended up altering the startActivityForResult() method by changing:

    startActivityForResult(i, PIC_REQUEST);
    

    …to this:

    startActivityForResult(Intent.createChooser(i, "Select a photo"), PIC_REQUEST);
    

    …and now all is well. Hope this helps any of you that may encounter the same issue.

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

Sidebar

Related Questions

I am running into an issue with a sqlite database program. I am trying
I'm running into an issue in that I have a document indexed with elasticsearch
I'm running into a (hopefully) small issue. I have a web app written in
I am trying to allow users to upload files for a django app running
I am running into a very strange situation with an app I have that
I'm running into an issue with Titanium's Titanium.Yahoo.yql method on iPhone. I'm trying to
I'm running into an issue that's arising from the fact that one has to
I'm trying to pass a PDF into a Django app and am running into
I'm trying to implement a basic UINavigationController and I'm running into an issue with
I am running into a peculiar issue with an app which has multiple Activities.

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.