Trae + Gemini for HarmonyOS Incoming Call Simulator: 70% AI-Generated Code, Completed in 5 Days

Trae + Gemini AI tools compress HarmonyOS app development from 10 days to 5 with 70% AI-generated code.
A developer used Trae (ByteDance's AI IDE) with Google Gemini 3 Pro to build a native HarmonyOS "Incoming Call Simulator" app, compressing an estimated 10-day workload to just 5 days. AI generated roughly 70% of the core code, but showed clear limitations in HarmonyOS API version compatibility, complex logic handling, multi-device adaptation, and interaction polish—requiring significant human intervention. AI proves to be an efficiency multiplier, not a replacement.
AI-Assisted HarmonyOS Development in Practice: How to Compress 10 Days of Work into 5?
The HarmonyOS ecosystem is rapidly expanding, with more developers diving into native HarmonyOS application development. HarmonyOS is Huawei's self-developed distributed operating system. Since the release of HarmonyOS NEXT in 2024, it has officially separated from the Android kernel, becoming a completely independent OS ecosystem—meaning developers need to build applications from scratch using an entirely new technology stack. But building a fully functional HarmonyOS app from the ground up takes considerable time, even for experienced developers. Recently, a developer shared their complete experience using Trae + Gemini 3 Pro Preview model to assist in developing a native HarmonyOS "Incoming Call Simulator" app—compressing an estimated 10-day workload into just 5 days.
This case study not only demonstrates the efficiency gains of AI coding tools in real projects but also exposes the genuine limitations of AI-assisted development—making it valuable reading for every developer interested in HarmonyOS development and AI programming.
Trae + Gemini 3 Pro: The AI-Assisted HarmonyOS Development Toolchain
Development Tools and Model Selection
This project used Trae (ByteDance's AI coding tool) paired with Google Gemini 3 Pro Preview large language model. Trae is an AI Integrated Development Environment (AI IDE) officially launched by ByteDance in early 2025. Unlike similar products such as GitHub Copilot and Cursor, Trae deeply integrates multiple mainstream large models (including Claude, GPT-4o, Gemini, etc.), allowing developers to flexibly switch models based on task characteristics. Its core capabilities include context-aware code generation, cross-file code understanding, automated debugging suggestions, and multi-step task orchestration in Builder mode. Its friendly support for Chinese-speaking developers and free usage policy have quickly garnered attention in the domestic developer community.
Gemini 3 Pro Preview (also known as Gemini 2.5 Pro Preview) is the latest generation multimodal large model from Google DeepMind, performing particularly well in code generation. It ranks among the top in multiple authoritative programming benchmarks (such as SWE-bench, HumanEval, LiveCodeBench), excelling especially at long-context code understanding and complex logical reasoning. Its 2-million-token ultra-long context window enables it to understand entire project-level codebases, which is crucial for application development requiring cross-module coordination.

What Does AI Excel at in HarmonyOS Development?
Based on the developer's hands-on experience, approximately 70% of the core code was generated directly by AI, primarily covering the following modules:
- Incoming call simulation logic: Core scheduling code for both instant triggering and timed triggering
- Phone number location lookup: Business logic for number parsing, province identification, and carrier recognition
- ArkUI interface layout: Declarative UI construction using HarmonyOS ArkUI, including incoming call screens, settings pages, etc.
It's worth noting that ArkUI is HarmonyOS's native UI development framework, adopting a declarative programming paradigm—developers build UIs by describing the final state of the interface rather than imperatively manipulating the DOM step by step. ArkTS is ArkUI's development language, extended from TypeScript with added static type checking and declarative UI syntax. Compared to traditional Android XML layouts or iOS SwiftUI, ArkUI's component system and state management mechanisms have their own unique design. These foundational coding tasks typically consume the majority of project development time, and AI's involvement allows developers to focus their energy on architecture design and experience optimization.
Four Major Limitations of AI Programming in HarmonyOS Development
The development process wasn't entirely smooth sailing. The developer explicitly identified scenarios where AI performed poorly:
-
HarmonyOS API version issues: AI-generated code frequently called deprecated APIs, causing compilation errors. HarmonyOS iterates rapidly with frequent API changes, while large models have inherent training data lag—a common issue across current AI programming tools. Large language models have a natural knowledge cutoff point, leaving them completely unaware of API updates, framework changes, and new features released after their training cutoff date. For a platform like HarmonyOS where API changes are dramatic from version 3 to 5.0, even when models access some new documentation through RAG (Retrieval-Augmented Generation), their ability to distinguish between old and new APIs remains limited, often confusing deprecated interfaces with current ones.
-
Complex logic handling: When dealing with multi-module coordination, state management, and other complex business logic, AI-generated code often required significant modifications. HarmonyOS state management involves multiple decorators including @State, @Prop, @Link, @Provide/@Consume, each with different data flow directions and update mechanisms. AI tends to produce logical errors when handling complex state passing across components and pages.
-
Device adaptation: HarmonyOS devices come in diverse form factors, and adaptation issues across different models require manual testing and adjustment one by one. One of HarmonyOS's core design philosophies is "develop once, deploy across multiple devices," covering phones, tablets, smart screens, smartwatches, car infotainment systems, and more. However, different devices have vastly different screen sizes, resolutions, interaction methods (touch, remote control, rotating crown), and hardware capabilities (vibration motors, speaker specifications). Although HarmonyOS provides grid layouts, breakpoint systems, and adaptive components for adaptation, actual development still requires meticulous UI adjustments and feature tailoring for different devices—testing that heavily depends on real hardware environments that AI tools currently cannot effectively cover.
-
Interaction experience polish: Details like animation smoothness and edge case handling still heavily depend on developer experience and judgment.
Incoming Call Simulator Feature Breakdown: Four Core Modules
This "Incoming Call Simulator" app has a clear positioning—helping users gracefully exit awkward social situations. It's built entirely as a native HarmonyOS app, ad-free, with an installation package under 10MB.
Module 1: Simulated Phone Calls
Supports custom caller name, phone number, and ringtone, providing both instant trigger and timed trigger modes. Users can pre-set a "call" and trigger it precisely when needed—the incoming call interface is highly consistent with the system's native call screen. Achieving this high-fidelity call interface requires deep understanding of HarmonyOS's window management mechanism and notification system. Developers need to leverage ArkUI's fullscreen dialog capabilities and system-level UI components to recreate the visual effect of a native incoming call.
Module 2: Simulated WeChat Calls
This is a feature more closely aligned with everyday usage scenarios. Users can customize the caller's avatar and nickname, recreating an authentic WeChat voice/video call interface, making the act of "pretending to answer a call" more convincing and believable.

Module 3: Phone Number Location Lookup
Enter any phone number to identify its associated province and carrier information. When facing calls from unknown numbers, users can quickly determine the number's origin to help decide whether to answer. This feature is typically implemented using a local number segment database or online API query. The local approach has the advantage of working without network access but requires periodic updates to the number segment data to cover newly allocated number ranges.
Module 4: Comprehensive Settings Center
Provides multi-dimensional customization options including vibration intensity adjustment and timing precision settings to meet different users' personalization needs. The developer specifically emphasized that the call trigger success rate reaches 100%, with precise and reliable timing. Achieving precise timed triggering in HarmonyOS requires proper use of background task management and alarm reminder system capabilities to prevent timer tasks from being delayed or cancelled due to system power-saving policies.
HarmonyOS AI Development Takeaways: Four Practical Tips for Developers

Based on this hands-on AI-assisted development experience, the developer summarized several key recommendations:
Tip 1: Always Cross-Reference Huawei's Latest Official API Documentation
Don't fully trust AI-generated API calls. HarmonyOS 5.0 APIs differ significantly from earlier versions, and AI easily "confuses" outdated interfaces. Every piece of AI-generated HarmonyOS code should be verified against official documentation one by one. The Huawei Developer Alliance website (developer.huawei.com) provides complete API reference documentation and version change notes. Developers should build the habit of checking API Diff documents to quickly locate interface changes between versions. Additionally, providing the latest API documentation snippets as context to the AI can help it generate more accurate code.
Tip 2: Map Out Complete Business Flows in Advance
Before having AI generate code, use flowcharts or pseudocode to clearly define each module's inputs, outputs, and interaction logic. The clearer the context you give AI, the higher quality code it generates. In the field of Prompt Engineering, this is called "structured prompting"—providing clear requirement descriptions, data structure definitions, interface constraints, and expected behaviors can significantly improve a large model's code generation accuracy. In practice, breaking a large feature into multiple small tasks and having AI generate them step by step typically yields better results than describing the entire feature at once.
Tip 3: Multi-Device Testing Cannot Be Skipped
The HarmonyOS ecosystem covers phones, tablets, smart screens, and many other devices. AI cannot simulate real device runtime differences—manual testing is the last line of defense for quality assurance. Huawei provides the DevEco Testing cloud testing platform, where developers can remotely use various real devices for compatibility testing, covering mainstream models even without access to numerous physical devices. Meanwhile, the previewer and simulator built into DevEco Studio can quickly validate UI performance across different screen sizes during the development phase.
Tip 4: AI Is the Best Learning Tool for HarmonyOS Newcomers
For beginners, AI can quickly generate runnable basic frameworks, helping them understand ArkTS syntax and HarmonyOS component systems while significantly lowering the barrier to entry. Although ArkTS, as HarmonyOS's primary development language, is based on TypeScript, it has significant differences in type systems, decorator syntax, and concurrency models. Beginners can have AI generate sample code and then study it line by line alongside official Codelabs tutorials—this "AI generation + human learning" approach is more efficient than purely reading documentation.
An Objective Assessment of AI-Assisted Programming: Efficiency Multiplier, Not Replacement
This case study perfectly illustrates the real capability level of current AI-assisted programming: AI is an efficiency multiplier, not a developer replacement. It can compress 10 days of work into 5, but the remaining 5 days—debugging, adaptation, optimization—still require solid engineering skills.
Especially on rapidly iterating emerging platforms like HarmonyOS, the knowledge lag problem of AI models becomes more pronounced. Unlike Android and iOS, which have accumulated over a decade of massive open-source code resources, HarmonyOS native development (particularly the pure HarmonyOS ecosystem after HarmonyOS NEXT) has relatively limited publicly available code resources. This directly affects the training data quality and coverage of large models in this domain. Developers need the ability to evaluate AI output quality—knowing when to trust AI and when to write code themselves. As the HarmonyOS ecosystem continues to grow and the open-source community develops, AI model performance in HarmonyOS development is expected to gradually improve.
Project Resources and Future Plans
The Incoming Call Simulator app has been submitted for review on the Huawei AppGallery, with the first version V1.0.0 supporting HarmonyOS 5.0. The developer plans to continuously update features based on user feedback, and the source code is freely shared. Interested developers can obtain the complete project code through their community group for learning and secondary development.

For developers currently learning HarmonyOS development or wanting to try AI-assisted programming, this is an excellent hands-on reference project—feature-complete, moderate in scope, and broad in technology stack coverage, well worth deep study. Through this project, developers can not only learn core technologies like ArkUI declarative development, HarmonyOS system capability invocation, and background task management, but also gain firsthand experience with AI-assisted programming workflows and best practices, laying a solid foundation for more complex HarmonyOS application development in the future.
Related articles
Product ReviewsThe Programmer's Desk Setup Guide: Building a Workspace That Feels Like Home
Discover how programmers build productive, comfortable workspaces. From multi-monitor setups to ergonomic design, explore the desk philosophy that drives focus and flow.
Product ReviewsQoder vs Cursor Real-World Comparison: Which $20/Month AI IDE Is Better?
Hands-on comparison of Qoder vs Cursor AI IDEs: Agent autonomy, human interaction count, and architecture decisions. Qoder needed only 2 interactions vs Cursor's 8.
Product ReviewsCursor Cloud Agent Demo: Eliminating Bottlenecks Across the Entire Software Development Lifecycle
Deep analysis of Cursor's Cloud Agent demo showing how cloud VMs, automated test artifacts, and a full-chain control plane systematically eliminate human bottlenecks across the software development lifecycle.