<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Pethanalakshmis on Medium]]></title>
        <description><![CDATA[Stories by Pethanalakshmis on Medium]]></description>
        <link>https://medium.com/@pethanalakshmis?source=rss-11f4f33b85f8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vxIRgpZ9q2V1Ck5UHcSZxw.jpeg</url>
            <title>Stories by Pethanalakshmis on Medium</title>
            <link>https://medium.com/@pethanalakshmis?source=rss-11f4f33b85f8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 21:01:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pethanalakshmis/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From Mobile Apps to Intelligent Experiences: My Technical Takeaways from Google I/O Connect India…]]></title>
            <link>https://medium.com/@pethanalakshmis/from-mobile-apps-to-intelligent-experiences-my-technical-takeaways-from-google-i-o-connect-india-f024cc157d27?source=rss-11f4f33b85f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/f024cc157d27</guid>
            <category><![CDATA[jetpack-compose]]></category>
            <category><![CDATA[android-studio]]></category>
            <category><![CDATA[mobile-development]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[google-io-2026]]></category>
            <dc:creator><![CDATA[Pethanalakshmis]]></dc:creator>
            <pubDate>Sat, 18 Jul 2026 05:22:29 GMT</pubDate>
            <atom:updated>2026-07-18T05:50:49.589Z</atom:updated>
            <content:encoded><![CDATA[<h3>From Mobile Apps to Intelligent Experiences: My Technical Takeaways from Google I/O Connect India 2026</h3><p><em>Google I/O Connect India 2026 wasn’t just another developer conference. It highlighted a clear shift in Android development — from building mobile applications to building intelligent, adaptive experiences powered by AI.</em></p><p>As an Android developer, I didn’t come back with a list of new APIs. Instead, I came back with a different way of thinking about application architecture.</p><p>The common theme across the Android and AI sessions was clear:</p><ul><li>AI should be built into the application architecture — not added as a feature.</li><li>Intelligence should execute as close to the user as possible.</li><li>Developer productivity is becoming AI-assisted.</li><li>Performance, privacy, and adaptive experiences remain fundamental.</li></ul><p>These are the technologies that stood out to me and how I believe they’ll influence Android development over the next few years.</p><h3>1. Hybrid AI Inference Changes Android Architecture</h3><p>One of the most impactful sessions was <strong>“Add Intelligence to your Android app with Gemini models and Hybrid Inference.”</strong></p><p>For years, Android applications integrated AI by calling cloud APIs.</p><p>Today, Android applications can intelligently combine:</p><ul><li><strong>Gemini Nano</strong> for on-device inference</li><li><strong>Gemini Cloud models</strong> for advanced reasoning</li></ul><p>This introduces a new architectural decision.</p><p>Instead of asking:</p><blockquote>Which AI model should I use?</blockquote><p>We’re now asking:</p><blockquote>Where should this inference execute?</blockquote><p>Simple, latency-sensitive, or privacy-focused tasks belong on the device, while computationally intensive reasoning can leverage cloud models.</p><h3>Engineering Benefits</h3><ul><li>Lower latency</li><li>Better privacy</li><li>Offline capability</li><li>Reduced cloud costs</li><li>Better battery and network efficiency</li></ul><h3>Where I’d Apply It</h3><ul><li>Smart calendar event creation</li><li>Semantic search</li><li>Email summarization</li><li>Voice commands</li><li>Intelligent reminders</li><li>Personal productivity features</li></ul><h3>Current Availability</h3><ul><li>Gemini API — Generally Available</li><li>Gemini Nano — Available on supported Android devices</li></ul><h3>Official References</h3><ul><li>Android AI: <a href="https://developer.android.com/ai">https://developer.android.com/ai</a></li><li>Gemini API: <a href="https://ai.google.dev/">https://ai.google.dev/</a></li><li>Gemini Nano: <a href="https://developer.android.com/ai/gemini-nano">https://developer.android.com/ai/gemini-nano</a></li></ul><h3>2. On-device AI is Finally Becoming Practical</h3><p>The workshop on <strong>LiteRT-LM</strong> was particularly exciting.</p><p>Running Large Language Models directly on Android devices has always been challenging because of memory, performance, and hardware limitations.</p><p>Google’s AI Edge ecosystem is making this much more practical.</p><p>Instead of depending entirely on cloud infrastructure, applications can execute AI locally.</p><h3>Why This Matters</h3><p>Applications become:</p><ul><li>Faster</li><li>More private</li><li>Offline capable</li><li>Less expensive to operate</li></ul><h3>Potential Use Cases</h3><ul><li>Offline assistants</li><li>AI note-taking</li><li>Document summarization</li><li>Accessibility</li><li>Translation</li><li>Healthcare applications</li></ul><h3>Current Availability</h3><ul><li>LiteRT-LM — Developer Preview</li><li>Gemma Models — Available</li></ul><h3>Official References</h3><ul><li>LiteRT: <a href="https://ai.google.dev/edge/litert">https://ai.google.dev/edge/litert</a></li><li>Gemma: <a href="https://ai.google.dev/gemma">https://ai.google.dev/gemma</a></li></ul><h3>3. Agentic Applications Will Replace Traditional AI Features</h3><p>Perhaps the biggest conceptual shift was Google’s focus on <strong>Agentic AI</strong>.</p><p>Today’s AI features usually look like this:</p><p>User → Prompt → AI → Response</p><p>Tomorrow’s Android applications will work differently.</p><p>Applications will:</p><ul><li>Understand user goals</li><li>Plan execution</li><li>Call APIs</li><li>Execute workflows</li><li>Complete tasks</li></ul><p>Instead of asking users to navigate multiple screens, applications can perform multi-step operations autonomously.</p><p>Imagine saying:</p><blockquote><em>“Schedule a design review with the Android team next Thursday afternoon.”</em></blockquote><p>The application should:</p><ul><li>Find free time</li><li>Check attendees</li><li>Book a meeting room</li><li>Create the event</li><li>Send invitations</li></ul><p>That’s a very different application architecture.</p><h3>Engineering Impact</h3><p>This shifts Android development from <strong>screen-oriented design</strong> to <strong>intent-oriented design</strong>.</p><h3>Current Availability</h3><ul><li>Gemini Interactions API — Preview</li><li>Managed Agents — Preview</li><li>Google Antigravity — Early Access / Preview</li></ul><h3>Official References</h3><ul><li>Gemini API: <a href="https://ai.google.dev/">https://ai.google.dev/</a></li><li>Google AI Studio: <a href="https://aistudio.google.com/">https://aistudio.google.com/</a></li></ul><h3>4. Android Studio is Becoming an Engineering Assistant</h3><p>Gemini inside Android Studio has evolved far beyond code completion.</p><p>The demonstrations showed AI assisting with:</p><ul><li>Multi-file feature implementation</li><li>Code explanation</li><li>Refactoring</li><li>Unit test generation</li><li>Debugging</li><li>Project-wide reasoning</li></ul><p>I don’t see this replacing developers.</p><p>Instead, I see it removing repetitive engineering work so developers can spend more time on architecture, product decisions, and code quality.</p><h3>Current Availability</h3><ul><li>✅ Available in the latest Android Studio builds with Gemini enabled.</li></ul><h3>Official References</h3><ul><li>Gemini in Android Studio: <a href="https://developer.android.com/studio/preview/gemini">https://developer.android.com/studio/preview/gemini</a></li></ul><h3>5. Adaptive UI is No Longer Optional</h3><p>Adaptive UI was another recurring theme.</p><p>Android applications are expected to work seamlessly across:</p><ul><li>Phones</li><li>Tablets</li><li>Foldables</li><li>ChromeOS</li><li>Desktop modes</li><li>Android XR</li></ul><p>Google demonstrated new Compose APIs — including Grid, FlexBox, and MediaQuery — to make adaptive layouts easier to build.</p><p>Rather than treating tablets as special cases, adaptive layouts are becoming part of the application’s core architecture.</p><h3>Current Availability</h3><ul><li>Material3 Adaptive — Stable</li><li>New Compose adaptive APIs (Grid, FlexBox, MediaQuery) — Preview / Experimental</li></ul><h3>Official References</h3><ul><li>Compose Adaptive: <a href="https://developer.android.com/jetpack/compose/adaptive">https://developer.android.com/jetpack/compose/adaptive</a></li></ul><h3>6. Performance Engineering Still Matters</h3><p>Despite the excitement around AI, Google continued emphasizing Android fundamentals.</p><p>Users still expect:</p><ul><li>Fast startup</li><li>Smooth scrolling</li><li>Efficient memory usage</li><li>Battery optimization</li><li>Stable applications</li></ul><p>The performance workshop reinforced the importance of:</p><ul><li>R8 optimization</li><li>ProfilingManager</li><li>Jetpack Compose optimization</li><li>Memory profiling</li><li>Performance benchmarking</li></ul><p>AI should enhance the user experience — not degrade it.</p><h3>Current Availability</h3><ul><li>Available today</li></ul><h3>Official References</h3><ul><li>Android Performance: <a href="https://developer.android.com/topic/performance">https://developer.android.com/topic/performance</a></li></ul><h3>7. Digital Identity is Becoming a Platform Capability</h3><p>Another interesting session focused on <strong>Credential Manager</strong> and the <strong>Digital Credentials API</strong>.</p><p>Instead of every application implementing its own identity verification flow, Android is moving toward standardized, cryptographically verified credentials.</p><p>Potential use cases include:</p><ul><li>Government IDs</li><li>Driver’s licenses</li><li>Passports</li><li>Age verification</li><li>Verified email identities</li></ul><p>This will simplify identity verification while improving security and user experience.</p><h3>Current Availability</h3><ul><li>Credential Manager — Stable</li><li>Digital Credentials API — Rolling out across the Android ecosystem</li></ul><h3>Official References</h3><ul><li>Credential Manager: <a href="https://developer.android.com/identity/sign-in/credential-manager">https://developer.android.com/identity/sign-in/credential-manager</a></li><li>Digital Credentials API: <a href="https://developer.android.com/identity/digital-credentials">https://developer.android.com/identity/digital-credentials</a></li></ul><h3>My Learning Roadmap</h3><p>Over the coming months, these are the areas I plan to explore more deeply:</p><ul><li>Gemini APIs</li><li>Hybrid Inference</li><li>LiteRT-LM</li><li>AI Edge</li><li>Agentic Application Architecture</li><li>Gemini in Android Studio</li><li>Adaptive Compose</li><li>Performance Engineering</li><li>Credential Manager</li><li>Digital Credentials API</li></ul><p>The goal isn’t simply to learn new APIs.</p><p>It’s to understand how these technologies fit into real production applications while maintaining scalability, performance, security, and a great user experience.</p><h3>Final Thoughts</h3><p><strong>Android development is no longer just about building mobile applications. It’s about designing intelligent systems that combine AI, performance, privacy, and adaptive user experiences.</strong></p><p>The fundamentals of Android engineering — clean architecture, performance optimization, accessibility, testing, and great UX — remain as important as ever.</p><p>AI doesn’t replace those fundamentals.</p><p>It extends what our applications are capable of.</p><p>As Android engineers, we’re entering a phase where understanding <strong>AI architecture</strong>, <strong>on-device intelligence</strong>, <strong>adaptive experiences</strong>, and <strong>agentic workflows</strong> will become just as valuable as understanding Jetpack Compose, Coroutines, or Clean Architecture.</p><h3>References</h3><ul><li>Android AI — <a href="https://developer.android.com/ai">https://developer.android.com/ai</a></li><li>Gemini API — <a href="https://ai.google.dev/">https://ai.google.dev/</a></li><li>Gemini Nano — <a href="https://developer.android.com/ai/gemini-nano">https://developer.android.com/ai/gemini-nano</a></li><li>LiteRT — <a href="https://ai.google.dev/edge/litert">https://ai.google.dev/edge/litert</a></li><li>Gemma — <a href="https://ai.google.dev/gemma">https://ai.google.dev/gemma</a></li><li>Android Studio Gemini — <a href="https://developer.android.com/studio/preview/gemini">https://developer.android.com/studio/preview/gemini</a></li><li>Jetpack Compose Adaptive — <a href="https://developer.android.com/jetpack/compose/adaptive">https://developer.android.com/jetpack/compose/adaptive</a></li><li>Android Performance — <a href="https://developer.android.com/topic/performance">https://developer.android.com/topic/performance</a></li><li>Credential Manager — <a href="https://developer.android.com/identity/sign-in/credential-manager">https://developer.android.com/identity/sign-in/credential-manager</a></li><li>Digital Credentials API — <a href="https://developer.android.com/identity/digital-credentials">https://developer.android.com/identity/digital-credentials</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f024cc157d27" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[You’re Writing Too Many Prompts — Build an AI System Instead (Claude Code Part 2)]]></title>
            <link>https://medium.com/@pethanalakshmis/youre-writing-too-many-prompts-build-an-ai-system-instead-claude-code-part-2-3a7c976c0982?source=rss-11f4f33b85f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a7c976c0982</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[developer-tools]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[kotlin-multiplatform]]></category>
            <dc:creator><![CDATA[Pethanalakshmis]]></dc:creator>
            <pubDate>Sun, 12 Apr 2026 05:46:54 GMT</pubDate>
            <atom:updated>2026-04-12T06:20:23.381Z</atom:updated>
            <content:encoded><![CDATA[<h3>From using AI to building a structured development system</h3><p>Most developers are still using AI like this:</p><blockquote><em>Write a prompt → get code → repeat.</em></blockquote><p>It works… at first.</p><p>But then things start breaking.</p><ul><li>Code becomes inconsistent</li><li>Architecture rules get ignored</li><li>You repeat the same prompts</li><li>Technical debt grows</li></ul><p>I ran into the same problem.</p><p>So I stopped prompting.</p><blockquote><em>And started building a system.</em></blockquote><p>In my previous article, I showed how to use Claude Code in Android development to speed up tasks like generating ViewModels, UI, and reducing boilerplate.</p><p>👉 Read Part 1 here: <a href="https://medium.com/@pethanalakshmis/how-to-use-claude-code-in-android-development-72990f6427b7">https://medium.com/@pethanalakshmis/how-to-use-claude-code-in-android-development-72990f6427b7</a></p><h3>Why “Prompt-Based Development” Breaks Down</h3><p>At first, prompts feel powerful:</p><pre>Generate a ViewModel using StateFlow and repository pattern</pre><p>But over time:</p><ul><li>You rewrite the same prompts</li><li>Output varies slightly every time</li><li>Architecture slowly drifts</li></ul><p>The issue isn’t the AI.</p><blockquote><em>It’s the lack of structure.</em></blockquote><h3>Step 1: Define Your Project Brain (CLAUDE.md)</h3><p>The most important file in your setup is:</p><h3>CLAUDE.md</h3><p>This acts as persistent context for your project.</p><p>For Android/KMP projects, it should include:</p><ul><li>Build commands</li><li>Architecture rules</li><li>Constraints and conventions</li></ul><h3>Example:</h3><pre>## Architecture Rules<br>- Domain layer has zero Android dependencies<br>- DTOs stay inside data layer only<br>- ViewModels expose StateFlow&lt;UiState&gt;<br>- Use cases use operator fun invoke()</pre><p>This ensures Claude doesn’t guess — it follows your rules consistently.</p><h3>Step 2: Replace Repeated Prompts with Skills</h3><p>If you find yourself repeating prompts, convert them into <strong>Skills</strong>.</p><p>Instead of:</p><blockquote><em>“Create domain layer with models and repository interfaces”</em></blockquote><p>You run:</p><pre>/generate_domain</pre><p>This generates:</p><ul><li>Models</li><li>Repository interfaces</li><li>Use cases</li></ul><p>All aligned with your architecture.</p><h3>Step 3: Build a Generation Pipeline</h3><p>The real power comes from chaining skills into a workflow.</p><h3>Example pipeline for Android/KMP:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pC9ayctWXF0nIWz_v2q_1Q.png" /></figure><pre>/init_project      → Setup modules and Gradle<br>/generate_domain   → Business logic<br>/generate_data     → API + database<br>/generate_viewmodel→ State management<br>/generate_ui       → Compose screens<br>/generate_tests    → Validation</pre><p>Each step builds on the previous one.</p><p>You move from:</p><p>❌ Random generation</p><p>To:</p><p>✅ Structured, repeatable development</p><h3>Step 4: Add Guardrails (Permissions &amp; Hooks)</h3><p>To keep everything safe and consistent, define rules.</p><h3>Permissions</h3><pre>&quot;deny&quot;: [<br>  &quot;Bash(rm -rf *)&quot;,<br>  &quot;Bash(git push --force*)&quot;<br>]</pre><h3>Hooks</h3><p>You can enforce:</p><ul><li>Architecture validation</li><li>Protected files</li><li>Auto-formatting</li></ul><p>This ensures Claude:</p><ul><li>Doesn’t break your system</li><li>Stays within boundaries</li></ul><h3>Step 5: What Changes After This?</h3><p>Once you implement this system:</p><p>You stop thinking:</p><blockquote><em>“What prompt should I write?”</em></blockquote><p>And start thinking:</p><blockquote><em>“What workflow should I run?”</em></blockquote><h3>Key Takeaways</h3><ul><li>Prompts are temporary — systems are scalable</li><li>CLAUDE.md defines your architecture brain</li><li>Skills remove repetition</li><li>Pipelines bring consistency</li><li>Guardrails maintain quality</li></ul><h3>What’s Next?</h3><p>In Part 3, we go even further:</p><blockquote><em>Running multiple AI agents in parallel — like a full engineering team</em></blockquote><p>👉 <strong>Part 3: Multi-Agent Workflows — Build Your AI Team</strong><br><a href="https://medium.com/@pethanalakshmis/stop-using-one-ai-build-a-team-instead-part-3-6c7976064498">https://medium.com/@pethanalakshmis/stop-using-one-ai-build-a-team-instead-part-3-6c7976064498</a></p><p>Claude Code is no longer just a tool.</p><blockquote><em>It becomes infrastructure.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a7c976c0982" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Using One AI — Build a Team Instead (Part 3)]]></title>
            <link>https://medium.com/@pethanalakshmis/stop-using-one-ai-build-a-team-instead-part-3-6c7976064498?source=rss-11f4f33b85f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c7976064498</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[kotlin-multiplatform]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Pethanalakshmis]]></dc:creator>
            <pubDate>Sun, 12 Apr 2026 05:42:32 GMT</pubDate>
            <atom:updated>2026-04-12T08:07:10.653Z</atom:updated>
            <content:encoded><![CDATA[<p>Most developers are still using AI like a chatbot.</p><p>I stopped doing that — and built a system.<br> Then I took it further.</p><p>I built a <strong>team of AI agents working in parallel using Claude Code</strong>.</p><p>This guide shows how to move beyond prompts and design a <strong>scalable, multi-agent development workflow</strong> for Android/Kotlin Multiplatform projects.</p><h3>🔗 GitHub Project</h3><p><a href="https://github.com/Pethanalakshmi-S/android-kmp-claude-ai-architecture">https://github.com/Pethanalakshmi-S/android-kmp-claude-ai-architecture</a></p><p>This repo includes:</p><ul><li>Multi-agent workflows</li><li>Custom Claude agents</li><li>Android/KMP architecture setup</li></ul><h3>From Assistant → System → Team</h3><ul><li><strong>Part 1:</strong> Using Claude Code in Android development</li><li><strong>Part 2:</strong> Structuring workflows with rules, skills, and pipelines</li><li><strong>Part 3 (This):</strong> Turning one AI into a <strong>team of specialized agents</strong></li></ul><h3>Why Single-Agent AI Falls Short</h3><p>Even with a strong setup, a single AI has limits:</p><ul><li>Works <strong>sequentially</strong></li><li>Handles <strong>one perspective at a time</strong></li><li>Struggles with <strong>deep, multi-dimensional problems</strong></li></ul><h3>Example: Pull Request Review</h3><p>A proper PR review requires:</p><ul><li>Security analysis</li><li>Performance checks</li><li>Architecture validation</li><li>Test verification</li></ul><p>A single AI doing all of this becomes:<br> → Slower<br> → Less accurate<br> → More shallow</p><h3>The Multi-Agent Approach</h3><p>Claude now supports <strong>AI agents that work in parallel</strong>, each focused on a specific responsibility.</p><p>Instead of one generalist, you get a <strong>team of specialists</strong>:</p><p>AgentResponsibilitySecurity ReviewerFinds vulnerabilitiesPerformance AuditorDetects bottlenecksTest ValidatorEnsures coverageCode ReviewerMaintains architecture quality</p><p>Each agent:</p><ul><li>Works independently</li><li>Focuses deeply on one concern</li><li>Produces better results</li></ul><p>Then everything is <strong>combined into a single output</strong>.</p><h3>Why This Is Powerful</h3><p>This approach brings real advantages:</p><h4>1. Parallel Execution</h4><p>Multiple agents run at the same time → faster results</p><h4>2. Specialized Thinking</h4><p>Each agent is optimized for one domain → higher quality</p><h4>3. Scalable Workflows</h4><p>You can add/remove agents depending on complexity</p><h4>4. System-Driven Development</h4><p>You stop prompting manually and start <strong>orchestrating intelligence</strong></p><h3>Level 1: Built-in Claude Agents</h3><p>You can start immediately using built-in agents:</p><ul><li><strong>Explore Agent</strong> → Understands your codebase</li><li><strong>Plan Agent</strong> → Designs architecture</li><li><strong>General Agent</strong> → Implements changes</li></ul><h3>Example: Parallel Code Analysis</h3><p>Run these simultaneously:</p><ol><li>Find API calls without error handling</li><li>Detect ViewModels not using StateFlow</li><li>Analyze navigation structure</li></ol><p>This gives you <strong>instant multi-angle insights</strong>.</p><h3>Level 2: Custom Agents</h3><p>You can define your own agents inside:</p><pre>.claude/agents/</pre><h3>Example: Security Reviewer</h3><pre>name: security-reviewer<br>tools: Read, Grep, Glob</pre><p>Checks:</p><ul><li>Authentication issues</li><li>Data leaks</li><li>Injection risks</li></ul><h3>Example: Performance Auditor</h3><pre>name: performance-auditor<br>tools: Read, Grep, Glob</pre><p>Finds:</p><ul><li>N+1 queries</li><li>Heavy recomposition</li><li>Main-thread blocking</li></ul><h3>Example: Test Validator</h3><pre>name: test-validator<br>tools: Read, Grep, Glob, Bash(./gradlew *test*)</pre><p>Validates:</p><ul><li>Test coverage</li><li>Edge cases</li><li>Failures</li></ul><h3>Level 3: Agent Teams</h3><p>Now you combine everything into <strong>coordinated workflows</strong>.</p><h3>Example Command</h3><pre>/review_pr</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fXXXZ36UVHc-yh-rrbhfvA.png" /></figure><p>Triggers:</p><ul><li>Security review</li><li>Performance audit</li><li>Test validation</li><li>Code quality check</li></ul><p>All running <strong>simultaneously</strong>.</p><h3>How Claude Agents Work Together</h3><p>Claude acts as the <strong>orchestrator</strong>:</p><h3>Task Coordination</h3><ul><li>Assigns tasks to agents</li><li>Tracks progress</li><li>Merges outputs</li></ul><h3>Communication</h3><p>Agents can interact:</p><pre>message security-agent verify this query for injection</pre><p>This enables <strong>collaborative reasoning</strong>, not isolated outputs.</p><h3>Worktree Isolation (Advanced)</h3><p>When agents modify code:</p><ul><li>Each agent gets its own <strong>Git worktree</strong></li><li>No merge conflicts</li><li>Safe parallel changes</li></ul><p>Perfect for:</p><ul><li>Large refactors</li><li>Parallel feature development</li></ul><h3>Real Android Use Cases</h3><h3>Feature Development</h3><ul><li>Agent 1 → UI (Compose)</li><li>Agent 2 → ViewModel</li><li>Agent 3 → API integration</li><li>Agent 4 → Tests</li></ul><p>Everything progresses <strong>in parallel</strong>.</p><h3>Debugging</h3><p>Investigating a crash?</p><p>Split the problem:</p><ol><li>Lifecycle issue</li><li>Coroutine bug</li><li>Memory leak</li></ol><p>Each agent explores a different root cause → faster resolution.</p><h3>Full Codebase Audit</h3><pre>/full_audit</pre><p>Checks:</p><ul><li>Architecture violations</li><li>Performance issues</li><li>Security risks</li><li>Test gaps</li></ul><h3>Best Practices</h3><ul><li>Keep agents <strong>focused and narrow</strong></li><li>Use parallelism only when needed</li><li>Combine agents with reusable <strong>skills</strong></li><li>Treat workflows as systems, not prompts</li></ul><h3>The Evolution</h3><p>StageWorkflow:</p><p>Part 1- AI assists development</p><p>Part 2- AI follows your system</p><p>Part 3- AI becomes your team</p><h3>Final Thoughts</h3><p>Claude’s AI agents fundamentally change how software is built:</p><ul><li>From <strong>sequential thinking → parallel execution</strong></li><li>From <strong>generic outputs → specialized intelligence</strong></li><li>From <strong>manual prompting → system design</strong></li></ul><p>You’re no longer just coding with AI.</p><p>You’re designing how AI works <strong>with you</strong>.</p><h3>Try It Yourself</h3><p>🔗 GitHub Project<br> <a href="https://github.com/Pethanalakshmi-S/android-kmp-claude-ai-architecture">https://github.com/Pethanalakshmi-S/android-kmp-claude-ai-architecture</a></p><p>Clone it.<br> Explore the agents.<br> Run multi-agent workflows.</p><h3>What’s Next?</h3><p>The next level includes:</p><ul><li>CI/CD automation with Claude Code</li><li>Automated PR reviews in GitHub</li><li>Fully autonomous development workflows</li></ul><p>This is where development becomes truly <strong>AI-native</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c7976064498" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Use Claude Code in Android Development]]></title>
            <link>https://medium.com/@pethanalakshmis/how-to-use-claude-code-in-android-development-72990f6427b7?source=rss-11f4f33b85f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/72990f6427b7</guid>
            <category><![CDATA[claude-code]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[developer-productivity]]></category>
            <dc:creator><![CDATA[Pethanalakshmis]]></dc:creator>
            <pubDate>Sat, 21 Feb 2026 17:40:20 GMT</pubDate>
            <atom:updated>2026-02-21T18:01:07.169Z</atom:updated>
            <content:encoded><![CDATA[<h4>(Complete Guide with CLAUDE.md and Multi-Module Setup)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EisPDp5effghGSa86y7jTg.jpeg" /></figure><p>AI coding assistants are quickly becoming part of modern Android development.</p><p>Today, developers can choose from tools like:</p><p>• GitHub Copilot<br> • Cursor<br> • Amazon CodeWhisperer<br> • Tabnine<br> • Codeium<br> • Replit Ghostwriter<br> • Claude via Claude Code</p><p>Each AI coding assistant supports Android development differently.</p><p>Recently, I explored <strong>Claude Code</strong> in a real Android project built with:</p><p>• Kotlin<br> • MVVM architecture<br> • Android Architecture<br> • Coroutines + Flow<br> • Jetpack Compose<br> • Multi-module structure</p><p>Here’s what I learned — especially about the importance of CLAUDE.md.</p><h4>What Makes Claude Code Different?</h4><p>Claude Code operates at the <strong>repository level</strong>, not just the file level.</p><p>That means it can:</p><p>✔ Read your full Android project structure<br> ✔ Understand module boundaries<br> ✔ Modify multiple files consistently<br> ✔ Follow architectural constraints<br> ✔ Maintain Clean Architecture rules</p><p>For structured Android apps, this matters.</p><p>Because in real-world Android development, architecture consistency is more important than quick code snippets.</p><h4>How Claude Code Works in an Existing Android Project</h4><p>When you initialize Claude Code in your project root:</p><ol><li>It scans your Android modules</li><li>It understands ViewModels, repositories, and composables</li><li>It analyzes dependencies</li><li>It reads relevant files when prompted</li><li>It generates or updates code across layers</li></ol><p>But here is the key insight:</p><p>Claude performs significantly better when you explicitly define project rules.</p><p>And that is where CLAUDE.md becomes critical.</p><h4>What Is CLAUDE.md?</h4><p>CLAUDE.md is a repository-level instruction file for Claude Code.</p><p>Think of it as:</p><p>• AI architecture documentation<br> • Coding standards enforcement<br> • Android project rulebook</p><p>Instead of repeatedly telling the AI:</p><p>“Use Flow instead of LiveData.”<br> “Do not put business logic in Compose UI.”<br> “Follow MVVM strictly.”</p><p>You define those rules once in CLAUDE.md.</p><p>Claude reads it before generating or modifying Android code.</p><h4>Why CLAUDE.md Is Essential in Android Development</h4><p>Without CLAUDE.md:</p><p>• Claude infers patterns<br> • Architectural drift can happen<br> • Inconsistencies may appear across modules</p><p>With CLAUDE.md:</p><p>• Architecture stays controlled<br> • Clean Architecture boundaries are enforced<br> • MVVM structure is preserved<br> • Jetpack Compose best practices are followed<br> • Multi-module rules remain consistent</p><p>In large Android projects, this becomes a major advantage.</p><h4>Example: Android CLAUDE.md</h4><p>Here is a structured example for a modern Android project:</p><pre># Project Stack<br><br>- Kotlin only<br>- Jetpack Compose (no XML)<br>- MVVM architecture<br>- Hilt for DI<br>- Retrofit for networking<br>- Room for database<br>- Coroutines + Flow only (no LiveData)<br><br>---<br><br># Architecture Rules<br><br>- UI layer contains composables only<br>- No business logic in composables<br>- ViewModels handle state and logic<br>- Repositories manage data sources<br>- Domain layer contains use cases<br>- Strict separation between layers<br><br>---<br><br># Compose Guidelines<br><br>- Prefer stateless composables<br>- Apply state hoisting<br>- UI state must be immutable<br>- Use collectAsStateWithLifecycle for Flow<br><br>---<br><br># Performance Rules<br><br>- Use LazyColumn for large lists<br>- Avoid unnecessary recompositions<br>- Avoid blocking main thread<br>- Use Dispatchers.IO for data operations<br><br>---<br><br># Naming Conventions<br><br>- Screens → Screen<br>- UI state → UiState<br>- Events → UiEvent<br>- Repository → Repository<br><br>---<br><br># Forbidden<br><br>- No LiveData<br>- No direct database access in ViewModel<br>- No XML layouts<br>- No Java files</pre><p>With this file in place, Claude automatically respects your structure when:</p><ul><li>Creating new features</li><li>Refactoring</li><li>Optimizing</li><li>Adding new modules</li></ul><h4><strong>Multi-Module Android + Multiple CLAUDE.md Files</strong></h4><pre>/CLAUDE.md<br>/app<br>/feature-auth<br>   /CLAUDE.md<br>/core<br>   /CLAUDE.md</pre><p>Claude follows a hierarchical rule system:</p><p>• Reads root CLAUDE.md<br> • Reads module-level CLAUDE.md<br> • Applies closest rules with priority</p><p>This allows:</p><p>• Global Clean Architecture rules<br> • Feature-specific constraints<br> • Security-specific modules (e.g., auth rules)<br> • Controlled AI behavior in Android apps</p><h3>How Claude Uses CLAUDE.md Internally</h3><p>When you prompt:</p><blockquote><em>“Create a payment feature using MVVM and Jetpack Compose.”</em></blockquote><p>Claude does not immediately start generating code.</p><p>Instead, it:</p><ol><li>Reads the relevant project files</li><li>Locates the applicable CLAUDE.md (current folder and parent folders)</li><li>Interprets architectural and coding rules</li><li>Merges global and local constraints</li><li>Generates code within those defined boundaries</li><li>Avoids any explicitly forbidden practices</li></ol><p>This means CLAUDE.md directly influences how Claude reasons before writing code.</p><p>The result is output that aligns with your architecture rather than guessing your intent.</p><p>That is what makes the AI behavior more predictable and production-aligned.</p><h4>Final Takeaway</h4><p>AI coding tools are becoming a regular part of modern software development. They can help generate code, refactor logic, improve structure, and speed up daily tasks.</p><p>However, the real value of AI does not come from writing code faster.</p><p>It comes from clarity.</p><p>When your architecture, coding standards, and project rules are clearly defined, AI becomes more consistent and predictable. That is where CLAUDE.md makes a real difference.</p><p>By documenting expectations and constraints in one place, you guide the AI to follow your system design instead of making assumptions.</p><p>In simple terms:</p><p>AI works best when your rules are explicit.</p><p>When structure is clear, AI becomes a reliable assistant — not just a code generator.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72990f6427b7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Gradle Composite Builds: The Easy Way to Develop Locally Without Versioning]]></title>
            <link>https://medium.com/@pethanalakshmis/gradle-composite-builds-the-easy-way-to-develop-locally-without-versioning-5de667479c8d?source=rss-11f4f33b85f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/5de667479c8d</guid>
            <category><![CDATA[gradle]]></category>
            <category><![CDATA[modular-architecture]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android-development]]></category>
            <category><![CDATA[dependency-management]]></category>
            <dc:creator><![CDATA[Pethanalakshmis]]></dc:creator>
            <pubDate>Thu, 13 Mar 2025 17:15:05 GMT</pubDate>
            <atom:updated>2025-03-13T17:15:05.405Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Gradle is a powerful build system that enables developers to manage dependencies efficiently. When working on large-scale applications with multiple independent modules or libraries, managing dependencies can become cumbersome. This is where <strong>Gradle Composite Builds</strong> shine — offering a way to integrate separate repositories seamlessly, ensuring immediate reflection of local changes without needing versioned releases.</p><h4>In this guide, we’ll explore:</h4><ul><li>How to link independent projects using Gradle Composite Builds</li><li>Including an entire library vs. a specific module</li><li>Ensuring compatibility between projects</li><li>Using dependency substitution for efficient dependency management</li></ul><h3>The Power of Gradle Composite Builds</h3><p>A <strong>composite build</strong> is a build that includes other builds, allowing multiple Gradle builds to be combined into a single build without requiring a traditional repository structure. This means we can:</p><ul><li><strong>Develop and test libraries in isolation</strong> while keeping projects modular.</li><li><strong>Substitute Maven dependencies</strong> with local projects for faster iteration.</li><li><strong>Reduce build times</strong> by working on specific parts independently.</li><li><strong>Enhance team collaboration</strong> while working as if everything is in a single workspace.</li></ul><p>Composite builds allow for <strong>better modularity</strong> by keeping related but separate projects independent while still enabling cross-project dependencies. (<a href="https://docs.gradle.org/current/userguide/composite_builds.html"><strong><em>Gradle Documentation</em></strong></a>)</p><p><strong>Project Structure</strong></p><p>Consider the following project structure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sw_csONkK1DWaEAhEzwyeg.png" /></figure><p>In this setup, an ecommerce-app and payment-gateway are developed independently but can be combined using a composite build.</p><h3>Including the Entire Payment Gateway in E-Commerce App</h3><p>Instead of publishing payment-gateway as an external dependency, we can include it directly in an ecommerce-app using a composite build.</p><h4>Step 1: Modify settings.gradle.kts in ecommerce-composite</h4><pre>rootProject.name = &quot;ecommerce-composite&quot;<br>includeBuild(&quot;ecommerce-app&quot;)<br>includeBuild(&quot;payment-gateway&quot;)</pre><p>This links ecommerce-app with payment-gateway, allowing them to work together seamlessly.</p><h4>Step 2: Declare Dependencies in ecommerce-app/app/build.gradle.kts</h4><pre>dependencies {<br>    implementation(&quot;com.payment:gateway-core:1.0&quot;)<br>    implementation(&quot;com.payment:gateway-services:1.0&quot;)<br>}</pre><h4>Step 3: Run the Composite Build</h4><pre>./gradlew ecommerce-app:app:run</pre><p>Gradle will use the local payment-gateway instead of fetching a remote version.</p><h3>Including Only the Payment Processing Module</h3><p>If only core payment processing is required, we can use <strong>dependency substitution</strong> instead of including the entire payment-gateway.</p><h4>Step 1: Modify settings.gradle.kts in ecommerce-composite</h4><pre>includeBuild(&quot;payment-gateway&quot;) {<br>    dependencySubstitution {<br>        substitute(module(&quot;com.payment:gateway-core&quot;)).using(project(&quot;:gateway-core&quot;))<br>    }<br>}</pre><h4>Step 2: Add Dependency in ecommerce-app/app/build.gradle.kts</h4><pre>dependencies {<br>    implementation(&quot;com.payment:gateway-core&quot;)<br>}</pre><h4>Step 3: Configure payment-gateway/settings.gradle.kts</h4><pre>rootProject.name = &quot;payment-gateway&quot;<br>include(&quot;:gateway-core&quot;)</pre><h4>Step 4: Run the Build</h4><p>Modify any file inside payment-gateway/gateway-core/src/main/kotlin, then rebuild:</p><pre>./gradlew build</pre><p>Now, ecommerce-app will automatically reflect changes made in gateway-core without requiring a new release.</p><h3>Ensuring Compatibility Before Integration</h3><p>Before linking projects, it’s crucial to check <strong>Android Gradle Plugin (AGP)</strong> and <strong>Kotlin versions</strong> to avoid compatibility issues.</p><h4>Check AGP Version</h4><p>Ensure that both projects use the same AGP version.</p><p>Using gradle/libs.versions.toml:</p><pre>[versions]<br>agp = &quot;8.1.0&quot;</pre><p>Using build.gradle.kts:</p><pre>classpath(&quot;com.android.tools.build:gradle:8.1.0&quot;)</pre><h4>Check Kotlin Version</h4><p>Using gradle/libs.versions.toml:</p><pre>[versions]<br>kotlin = &quot;1.9.0&quot;</pre><p>Or in build.gradle.kts:</p><pre>plugins {<br>    kotlin(&quot;multiplatform&quot;) version &quot;1.9.0&quot;<br>}</pre><p>Ensuring consistent versions prevents build failures due to mismatches.</p><h3><strong>Managing Plugins in Composite Builds</strong></h3><p>If the payment-gateway includes <strong>custom Gradle plugins</strong>, add them in ecommerce-app/settings.gradle.kts:</p><pre>pluginManagement {<br>    includeBuild(&quot;../custom-logging-plugin&quot;)<br>}</pre><p>This allows Gradle to access the custom plugin without publishing it separately.</p><h3>Avoiding Naming Conflicts</h3><p>If multiple included builds have modules with the <strong>same name</strong>, rename one in settings.gradle.kts:</p><pre>includeBuild(&quot;payment-gateway&quot;) {<br>    name = &quot;alternative-payment&quot;<br>}</pre><p>This prevents dependency resolution issues.</p><h3>Composite Build Limitations</h3><p>While composite builds are useful, they have some limitations:</p><ul><li>They don’t support builds that publish <strong>custom configurations</strong>.</li><li>Running <strong>multiple composite builds in parallel</strong> can cause conflicts if they share included builds.</li></ul><h3>Conclusion</h3><p>Gradle composite builds help developers create <strong>modular, scalable, and maintainable</strong> projects. They make it easier to <strong>manage dependencies</strong> and <strong>improve the build process</strong>. Whether you’re integrating multiple builds or breaking down a large project, composite builds provide an efficient way to structure your workflow.</p><p><strong>Have you tried Gradle Composite Builds?</strong> Share your experience in the comments! 🚀</p><p>Thank you for reading! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5de667479c8d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Security Best Practices: Mitigating Common Vulnerabilities]]></title>
            <link>https://medium.com/@pethanalakshmis/android-security-best-practices-mitigating-common-vulnerabilities-7ec884526eb8?source=rss-11f4f33b85f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ec884526eb8</guid>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[android-security]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[encryption]]></category>
            <dc:creator><![CDATA[Pethanalakshmis]]></dc:creator>
            <pubDate>Thu, 13 Feb 2025 15:53:04 GMT</pubDate>
            <atom:updated>2025-02-13T16:38:50.827Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WnUnOx0sNsDkzdGMUJ2OHQ.png" /></figure><h3>Continuing from Part 1</h3><p>In<a href="https://medium.com/@pethanalakshmis/android-security-best-practices-owasp-top-11-official-guidelines-c8e006a8a3ab"> <strong>Part 1</strong></a>, we explored the <strong>OWASP Top 10</strong> security guidelines for Android apps. Now, let’s dive deeper into <strong>critical security risks</strong> that developers often overlook and discuss <strong>effective solutions</strong> with Kotlin examples to mitigate them.</p><h3>1. Vulnerable Encryption Mode (CBC with PKCS5/PKCS7 Padding)</h3><h3>Problem</h3><p>Using <strong>CBC mode</strong> with <strong>PKCS5/PKCS7 padding</strong> makes encryption <strong>prone to padding oracle attacks</strong>.</p><h3>Solution</h3><p>Use <strong>AES-GCM</strong> mode instead of CBC. <strong>AES-GCM provides authenticated encryption</strong>, preventing padding oracle attacks.</p><h3>Secure Implementation</h3><pre>import javax.crypto.Cipher<br>import javax.crypto.KeyGenerator<br>import javax.crypto.spec.GCMParameterSpec<br>import javax.crypto.spec.SecretKeySpec<br>import java.util.Base64<br><br>fun encryptData(plainText: String, secretKey: ByteArray): String {<br>    val cipher = Cipher.getInstance(&quot;AES/GCM/NoPadding&quot;)<br>    val secretKeySpec = SecretKeySpec(secretKey, &quot;AES&quot;)<br>    val iv = ByteArray(12).apply { java.security.SecureRandom().nextBytes(this) }<br>    val gcmSpec = GCMParameterSpec(128, iv)<br><br>    cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec, gcmSpec)<br>    val encryptedData = cipher.doFinal(plainText.toByteArray())<br><br>    return Base64.getEncoder().encodeToString(iv + encryptedData)<br>}</pre><h3>2. Weak Hashing Algorithms (MD5 &amp; SHA-1)</h3><h3>Problem</h3><p><strong>MD5 and SHA-1</strong> are known to have <strong>hash collisions</strong>, making them <strong>insecure</strong> for cryptographic purposes.</p><h3>Solution</h3><p>Use <strong>SHA-256</strong> or stronger hashing algorithms.</p><h3>Secure Implementation</h3><pre>import java.security.MessageDigest<br><br>fun hashData(data: String): String {<br>    val bytes = MessageDigest.getInstance(&quot;SHA-256&quot;).digest(data.toByteArray())<br>    return bytes.joinToString(&quot;&quot;) { &quot;%02x&quot;.format(it) }<br>}</pre><h3>3. Insecure Random Number Generation</h3><h3>Problem</h3><p>Using Random() or improperly using SecureRandom can lead to <strong>predictable numbers</strong>, making cryptographic operations insecure.</p><h3>Solution</h3><p>Always use <strong>SecureRandom()</strong> for generating cryptographic keys, IVs, and session tokens.</p><h3>Secure Implementation</h3><pre>import java.security.SecureRandom<br><br>fun generateSecureRandomBytes(): ByteArray {<br>    val random = SecureRandom()<br>    return ByteArray(16).apply { random.nextBytes(this) }<br>}</pre><h3>4. Storing Sensitive Data Insecurely</h3><h3>Problem</h3><p>Storing sensitive data in <strong>external storage</strong> can make it <strong>accessible to other applications</strong>. Similarly, keeping it unencrypted in the <strong>app directory</strong> can expose it to security risks.</p><h3>Solution</h3><p>Use <strong>internal storage</strong> whenever possible and <strong>encrypt sensitive data</strong> before storing it.</p><h3>Secure Implementation</h3><pre>val encryptedData = encryptData(&quot;Sensitive Information&quot;, secretKey)<br>File(context.filesDir, &quot;secure_data.txt&quot;).writeText(encryptedData) // Secure internal storage</pre><h3>5. Writing Sensitive Data to Temporary Files</h3><h3>Problem</h3><p><strong>Temporary files</strong> can be accessed by <strong>malicious apps</strong>, leading to <strong>data leakage</strong>.</p><h3>Solution</h3><p>Avoid writing <strong>sensitive data</strong> to <strong>temporary files</strong>, or <strong>encrypt the data</strong> before writing it.</p><h3>Secure Implementation</h3><pre>val tempFile = File.createTempFile(&quot;secure&quot;, null, context.cacheDir)<br>tempFile.writeText(&quot;Encrypted data&quot;)</pre><h3>6. Copying Sensitive Data to Clipboard</h3><h3>Problem</h3><p>The <strong>clipboard</strong> is accessible to <strong>all applications</strong>, making <strong>copied sensitive data vulnerable</strong>.</p><h3>Solution</h3><p>Avoid copying <strong>sensitive data</strong> to the clipboard or <strong>clear it after use</strong>.</p><h3>Secure Implementation</h3><pre>val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager<br>clipboard.setPrimaryClip(ClipData.newPlainText(&quot;&quot;, &quot;&quot;)) // Clear clipboard</pre><h3>Final Thoughts</h3><p>By following these security best practices, developers can:</p><p>✅ Prevent <strong>cryptographic vulnerabilities</strong><br>✅ Secure <strong>stored and transmitted data</strong><br>✅ Minimize <strong>attack vectors</strong><br>✅ Enhance <strong>overall app security</strong></p><p>What security measures do you prioritize in your Android apps? Let’s discuss in the comments! ⬇️</p><p><strong>Thank you for reading! </strong>If you found this helpful, don’t forget to <strong>clap 👏, share, and follow</strong> for more insights on <strong>Android Security, Jetpack Compose, Kotlin, Performance Optimization, and Best Practices!</strong></p><p>Let’s build <strong>faster, safer, and more innovative</strong> Android apps together! 💡📱 #AndroidDev #Kotlin #JetpackCompose #MobileSecurity</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ec884526eb8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android Security Best Practices: OWASP Top 10 & Official Guidelines]]></title>
            <link>https://medium.com/@pethanalakshmis/android-security-best-practices-owasp-top-11-official-guidelines-c8e006a8a3ab?source=rss-11f4f33b85f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8e006a8a3ab</guid>
            <category><![CDATA[android-security]]></category>
            <category><![CDATA[kotlin-development]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[mobile-app-security]]></category>
            <category><![CDATA[owasp-top-10]]></category>
            <dc:creator><![CDATA[Pethanalakshmis]]></dc:creator>
            <pubDate>Thu, 06 Feb 2025 16:23:02 GMT</pubDate>
            <atom:updated>2025-02-07T05:28:52.932Z</atom:updated>
            <content:encoded><![CDATA[<p>📢 <strong>Are you developing an Android app?</strong> If so, <strong>security must be your top priority</strong>! Android applications store <strong>sensitive user data, financial transactions, and personal information</strong>, making them prime targets for cyber threats.</p><p>This guide <strong>combines</strong>:<br>✅ <strong>Android Official Developer Guidelines<br></strong>✅ <strong>OWASP Mobile Top 10 Security Risks<br></strong>✅ <strong>Best Security Practices (SQLCipher, Room, OAuth, WebView Security, etc.)</strong></p><p>Let’s <strong>secure your Android app</strong> step by step! 🚀</p><h3>1. Secure Application Components</h3><p><em>💡 “Set exported=false for components that should not be accessed by other apps.”</em></p><h4>Why Is This Important?</h4><ul><li>If <strong>activities, services, or receivers</strong> are <strong>exported</strong> without restrictions, <strong>malicious apps</strong> can access them and exploit their functionalities.</li></ul><h4>How to Fix It?</h4><p>✅ <strong>Set android:exported=”false” for private activities, services, and receivers.</strong></p><p><strong>AndroidManifest.xml</strong>:</p><pre>&lt;activity android:name=&quot;.SecureActivity&quot;<br>  android:exported=&quot;false&quot; /&gt; &lt;! - Prevent external access →<br>&lt;service android:name=&quot;.SecureService&quot;<br>  android:exported=&quot;false&quot; /&gt;<br>&lt;receiver android:name=&quot;.SecureReceiver&quot;<br>  android:exported=&quot;false&quot; /&gt;</pre><p>✅ <strong>Use Intent Filters Only for Components That Should Be Public.<br></strong>✅ <strong>Use Signature-level Permissions</strong> for inter-app communication.</p><h3>2. Secure Data Storage</h3><p><em>💡 “Avoid storing sensitive data on the device unless absolutely necessary.”</em></p><h4>Why Is This Important?</h4><ul><li>Attackers can access unencrypted files, databases, or <strong>SharedPreferences</strong>.</li><li>Rooted devices allow hackers to extract stored data easily.</li></ul><h4>How to Fix It?</h4><p>✅ Use <strong>EncryptedSharedPreferences</strong> instead of regular SharedPreferences.<br>✅ Store cryptographic keys securely using <strong>Android Keystore</strong>.<br>✅ <strong>Encrypt databases using SQLCipher with Room</strong> instead of plain SQLite.</p><h3>Secure Room Database with SQLCipher</h3><p><strong>Room Database</strong> allows developers to interact with SQLite databases in a more secure and structured manner. By integrating <strong>SQLCipher</strong>, we can encrypt the database to prevent unauthorized access.</p><p><strong>Step 1: Add Dependencies to build.gradle</strong></p><pre>dependencies {<br>  implementation &#39;androidx.room:room-runtime:2.4.0&#39;<br>  kapt &#39;androidx.room:room-compiler:2.4.0&#39;<br>  // SQLCipher dependency for Room<br>  implementation &#39;net.zetetic:android-database-sqlcipher:4.5.3&#39;<br>}</pre><p><strong>Step 2: Create Your Room Database</strong></p><p>Here’s how you can set up a Room<strong> Database</strong> with <strong>SQLCipher</strong> for encrypted storage.</p><pre>import android.content.Context;<br>import androidx.room.Database;<br>import androidx.room.Room;<br>import androidx.room.RoomDatabase;<br>import net.sqlcipher.database.SQLiteDatabase;<br>import net.sqlcipher.database.SupportFactory;<br>import java.nio.charset.StandardCharsets;<br><br>@Database(entities = {User.class}, version = 1, exportSchema = false)<br>public abstract class SecureDatabase extends RoomDatabase {<br>    public abstract UserDao userDao();<br><br>    private static volatile SecureDatabase INSTANCE;<br><br>    public static SecureDatabase getInstance(Context context) {<br>        if (INSTANCE == null) {<br>            synchronized (SecureDatabase.class) {<br>                if (INSTANCE == null) {<br>                    // Use a secure key to encrypt the database<br>                    byte[] passphrase = SQLiteDatabase.getBytes(&quot;YourStrongPassword&quot;.toCharArray());<br>                    SupportFactory factory = new SupportFactory(passphrase);<br><br>                    INSTANCE = Room.databaseBuilder(context.getApplicationContext(),<br>                                    SecureDatabase.class, &quot;secure_database.db&quot;)<br>                            .openHelperFactory(factory)  // Set SQLCipher as database factory<br>                            .fallbackToDestructiveMigration() // Handle migration<br>                            .build();<br>                }<br>            }<br>        }<br>        return INSTANCE;<br>    }<br>}</pre><p>In this setup, the <strong>Room Database</strong> is integrated with <strong>SQLCipher</strong> to ensure the SQLite database is encrypted with a secure password. This way, even if the database file is extracted, it cannot be read without the correct password.</p><h3>3. Secure Network Communication</h3><p><em>💡 “Use HTTPS and TLS to encrypt all communications.”</em></p><h4>Why Is This Important?</h4><ul><li><strong>Man-in-the-middle (MITM) attacks</strong> occur when data is sent over HTTP.</li><li>Fake SSL certificates can trick users into <strong>connecting to malicious servers</strong>.</li></ul><h4>How to Fix It?</h4><p>✅ <strong>Enforce HTTPS</strong> with <strong>Network Security Configuration</strong>.<br>✅ Implement <strong>SSL Pinning</strong> to prevent fake certificates.</p><pre>&lt;network-security-config&gt;<br>  &lt;domain-config cleartextTrafficPermitted=&quot;false&quot;&gt;<br>    &lt;domain includeSubdomains=&quot;true&quot;&gt;example.com&lt;/domain&gt;<br>    &lt;pin-set&gt;<br>      &lt;pin digest=&quot;SHA-256&gt;your_public_key&lt;/pin&gt;<br>    &lt;/pin-set&gt;<br>  &lt;/domain-config&gt;<br>&lt;/network-security-config&gt;</pre><p>Add this to <strong>AndroidManifest.xml</strong>:</p><pre>&lt;application android:networkSecurityConfig=&quot;@xml/network_security_config&quot; /&gt;</pre><p>✅ Now, your app will only communicate via<strong> HTTPS!</strong></p><h3>4. Strong Authentication &amp; Authorization</h3><p><em>💡 “Use Firebase Authentication or OAuth 2.0 for secure login.”</em></p><h4>Why Is This Important?</h4><ul><li><strong>Weak authentication</strong> allows attackers to <strong>bypass login screens</strong>.</li><li><strong>Broken authorization</strong> lets hackers access <strong>admin-level features</strong>.</li></ul><h4>How to Fix It?</h4><p>✅ Use <strong>OAuth 2.0 &amp; OpenID Connect</strong> for secure authentication.<br>✅ Implement <strong>biometric authentication</strong> for added security.</p><pre>val biometricPrompt = BiometricPrompt(this,<br>  executor,<br>  object : BiometricPrompt.AuthenticationCallback() {<br>  // Handle authentication success/failure<br> }<br>)<br>val promptInfo = BiometricPrompt.PromptInfo.Builder()<br>  .setTitle(&quot;Biometric login for my app&quot;)<br>  .setNegativeButtonText(&quot;Use password&quot;)<br>  .build()<br>biometricPrompt.authenticate(promptInfo)</pre><p>✅ <strong>Always validate user roles on the server-side!</strong></p><h3>5. Prevent Reverse Engineering &amp; Code Tampering</h3><p><em>💡 “Use code obfuscation and Play Integrity API.”</em></p><h4>Why Is This Important?</h4><ul><li>Attackers can <strong>decompile APKs</strong> to steal sensitive information.</li><li>Malicious versions of your app can be created and distributed.</li></ul><h4>How to Fix It?</h4><p>✅ Enable <strong>ProGuard or R8</strong> to obfuscate code.<br>✅ Use <strong>Google Play Integrity API</strong> to detect tampering.</p><pre># Enable ProGuard<br>-keep class com.example.model.** { *; }<br>-assumenosideeffects class android.util.Log //remove logging code<br>{<br>  public static boolean isLoggable(java.lang.String, int)<br>  public static boolean int v(…)<br>  public static boolean int i(…)<br>  public static boolean int w(…)<br>  public static boolean int d(…)<br>  public static boolean int e(…)<br>}</pre><p>✅ <strong>Move sensitive logic to the backend.</strong></p><h3>6. Secure API Calls &amp; Prevent Injection Attacks</h3><p><em>💡 “Never trust user input. Use parameterised queries.”</em></p><h4>Why Is This Important?</h4><ul><li><strong>SQL injection</strong> lets attackers modify your database.</li><li><strong>Hardcoded API keys</strong> can be stolen if an APK is reverse-engineered.</li></ul><h4>How to Fix It?</h4><p>✅ <strong>Use Room Database</strong> or <strong>parameterized queries</strong> to prevent SQL injection (Avoid raw SQL!).</p><p><strong>Room Database Example</strong>:</p><pre>@Query(&quot;SELECT * FROM users WHERE username = :username AND password = :password&quot;)<br>List&lt;User&gt; getUser(String username, String password);</pre><p>✅ <strong>Store API keys securely</strong> (not in code).</p><h3>7. Secure External Libraries &amp; Dependencies</h3><p><em>💡 “Keep dependencies updated to prevent known vulnerabilities.”</em></p><h4>Why Is This Important?</h4><ul><li><strong>Outdated libraries</strong> may contain security holes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7iuDUEKSFp7bdXQzjy_Fgg.png" /></figure><h4>How to Fix It?</h4><p>✅ <strong>Always keep libraries updated</strong> to the latest versions.<br>✅ Regularly check for <strong>vulnerabilities in your dependencies</strong> using tools like <strong>OWASP Dependency-Check</strong>.</p><h3>8. Secure WebView</h3><p><em>💡 “Disable JavaScript in WebView unless required.”</em></p><h4>Why Is This Important?</h4><ul><li><strong>JavaScript injection</strong> can allow malicious actors to steal user data.</li><li><strong>Phishing attacks</strong> and redirects can occur if not properly secured.</li></ul><h4>How to Fix It?</h4><p>✅ <strong>Disable JavaScript</strong> in WebViews unless absolutely necessary.<br>✅ Use a <strong>secure WebView client</strong> to restrict access to trusted domains only.<br>✅ <strong>Prevent file access</strong> to avoid unauthorized access.</p><pre>webView.settings.apply {<br>  javaScriptEnabled = false<br>  allowFileAccess = false<br>  allowContentAccess = false<br>} // Disable JavaScript<br>webView.webViewClient = object : WebViewClient() {<br>override fun shouldOverrideUrlLoading(view: WebView?, request: WebResourceRequest?): Boolean {<br>    return false // Prevent navigation to untrusted sites<br>  }<br>}</pre><p>✅ <strong>Implement secure browsing practices</strong> (e.g., restrict external links).</p><h3>9. Secure Intents</h3><p>💡<em> “Be cautious when handling intents and never pass sensitive data in them.”</em></p><h4>Why Is This Important?</h4><ul><li><strong>Intent hijacking</strong> and <strong>data leakage</strong> occur when you pass sensitive information between activities.</li><li>Untrusted apps can intercept intents and steal data.</li></ul><h4>How to Fix It?</h4><p>✅ <strong>Set Intent flags</strong> for secure data transfer.<br>✅ Use <strong>Intent filtering</strong> to ensure only trusted apps can receive your Intents.</p><pre>val intent = Intent(this, SecondActivity::class.java)<br>intent.putExtra(&quot;secure_data&quot;, &quot;value&quot;)<br>startActivity(intent)</pre><p>✅ <strong>Use PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_SECURE </strong>to prevent modification.</p><pre>val pendingIntent = PendingIntent.getActivity(<br>  context,<br>  0,<br>  intent,<br>  PendingIntent.FLAG_IMMUTABLE<br>)</pre><h3>10. Perform Regular Security Testing &amp; Audits</h3><p>💡 <em>“Use security scanners and penetration testing.”</em></p><h4>Why Is This Important?</h4><ul><li>Many security flaws are <strong>only discovered during testing</strong>.</li></ul><h3>How to Fix It?</h3><p>✅ Use <strong>MobSF (Mobile Security Framework)</strong> for <strong>static &amp; dynamic analysis</strong>.<br>✅ Perform <strong>penetration testing</strong> to identify vulnerabilities.</p><h3>Conclusion</h3><p>Building a secure Android app <strong>is not optional — it’s essential.</strong> By following <strong>Android security guidelines</strong>, implementing <strong>OWASP’s best practices</strong>, and performing <strong>regular security audits</strong>, you can <strong>protect user data</strong> and <strong>prevent cyber threats</strong>.</p><p>📢 <strong>Security is an ongoing process!</strong> Always keep learning, updating, and testing your app.</p><p>💬 <strong>What security measures do you use in your Android apps?</strong> Let’s discuss in the comments!</p><p>🔔 <strong>If you found this helpful, don’t forget to clap 👏, share, and follow for more Android security insights!</strong> 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8e006a8a3ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>