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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T08:41:28+00:00 2026-06-04T08:41:28+00:00

Possible Duplicate: Android : Bitmap save to location I have successfully created a QR

  • 0

Possible Duplicate:
Android : Bitmap save to location

I have successfully created a QR code generator application but cannot save the generated image to a external storage. I have tried various practices but failed to do so. Following is the class where the image generated is showed on the screen and then i have to use a button called save button to store the image but i cannot get it done. Can someone please help me to sort out this. Will be very thankful for your efforts in helping me. cheers

     public class QRDisplay extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.qr_view);

    String url = getIntent().getStringExtra("IMAGE_URL");

    ImageView imageView = (ImageView)findViewById(R.id.qr_image);
    try {
        URL imageURL = new URL(url);
        Bitmap qrBitmap = BitmapFactory.decodeStream(imageURL.openStream());
        imageView.setImageBitmap(qrBitmap);
    } catch (Exception e) {
        Log.d("QRDisplay", e.getMessage());
    }


Button saveButton= (Button)findViewById(R.id.saveButton);
saveButton.setOnClickListener(new OnClickListener() {
    @Override
    public void onClick(View v) {
    ?????????????????   
    }
});

}

}

  • 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-04T08:41:30+00:00Added an answer on June 4, 2026 at 8:41 am

    hey abhijeet use this it definately solve your problem

    String Filepath = Environment.getExternalStorageDirectory().toString();
    OutputStream Out = null;
    File file = new File(path, "yourimagename"+".jpg");
    Out = new FileOutputStream(file);
    
    getImageBitmap(myurl).compress(Bitmap.CompressFormat.JPEG, 85, fOut);
    Out.flush();
    Out.close();
    
    MediaStore.Images.Media.insertImage(getContentResolver(),file.getAbsolutePath(),file.getName(),file.getName());
    

    also put these code into ur maifest file to add permission –

    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: OutOfMemoryError: bitmap size exceeds VM budget :- Android I have code like
Possible Duplicate: Android Unknown Command 'crunch' I have been using eclipse just fine but
Possible Duplicate: accelerometer in Android emulator I have an application that plays music when
Possible Duplicate: OutOfMemoryError: bitmap size exceeds VM budget :- Android In my application I
Possible Duplicate: Android: Clickable hyperlinks in AlertDialog Hi, I have created an AlertDialog with
Possible Duplicate: Android: How to overlay-a-bitmap/draw-over a bitmap? I have implement the android Camera
Possible Duplicate: Android findViewbyId with a variant string I have this type of code
Possible Duplicate: Android - ListView click HOWTO? to be more specific I have a
Possible Duplicate: Android Launch an application from another application I am having a problem
Possible Duplicate: Android Launch an application from another application I want to start Another

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.