Skip to content

Scaffolding, Intents & SDK

Create a new Android project called MyApp with package com.example.myapp in ~/Projects

Creates a complete project with Kotlin, Gradle KTS, and Jetpack Compose.

Create an XML-based Android project called MyApp with package com.example.myapp

Create a project called LegacyApp with minSdk 21 and targetSdk 34

Create a project with Kotlin 2.1.0 and AGP version 8.7.3

Create an Android project called MyApp with package com.example.myapp, minSdk 24, targetSdk 35, Compose enabled, in ~/Projects


Create a DetailActivity in my project with package com.example.myapp

Creates both the Activity Kotlin file and a corresponding XML layout.

Create a ProfileFragment with package com.example.myapp

Creates the Fragment Kotlin file and XML layout.

Create a ProfileScreen composable with package com.example.myapp

Generates a screen file with a composable function and preview.

Scaffold Multiple Components for a Feature

Section titled “Scaffold Multiple Components for a Feature”
  1. Create the screen

    Create a ProductDetailScreen composable with ViewModel

  2. Create a list screen

    Create a ProductListScreen composable with ViewModel

  3. Create a data Activity if needed

    Create a ProductActivity with package com.example.myapp


What you wantPrompt
Open URL in browser”Open https://example.com on my device”
Open Settings”Send intent with action android.settings.SETTINGS on my device”
Open WiFi settings”Send intent with action android.settings.WIFI_SETTINGS”
Open app settings”Send intent with action android.settings.APPLICATION_DETAILS_SETTINGS with data package:com.example.myapp”
Dial a number”Send intent with action android.intent.action.DIAL and data tel:+1234567890”
Send email”Send intent with action android.intent.action.SENDTO and data mailto:test@example.com”
Open camera”Send intent with action android.media.action.IMAGE_CAPTURE”
Share text”Send intent with action android.intent.action.SEND with extra android.intent.extra.TEXT=Hello”

Send intent with action com.example.myapp.REFRESH on my device

Send intent VIEW with data https://example.com/product/123 to component com.example.myapp/.DeepLinkActivity

Send intent with action com.example.MY_ACTION with extras: key1=value1 and key2=value2

Send intent VIEW with data https://example.com and flag 0x10000000

The flag 0x10000000 is FLAG_ACTIVITY_NEW_TASK.


Test deep link myapp://profile/123 on my device

Test deep link myapp://settings/notifications

Test deep link myapp://product?id=456&ref=home

Test deep link https://example.com/product/456 on my device

Test https://example.com/user/profile in com.example.myapp

Test deep link myapp://checkout in com.example.myapp

By specifying the package name, you bypass the Android chooser dialog.

  1. Clear logcat first

    Clear the logcat buffer

  2. Test the deep link

    Test deep link myapp://profile/123 on my device

  3. Check logs to verify routing

    Show logcat for tag DeepLinkHandler

  4. Take a screenshot to verify the correct screen

    Take a screenshot


Send broadcast com.example.myapp.REFRESH on my device

Send broadcast com.example.DATA_SYNC

Send broadcast com.example.CONFIG_UPDATE with extras: version=2 and force=true

Send broadcast com.example.NOTIFY to component com.example.myapp/.MyReceiver


List my installed SDK packages

Shows all installed platforms, build tools, system images, and other components.

Show all available SDK packages

Lists everything you can install — platforms, system images, build tools, sources, and extras.

Install Android 35 platform

Install system-images;android-35;google_apis;arm64-v8a

Install build-tools;35.0.0

  1. Install the platform

    Install platforms;android-35

  2. Install a system image for emulators

    Install system-images;android-35;google_apis;arm64-v8a

  3. Install matching build tools

    Install build-tools;35.0.0

  4. Create an emulator with the new API

    Create an Android 35 emulator called API35_Test

Install platforms;android-34, system-images;android-34;google_apis;arm64-v8a, and build-tools;34.0.0