Step-by-Step App Build
To illustrate the app development process, we will create a straightforward application designed for tracking cryptocurrency purchases using a dollar-cost averaging (DCA) strategy. This app will enable users to log their trades, allowing it to calculate the average entry price for each asset effortlessly.
Step 1. Choose the mode and describe the app
Begin by launching Google AI Studio, navigating to the Build tab, and selecting the “Build an Android app” option. In the designated input field, provide a detailed description of the task at hand.
Prompt
<pre class="cbpre”><code class="cbcode”>Build a native Android app for tracking dollar-cost averaging (DCA) crypto purchases. Let the user add a purchase entry with: asset ticker (e.g. BTC, ETH), amount spent in USD, price per coin at purchase, and date. Store all entries locally on the device. For each asset, show the total invested, total coins accumulated, and the average entry price. Add a summary card at the top with the overall portfolio cost. Include a delete option for each entry and the ability to filter by asset.
Step 2. Choosing a design
Prior to generating the code, AI Studio presents a selection of visual style options for the app, including Clean Minimalism, Elegant Dark, Professional Polish, Vibrant Palette, and Sleek Interface. You can choose your preferred design by clicking “Select this design” or opt to skip this step by selecting “Skip.”
Source: Incrypted.
Step 3. Generation and first build
The Gemini model will then create a project, typically comprising around ten Kotlin files, and launch the app in the built-in emulator. Upon initial launch, the screen will appear empty, displaying “Total Invested: [cyberseo_openai model=”gpt-4o-mini” prompt=”Rewrite a news story for a business publication, in a calm style with creativity and flair based on text below, making sure it reads like human-written text in a natural way. The article shall NOT include a title, introduction and conclusion. The article shall NOT start from a title. Response language English. Generate HTML-formatted content using
tag for a sub-heading. You can use only
,
- ,
- , and HTML tags if necessary. Text:
Step-by-Step App Build
Let’s break down the process using a simple app for tracking crypto buys with a dollar-cost averaging (DCA) strategy. The user logs their trades, and the app calculates the average entry price for each asset.
Step 1. Choose the mode and describe the app
Open Google AI Studio, go to the Build tab, and select the “Build an Android app” option. In the input field, describe the task.
Prompt
Copy
Build a native Android app for tracking dollar-cost averaging (DCA) crypto purchases. Let the user add a purchase entry with: asset ticker (e.g. BTC, ETH), amount spent in USD, price per coin at purchase, and date. Store all entries locally on the device. For each asset, show the total invested, total coins accumulated, and the average entry price. Add a summary card at the top with the overall portfolio cost. Include a delete option for each entry and the ability to filter by asset.Source: Incrypted. Step 2. Choosing a design
Before generating the code, AI Studio offers several app visual style options — for example, Clean Minimalism, Elegant Dark, Professional Polish, Vibrant Palette, and Sleek Interface. You can pick the option you like under “Select this design” or skip the step by clicking “Skip.”
Source: Incrypted.
Step 3. Generation and first build
The Gemini model creates a project — in our case, about ten Kotlin files — and launches the app in the built-in emulator. At launch, the screen is empty: the portfolio counter shows “Total Invested: $0.00,” and the purchases list is empty.
Source: Incrypted. Step 4. Fixing errors
If a message saying “1 error running the code” appears at the bottom of the panel, click Fix. The model finds the cause — in this example, it was an initialization error on startup — and fixes the code. After that, the app launches correctly.
Step 5. Testing
Click the plus button in the bottom-right corner. The “Add Purchase” window will open with the fields Ticker, Amount USD, and Price Per Coin. Enter the trade details and click Add. Add a few purchases — the “Total Invested” counter at the top will sum up your invested funds.
Data: Incrypted. Data: Incrypted. Step 6. Refining the feature with a prompt
To have the app group purchases by asset and calculate the average entry price, уточните задачу следующим промптом.
Prompt
Copy
Group the purchases by ticker and, for each asset, add a summary card above its entries showing: total invested, total coins accumulated, and the average entry price. Calculate the average entry price as total invested divided by total coins for that asset. Display it clearly, for example u0022Avg entry: $2071.67u0022. Keep the existing per-purchase list below each summary.After the refinement, each asset gets its own card with the total amount, the number of coins, and the average entry price, and below it — a list of specific trades.
Data: Incrypted. After testing in the emulator, you can install the app on a smartphone via ADB using a USB cable or publish it to Google Play’s internal testing track — these options are available from the same interface.” temperature=”0.3″ top_p=”1.0″ best_of=”1″ presence_penalty=”0.1″ ].00” alongside an empty purchases list.
Source: Incrypted. Step 4. Fixing errors
If an error message appears stating “1 error running the code,” simply click Fix. The model will identify the issue—such as an initialization error on startup—and rectify the code accordingly. Following this correction, the app should launch without further issues.
Step 5. Testing
To test the app, click the plus button located in the bottom-right corner. This action will open the “Add Purchase” window, prompting you to fill in the fields for Ticker, Amount USD, and Price Per Coin. After entering the trade details, click Add. As you input several purchases, the “Total Invested” counter at the top will dynamically sum your invested funds.
Data: Incrypted. Data: Incrypted. Step 6. Refining the feature with a prompt
To enhance the app’s functionality by grouping purchases by asset and calculating the average entry price, refine your task with the following prompt.
Prompt
<pre class="cbpre”><code class="cbcode”>Group the purchases by ticker and, for each asset, add a summary card above its entries showing: total invested, total coins accumulated, and the average entry price. Calculate the average entry price as total invested divided by total coins for that asset. Display it clearly, for example “Avg entry: 71.67”. Keep the existing per-purchase list below each summary.
Data: Incrypted. After implementing these refinements, each asset will feature its own summary card displaying the total amount invested, the number of coins accumulated, and the average entry price, with a detailed list of specific trades below.
Once testing in the emulator is complete, you can install the app on a smartphone via ADB using a USB cable or publish it to Google Play’s internal testing track—both options are conveniently accessible from the same interface.
- ,