How to Download a Bitmap File in Android SDK

The "ImageView" control in the Android SDK lets you include and download a BMP file and include it in your Android app. Android includes a list of pre-packaged images, or you can use a custom bitmap image. The image must be included in your Android app directory, so it's included when you package and distribute the app.


    • 1

      Open the Java Eclipse editor and open your Android app project. Open the Java source code file you want to use to include the BMP.

    • 2

      Double-click the main XML file to add the image resource to your resource map. Copy and paste the following code:



      Replace the "bmpimage" with the image name in your project.

    • 3

      Return to the Java source code file. The source code file is where you "call" the image and display it in the app. The following code displays the BMP in the Android app window:

      ImageView bmp = (ImageView) findViewById(;

          Bitmap map = BitmapFactory.decodeFile(&quot;/bmpimage.bmp&quot;);
Related Searches


Related Ads

Check It Out

Prep for Black Friday Checklist [Infographic]