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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:07:22+00:00 2026-06-04T11:07:22+00:00

Now I am working on a Android application. In my app i have to

  • 0

Now I am working on a Android application. In my app i have to submit a image from my gallery to facebook.I used the following code.

if (item == 1) {
        Intent intent = new Intent();

                intent.setType("image/*");
                intent.setAction(Intent.ACTION_GET_CONTENT);

startActivityForResult(Intent.createChooser(intent, "Complete      action using"), PICK_FROM_FILE);
}


protected void onActivityResult(int requestCode, int resultCode, Intent data)
 {
        if (resultCode != RESULT_OK) return;

        Bitmap bitmap   = null;

        if (requestCode == PICK_FROM_FILE) {

            mImageCaptureUri = data.getData(); 

            mPath = getRealPathFromURI(mImageCaptureUri); //from Gallery 

            if (mPath == null){
                    mPath = mImageCaptureUri.getPath(); //from File Manager
            }


            if (mPath != null) {
                System.out.println("mpath is not null"+mPath);
                bitmap  = BitmapFactory.decodeFile(mPath);
            }

        }
}
private void postToFacebook(String desc){   

    AsyncFacebookRunner mAsyncFbRunner = new AsyncFacebookRunner(mFacebook);

    Bundle params = new Bundle();

     try {

        params.putByteArray("photo",
        Utility.scaleImage(getApplicationContext(),mImageCaptureUri));
    } catch (IOException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
     params.putString("caption", desc);
     mAsyncFbRunner.request("me/photos", params, "POST",
             new PhotoUploadListener());
}

Its working fine for me in emulater but in real device image is not posting.But no crash.Please help me friends

  • 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-04T11:07:23+00:00Added an answer on June 4, 2026 at 11:07 am

    Chk your manifest first, may this will help you.

    android.permission.MANAGE_ACCOUNTS
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on my first android app and have an SQLite database set up
write now, I am working on an app that is based on an application
I am working on my first Android application, and I have run into a
I've been working with Android for just a couple of weeks now and have
Okay so i have been working on this app for a couple months now
I have an Android application (java) that was working fine when compiled with the
For my application, i have used pinch zoom feature by adapting from the tutorial
I am working on an android application where i used existing sqlite database in
I am now working on changing android theme style at runtime, when the user
I am now working on a program for Android which is something related to

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.