> ## Documentation Index > Fetch the complete documentation index at: https://www.canva.dev/docs/button/llms.txt > Use this file to discover all available pages before exploring further. # Downloading designs Download a published design with the Android SDK. The Canva editor has a **Publish** button. When a user clicks this button, the Android SDK provides your app with: * a URL for downloading the user's design as a PNG file * the ID of the user's design This part of the tutorial series explains how to download and render the user's published design. ## Step 1: Set up the UI 1. Open the `activity_main.xml` file. 2. Switch to the **Code** or **Split** view. 3. Add an `ImageView` element beneath the `Button` element: ```markup ``` 4. Import the `ImageView` widget into the `MainActivity.kt` file: ```kotlin import android.widget.ImageView ``` ## Step 2: Get the URL of the published design When a user clicks the **Publish** button in the Canva editor, the app can receive a `PublishData` object. The `PublishData` object contains: * the ID of the user's design * a URL for downloading the design as an image file **Tip:** The URL is in the form `https://export-download.canva.com/`. If you're using the China version of the SDK, the TLD is `.cn` instead of `.com`. You can take the necessary security measures to protect the URL from any malicious attacks. To receive the `PublishData`object: 1. Add a `publishData` property to the `MainActivity` class: ```kotlin private var publishData: PublishData? = null ``` 2. Add an `onActivityResult` function to the `MainActivity` class: ```kotlin override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) } ``` 3. Use conditionals to detect when the activity is receiving an intent: ```kotlin override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) if (data == null) { return } if (requestCode == 132 && resultCode == RESULT_OK) { // The user has published their design... } } ``` The value of the `requestCode` variable is based on the integer passed into the `launchActivityForResult` method. 4. Use the intent's `getParcelableExtra` function to set the value of the `publishData` property: ```kotlin if (requestCode == 132 && resultCode == RESULT_OK) { publishData = data.getParcelableExtra(CanvaEditor.KEY_PUBLISH_DATA) } ``` The object returned by the `getParcelableExtra` function has two properties: `designId` and `publishUrl`. ## Step 3: Render the published design When a user is taken back to your app, it usually makes sense to download and render the published version of their design. This step explores one way to accomplish this. ### Install Picasso Picasso is "a powerful image downloading and caching library for Android." It significantly streamlines the process of downloading and rendering an image into an `ImageView` widget. You don't *have* to use this library, but it can save you from writing some otherwise tedious code. To install Picasso: 1. Open the app's `build.gradle` file. 2. Copy the following statement into the `dependencies` section: ```text implementation 'com.squareup.picasso:picasso:2.8' ``` 3. Click **Sync now**. 4. Import Picasso into the `MainActivity.kt` file: ```kotlin import com.squareup.picasso.Picasso ``` **Tip:** To learn more about Picasso, refer to [the official documentation](https://square.github.io/picasso/). ### Configure the app's permissions Add the following element to the `AndroidManifest.xml` file, as a child of the `manifest` element: ```markup ``` The presence of this element ensures that the app has permission to download the user's image from the internet. Without this permission, the app can't send HTTP requests. ### Render the image Copy the following code into the `onActivityResult` function: ```kotlin val publishedImageView = findViewById(R.id.published_image_view) Picasso.get().load(publishData?.publishUrl).into(publishedImageView) ``` This code uses Picasso to download the user's published design and render it in the `ImageView` widget. After making these changes: create and publish a design. The published image appears in the app. ## Example ### android\_main.xml ```markup