Hey devs! 👋
I recently submitted an Android-Blockchain app for transparent donation tracking for Daytona's sample project. It was an exciting experience, and I wanted to share how Daytona made everything easier. 🚀
What’s Daytona? 🤔
Daytona is a tool that simplifies setting up and managing your dev environment. It makes working with different projects much smoother, especially if you’re trying to simplify workspace management. I used it for my Android blockchain project for donation tracking.
My Android project - HopeChain, uses Jetpack Compose for building the UI and Solana blockchain for tracking donations. With Daytona, setting up the whole environment was a breeze, and I’m here to walk you through it! 🌟
🛠️ Prerequisites
Before we dive in, here are a few things you’ll need to get started:
- Android SDK 🔧
- Docker 🐋
- JetBrains Gateway 🧑💻
These tools will help you set up Daytona and configure everything for a seamless experience.
🚀 Getting Started
1. Install Daytona
First off, you need Daytona on your system. Follow this Daytona Installation Guide to set it up.
2. Install Docker
You’ll also need Docker to isolate and configure the entire setup. Docker makes sure everything runs in its own container, keeping things clean and efficient. 🐳
3. Set Up JetBrains Gateway
Once Docker is running, you’ll need JetBrains Gateway to connect your IDE remotely. It’s great for seamless development across different environments. Check out the installation guide here.
4. Create the Workspace
Next, you’ll create the workspace using Daytona:
daytona create https://github.com/daytonaio/sample-android-blockchain
Daytona will take care of setting up everything for you, so you can get straight to development. 😎
5. Open in IntelliJ IDEA
Daytona automatically opens the project in IntelliJ IDEA Ultimate with all the SDKs and tools pre-configured. If for some reason it doesn’t, you can always open it manually. 🖥️
daytona code
6. Install the Android Plugin
For IntelliJ to recognize Android projects, you’ll need to install the Android plugin. Here’s a quick screenshot of the setup process:
Follow the steps, accept the license agreement, and proceed. Once done, you’ll see the Run and Devices section in the top menu.
7. Build the APK
Now, it’s time to generate your APK. Go to the Build section and hit Generate APK. After it’s done, you can find your APK path and copy it to your local system using Docker commands.
docker cp <CONTAINER_ID>:/home/daytona/sample-android-blockchain/app/build/outputs/apk/debug/app-debug.apk /path/to/destination/on/host
8. Run on Your Device
Once you have the APK, you can install it on your Android device using ADB which is found in the Platform tools in Android sdk downloaded earlier:
adb install path/to/your-app.apk
And voilà! Your app is now running on your device. 🎉
Final Product 🎁
Here’s a glimpse of the HopeChain app once it’s up and running:
🧑💻 Project Structure
Here’s a quick breakdown of the project:
- Jetpack Compose UI: Modern UI built with Jetpack Compose.
- Blockchain Integration: Using Solana to securely track donations.
- Auto Builder Support: Daytona can build a Project using the default base image.
Why Daytona Made It All Easy 🧑💻
Daytona saved me a ton of time by automating environment setup and project configuration. No more struggling with environment variables, SDK installations, or misconfigured dependencies. Everything worked out of the box. 🙌
Currently Daytona only provides these JetBrains IDEs :
- CLion
- GoLand
- IntelliJ IDEA Ultimate
- PhpStorm
- PyCharm Professional
- Rider
- RubyMine
- WebStorm
- Fleet
In future Daytona would also include Android Studio, which is the official IDE for Android development to make our development far more easy.✨
Happy coding! 🚀
Top comments (0)