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

  • Home
  • SEARCH
  • 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 6120259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:38:53+00:00 2026-05-23T15:38:53+00:00

In my app when the splash screen gets started I am downloading an image

  • 0

In my app when the splash screen gets started I am downloading an image from the URL. I want to use the same image in another activity of my app. Following is my code to download the image

public void DownloadImage(String fileName)      
    {

        try 
        {
                           URL url = new URL(main.BannerImage); //you can write here any link                          
                           File file = new File(fileName);
                           Log.e("file ",""+file);

                           URLConnection ucon = url.openConnection();                          
                           InputStream is = ucon.getInputStream();                         
                           BufferedInputStream bis = new BufferedInputStream(is);
                           ByteArrayBuffer baf = new ByteArrayBuffer(50);
                           int current = 0;
                           while ((current = bis.read()) != -1) 
                           {
                                 baf.append((byte) current);
                           }

                           FileOutputStream fos = new FileOutputStream(file);
                           fos.write(baf.toByteArray());
                           fos.close();
        }
        catch (IOException e) 
        {
                            Log.e("Error: ","" + e);
        }

How can I get the image as a background source in another activity 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-05-23T15:38:53+00:00Added an answer on May 23, 2026 at 3:38 pm

    You can save the image in SDCard and the path can be send to next activity using

    intent.putExtras("filename","filepathname"); 
    

    and get in the next activity using

    getIntent().getExtras().getString("filename") 
    

    from this you can get filepath from previous activity and you can get the image from specific filepath.

    You can convert the image into bitmap and and pass it to next activity using Parcelable like

    Bundle extras = new Bundle(); 
    extras.putParcelable("data",bitmap);
    Intent intent=new Intent(currentActivity.this,nextImage.class); 
    intent.putExtras(extras);
    startActivity(intent);
    finish();
    

    in nextactivity you can get bitmap as

     Bitmap  image=getIntent().getExtras().getParcelable("data");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my App, first it shows a splash screen. After that another activity, then
Im my app when the splash screen gets started I am just hitting an
The first activity in my app is a splash screen with a Progress Dialog
I have an Default@2x PNG image (640x920) for splash screen of our iPhone app.
I want to implement a splash screen for my app, i'm using this code
I want to make a loading screen(Splash screen) for my Java SE app. And
I have a Default.png for my splash screen image at my iphone app. After
I am creating a splash screen for my BlackBerry app. Right now the image
I am having universal app. And i want to to display splash screen with
I want to display a splash screen with an gradient in my app. But

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.