ChatGPT & Text Prompts

Android App Idea & Code Prompts (Kotlin Compose)

XML layouts ka daur ab beet chuka hai; aaj modern Android development 100% Jetpack Compose aur Kotlin Coroutines par chalta hai. ChatGPT se production-ready declarative UI aur MVVM architecture code generate karwayein.

Android App Idea & Code Prompts (Kotlin Compose)

Aksar log ChatGPT se basic sawal poochhte hain aur generic jawab milne par kehte hain ki "AI to normal hai". Lekin jab aap system persona, constraints, role conditioning aur iterative feedback framework provide karte hain, to wahi AI ek master consultant ban jata hai.

Is comprehensive guide mein hum copy-paste ready tested prompt templates aur unka step-by-step application sikhenge.


⚑ Master Copy-Paste Prompts for High-Accuracy Output

1. Clean MVVM Jetpack Compose Screen Architecture

Act as a Principal Android Engineer at Google.
Write complete, idiomatic Kotlin code for an Android feature: [Feature Name, e.g., Crypto Price Tracker Screen].
Architecture Requirements:
1. Declarative UI using Jetpack Compose (Material3 components).
2. ViewModel using StateFlow for reactive UI state updates (Loading, Success, Error states).
3. Clean repository layer with Kotlin Coroutines for async network calls.
4. Support for screen rotation, dark theme, and preview annotation.
Provide clean, idiomatic Kotlin code following Google's official Architecture guidelines.

Yeh Prompt Kyun Kaam Karta Hai: Yeh prompt AI ko broad guessing karne se rokta hai aur ek strict operational sandbox provide karta hai. Isme role conditioning, exact output format aur step-by-step guidance pehle se embedded hai.


2. Room Local Database Repository Generator

Generate a complete Room Database implementation in Kotlin for an entity [e.g., Note/Task]: Entity dataclass with primary key, DAO interface with Flow queries, Database class, and Repository wrapper class with coroutine dispatchers.

Pro Tip: Jab bhi aap output generate karwayein, hamesha follow-up prompt dalein: "Is output mein kya kamiyan hain aur ise 10x behtar kaise banaya ja sakta hai?" Isse ChatGPT self-correction mode activate karta hai.


πŸ› οΈ Step-by-Step Prompt Optimization Blueprint

ChatGPT se 100% accurate jawab nikalne ke liye yeh 4-pillar formula hamesha follow karein:

  1. Role Clarity: ChatGPT ko pehle sentence mein ek specific identity assign karein (jaise Senior Technical Recruiter, Competitive Exam Mentor, ya IIT Professor).
  2. Context Depth: Apni current situation, background knowledge aur target goal clear batayein. Adhuri information hamesha generic output deti hai.
  3. Negative Constraints: AI ko kya nahi karna hai wo bhi batayein (jaise "Do not use academic jargon", "Keep within 200 words", "Do not give direct answers").
  4. Output Structure: Tables, bullet points, numbered lists ya code blocks mein answer format maangein.

AI prompt craft ko mastery ke sath sikhne ke liye hamari AI Prompt Kaise Likhe 7 Step Formula Guide aur Prompt Engineering Aasan Bhasha Me zaroor padhein. Real-life examples ke liye Achha Prompt vs Bura Prompt check karein.

πŸ“± Memory Leak & Recomposition Optimization

Jetpack Compose mein unnecessary recompositions performance slow kar sakti hain. ChatGPT se prompt karein: "Audit this Composable function for state hoisting, unstable parameter types, and memory optimization."

Software architecture fundamentals ke liye Prompt Engineering Guide aur Database Design Prompts padhein.


🎯 Prompt Execution & Iterative Refinement Tips

ChatGPT se output lene ke baad hamesha in 3 follow-up commands ka upayog karein:

  1. Critique & Self-Correction: "Is output ka critical analysis karo aur 3 aisi kamiyan batao jo ise average se world-class banne se rok rahi hain."
  2. Tone & Humanization Adjustment: "Ise aur zyada conversational, relatable aur natural tone mein rewrite karo bina mool points aur technical depth ko chhodte huye."
  3. Edge Case & Stress Testing: "Aise 2 practical scenarios ya edge cases add karo jahan yeh formula sabse zyada challenge face kar sakta hai aur unka bulletproof solution do."

In iterative refinement cycles se aapka final output kisi bhi generic AI response se 10x zyada polished, actionable aur high-converting ban jata hai.


Frequently Asked Questions (FAQs)

Q1: Jetpack Compose me state handle kaise karein?

ViewModel me StateFlow use karke Compose screen par collectAsStateWithLifecycle() se state observe karna best practice hai.

Q2: Kya ChatGPT Android Studio ke errors debug kar sakta hai?

Haan, Logcat error stack trace paste karne par exact fix aur dependencies update bata deta hai.

Q3: Room DB me Flow ka kya advantage hai?

Flow se database data change hote hi UI automatically reactive update ho jata hai.

← Pichla Post

Website Banane Ke ChatGPT Prompts (HTML & CSS)

Agla Post β†’

Bug Fix Karne Ke Prompts (10x Faster Debugging)

About the Author

TM
Verified Author
Software Engineer & AI Educator

Main ek Software Engineer hoon jo AI aur Machine Learning ke baare mein Hinglish mein likhta hai. Maine AI Gyani isliye banaya taaki koi bhi Indian student bina English ki tension ke AI seekh sake β€” bilkul free, bilkul asaan.