<?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 Akqeel on Medium]]></title>
        <description><![CDATA[Stories by Akqeel on Medium]]></description>
        <link>https://medium.com/@akqeel?source=rss-a2e96edfe06------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*fhD3GwIo0SEKjTHvLl3SHA.jpeg</url>
            <title>Stories by Akqeel on Medium</title>
            <link>https://medium.com/@akqeel?source=rss-a2e96edfe06------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 09:51:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akqeel/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[IoT + Android: Implementing Communication Channels Over BLE]]></title>
            <link>https://medium.com/@akqeel/iot-android-implementing-communication-channels-over-ble-df058645905c?source=rss-a2e96edfe06------2</link>
            <guid isPermaLink="false">https://medium.com/p/df058645905c</guid>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Akqeel]]></dc:creator>
            <pubDate>Sun, 23 Aug 2026 18:24:26 GMT</pubDate>
            <atom:updated>2026-08-23T18:24:26.106Z</atom:updated>
            <content:encoded><![CDATA[<h4>A Technical Overview into the world of Low-Energy Bluetooth</h4><p>With all the turns my career as a mobile engineer has taken me, I have now found myself sitting in the middle of an IoT consumer device, an android app and a remote backend system. This has been an interesting role, filled with learning opportunities, and a refreshing change from what I’d usually expect to see in mobile app development space — mobile apps being the primary interface for consumers and the remote backend system driving the business technically. The contrast — the mobile app here acts as a bridge/proxy between the consumer IoT device and the remote backend, the IoT device being the primary interface of the product and the backend driving the business technically.</p><blockquote>What I Expected: Kotlin, Jetpack Compose, MVVM, Retrofit, Room, and other Android related frameworks and libraries</blockquote><blockquote>What I Inherited: BLE GATT, OTA firmware updates, and a lot of back-and-forth between binary, decimal and hex</blockquote><p>The Android stack still exists, but this experience exposed me to a new application layer — Low Energy Bluetooth, or BLE, for short. On one side, the android app communicates via HTTP/S over the network with the remote backend and on the other the mobile app communicates with the IoT device over the <a href="https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-54/out/en/host/attribute-protocol--att-.html">BLE ATT (Attribute Protocol)</a>, syncing data across both ends.</p><h4>Why is the mobile app necessary?</h4><p>In most cases, IoT devices are largely restricted in terms of technical capabilities. Weak processing power, low volatile memory, minimal disk storage, and usually no networking capabilities (cellular/WiFi). Mobile apps, on the other hand, provide just enough technical capabilities to bridge the IoT device with a remote server. Smartphones are also readily available in the hands of IoT consumers in today’s world, making mobile apps a great choice for implementing this bridge. Mobile apps are also then in a position to provide further value to IoT consumers by exposing vital information about their IoT device/usage (such as telemetry, diagnosis, etc) and over-the-air (OTA) updates.</p><h4>Coming back to the world of BLE</h4><p>Reviewing the codebase for the first time, there were several technical terms I had to get myself familiar with (BLE GATT, Profiles, Services, Characteristics, etc). In addition, I found myself passing around raw byte and shifting between bases (binary, decimal and hex) necessary for the communication between the IoT device and the mobile app.</p><p><a href="https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-54/out/en/host/generic-attribute-profile--gatt-.html"><strong>Generic Attribute (GATT) Profiles</strong></a><strong> </strong>designed around the ATT protocol exposes communication channels to the IoT devices in the form of Services and Characteristics. A Profile is composed of one or more Services, <a href="https://www.bluetooth.com/wp-content/uploads/Files/Specification/HTML/Core-54/out/en/host/generic-attribute-profile--gatt-.html">collections of data and associated behaviours to accomplish a particular function or feature</a>. Each Service exposes a list of readable/writable Characteristics that is used by the client (in this case the mobile app) to communicate with the Service.</p><pre>For example: Heart Rate Profile (HRP)<br><br>Service: Heart Rate Service<br>Characteristics: Heart Rate Measurement, Body Sensor Location<br>Use case: Fitness trackers, Smartwatches</pre><p><a href="https://developer.android.com/develop/connectivity/bluetooth"><strong>The Android Bluetooth Documentation</strong></a><strong> </strong>provides detailed information on the BLE APIs available within the Android framework. The <a href="https://developer.android.com/reference/android/bluetooth/BluetoothAdapter">BluetoothAdapter</a> provides the top level interface for <a href="https://developer.android.com/develop/connectivity/bluetooth/ble/find-ble-devices">discovering</a>, and bonding with devices. This is done with the support of <a href="https://developer.android.com/reference/android/bluetooth/le/BluetoothLeScanner">BluetoothLeScanner</a> and <a href="https://developer.android.com/reference/android/bluetooth/le/ScanCallback">ScanCallback</a>. A successful scanned result will contain a <a href="https://developer.android.com/reference/android/bluetooth/BluetoothDevice">BluetoothDevice</a> which can then be communicated with via the <a href="https://developer.android.com/reference/android/bluetooth/BluetoothGatt">BluetoothGatt</a> once connected. Communication is asynchronous, with both direct request/response cycles and streaming capabilities, although the communication style is usually dictated by the GATT Profile on the IoT device/vendor.</p><p><strong>Over-The-Air Firmware Updates </strong>This is one of the most interesting, and challenging implementations I’ve worked with so far, mainly due to the binary transfer and flashing complexity, asynchronous communication limitations, high frequency communication due to chunking (tens of thousands of requests per session depending on the chunk size) and raw bytes being passed around end-to-end. The firmware bundle may consist of multiple packages, each package is transferred over the air onto a specified storage space on the device and flashed. The process is repeated until all packages are successfully transferred and flashed. Concepts such as Cyclic Redundancy Check (CRC), File Size checks, etc. can be used to verify successful file transfer / ensure no packet loss during transfer. However, these are generic concepts / standards and the exact implementation can be vendor specific.</p><h4><strong>Limitations</strong></h4><p>Working with BLE communication may not always be straightforward, and debugging from a mobile engineers point-of-view may be limited. Having documentation on the vendor GATT server profile and a good understanding on the general BLE stack is a must have, in my opinion, in order to confidently work with these systems. BLE communication is also limited, in terms of payload capacity, request-response wait times, blocked cycles, proximity etc. When implementing use cases that require request-response in bursts (such as OTA) care must be taken to ensure request-response cycles are synced (mutex) to prevent lost/rejected packets and maintain proper transfer/installation sequence. Request-response wait times also negatively impact user experience, similar to HTTP/S communication, and care must be taken to mitigate this effect.</p><p>If you are someone planning on working with BLE on Mobile/IoT, or just curious to learn more about these systems, I hope you found this post useful. For a deep dive into the technical details, I recommend looking at the official documentation referenced in this post. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df058645905c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android App Development: Claude Code + Android CLI]]></title>
            <link>https://medium.com/@akqeel/android-app-development-setting-up-a-claude-code-android-cli-workflow-b881c93521af?source=rss-a2e96edfe06------2</link>
            <guid isPermaLink="false">https://medium.com/p/b881c93521af</guid>
            <category><![CDATA[android-development]]></category>
            <dc:creator><![CDATA[Akqeel]]></dc:creator>
            <pubDate>Sun, 23 Aug 2026 18:04:09 GMT</pubDate>
            <atom:updated>2026-08-23T18:12:38.083Z</atom:updated>
            <content:encoded><![CDATA[<h4>A simple agentic coding setup</h4><p>With the recent announcement of Android CLI, I was interested in trying out this development workflow with Claude Code. In this post I’m sharing my experience running this setup and, if you are an android developer like me, hope this helps you get started as well.</p><h4><strong>Android Tooling</strong></h4><p>This is the most common setup almost all android devs have in their work environments. Tooling includes the Android Studio IDE, Emulators or physical devices, the Gradle build system, and the Android SDK.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OytmYdHpCngUohAmcoaWnw.png" /></figure><h4>Claude Code</h4><p>Next up is setting up Claude Code. For this you can refer the official Claude website <a href="https://claude.com/product/claude-code">here</a>. Once you are setup, fire up a terminal and enter in claude to start a Claude Code session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M7ipczYniX-fufrnwb5jrA.png" /></figure><h4>Android CLI</h4><p>Finally, install Android CLI following the official guide here<br><a href="https://developer.android.com/tools/agents/android-cli">https://developer.android.com/tools/agents/android-cli</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B3cavnW3Z-xMtq9uRpwumg.png" /></figure><h4>Bonus: Github Integration</h4><p>As a bonus, I also integrated with <a href="https://cli.github.com/">Github CLI</a> to manage my PRs via my Claude Code session.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DRvsC8T4BfM62y7Wtwk1eA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c4TazpQdMAoWF6UhC8aExw.png" /></figure><p>That’s it! With this setup in place I am now able to prompt changes and create pull requests on my remote repository through a Claude Code terminal session.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b881c93521af" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android App Development: Code Coverage Reports]]></title>
            <link>https://medium.com/@akqeel/android-app-development-code-coverage-reporting-0f493fb8572a?source=rss-a2e96edfe06------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f493fb8572a</guid>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Akqeel]]></dc:creator>
            <pubDate>Sat, 28 Mar 2026 08:15:11 GMT</pubDate>
            <atom:updated>2026-03-28T08:23:22.215Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post I’ll be sharing a simple code coverage pipeline I setup for my android codebase. Code coverage is a concept that measures how much of the source code was executed when tests are run. Although high code coverage does not guarantee good code quality (since the tests themselves may have bad assertions), low code coverage is a reliable indicator of how much of the code has been untested.</p><p>For this setup, I used <a href="https://github.com/Kotlin/kotlinx-kover">Kover</a> for coverage with <a href="https://www.codacy.com/">Codacy</a> for reporting integrated with a Github Actions workflow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IL6bTD9cWHl_hrWDDVVVaA.png" /><figcaption>Github Action workflow for generating and uploading Kover reports</figcaption></figure><p>The Github Action workflow executes the Gradle task :koverXmlReport to generate the report, and uploads it to Codacy.</p><blockquote>Tip: I suggest generating the report and uploading manually via curl first, to confirm your Codacy project has been setup correctly and can successfully receive and display reports, before setting up the Github Actions workflow.</blockquote><pre># Generate only the shared module coverage report (tests for use cases live here).<br>      - name: Generate Kover XML Report (shared only)<br>        run: ./gradlew :shared:koverXmlReport --no-daemon<br><br># Also upload via CLI with the correct prefix so Codacy can map paths<br># like com/aksoft/... to shared/src/commonMain/kotlin/com/aksoft/....<br>      - name: Upload coverage with path prefix (shared)<br>        run: |<br>          bash &lt;(curl -Ls https://coverage.codacy.com/get.sh) report \<br>            -t ${{ secrets.CODACY_PROJECT_TOKEN }} \<br>            -l Kotlin \<br>            -r shared/build/reports/kover/report.xml \<br>            --prefix shared/src/commonMain/kotlin/</pre><p>To learn more about setting up Codacy with your Github repo, you can checkout the docs <a href="https://docs.codacy.com/">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6UvtUcz4Dp61gRG17dTJLg.png" /><figcaption>Snapshot of the coverage report on Codacy (for the initial run)</figcaption></figure><p>That’s it. With a code coverage reporting pipeline setup, I can now continuously measure how much of my codebase is covered by tests as code is being shipped.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f493fb8572a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[twentyfour: Building Intelligent Insights]]></title>
            <link>https://medium.com/@akqeel/twentyfour-building-intelligent-insights-43dd79c2fd72?source=rss-a2e96edfe06------2</link>
            <guid isPermaLink="false">https://medium.com/p/43dd79c2fd72</guid>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Akqeel]]></dc:creator>
            <pubDate>Sun, 25 Jan 2026 04:49:31 GMT</pubDate>
            <atom:updated>2026-01-25T04:49:31.211Z</atom:updated>
            <content:encoded><![CDATA[<h4>a product of Aksoft Studios [aksoftstudios@gmail.com]</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wl0Rdi5JwQHKcFCp6ARrBg.png" /></figure><p><em>This article is from a series of articles on the ongoing improvements I am making on twentyfour. If you are curious to know more, checkout my previous article </em><a href="https://medium.com/@akqeel/twentyfour-your-lifestyle-productivity-planner-798d2a37e993"><em>here</em></a>.</p><p>With the implementation for scheduling and completing routines in place, the next iteration was to provide users with intelligent insights on their routine progress. These insights could cover a wide range of behaviours, including delayed start times, delayed end times, skipped sessions and weekly trends. However, to keep the scope simple (since twentyfour still lacks a proper foundation for implementing intelligent feedback) I decided to focus on one insight while preparing the foundation for future intelligent insights capabilities alongside.</p><p>The feature I decided on was providing users with a one-tap routine re-scheduling for delayed routines over a 30-day period. Further insights such as weekly trends can then be derived from this.</p><blockquote>As a user, I want twentyfour to tell me when I am consistently starting routines late, and provide me with a one-tap suggestion to re-schedule my routine so that I start on time.</blockquote><p>With this decided, the next step was the system design. I considered several options including passing unprocessed data directly to a remote LLM service for suggestions, to skipping LLMs entirely and running <a href="https://github.com/akqeelnawas/machine-learning-intro">classical ML</a> or simple statistics locally.</p><p>My learnings from this exercise are as follows:</p><ul><li>LLMs are good at providing context on why routines are started late (due to external factors such as weather, exhaustion from too many routines, or clash in routines, etc.) provided the data is available.</li><li>LLMs are, however, not so good at running mathematical operations / statistics on unprocessed data in order to come to these conclusions.</li></ul><p>This led me to design the system in two layers:</p><ul><li>The first layer is to process the collected data (either locally or remotely) to reveal underlying patterns. This would tell if the collected data is sufficient to provide suggestions confidently.</li><li>The seconds layer (optional) is to then pass the processed data to a remote LLM service, given the first layer identified a pattern with high confidence. This would help tie meaningful explanations for the suggested change to the user in natural language.</li></ul><p>Finally, I needed a systematic method on implementing this feature end-to-end. For this I decided on the following approach:</p><ol><li>Data Collection</li><li>Analysis</li><li>Remote Services / LLMs</li><li>Feedback</li></ol><h3>1. Data Collection</h3><p>The first step in implementing this feature is identifying and structuring the data for collection. This is a crucial step and forms the foundation for the statistics and feedback mechanism required later. Just by looking at the expected outcome we can see that there are 2 key data points driving this feature: scheduled time and actual time .</p><p>By expanding on these data points, we can derive the following data structure:</p><pre>public data class RoutineMetrics(<br>  public val routine_id: Long,<br>  public val routine_name: String,<br>  public val day_id: Long,<br>  public val routine_start_time: Long,<br>  public val routine_end_time: Long,<br>  public val actual_start_time: Long,<br>  public val actual_end_time: Long,<br>  public val date_timestamp: Long,<br>)</pre><p>With this data structure defined, the next step is to implement the UI/UX for capturing this information. For this, I added the below user journeys when adding and completing a routine.</p><p>Collecting scheduled time when adding a routine to a day:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4MCQGBxuiHEQN52al1euqg.png" /><figcaption>Collecting scheduled time when adding a routine to a day</figcaption></figure><p>Collecting actual start time when completing a routine for the day:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HnZIx6kLAj6N5_tPzCP5ag.png" /></figure><p>With this I now have the data collection mechanism ready for the next stage.</p><h3>2. Analysis</h3><p>This is the core component driving this feature, where I personally had the most learning. Using the collected data I run a series of mathematical functions to understand the user’s routine start behaviour.</p><h4><strong>Summary: Total Records</strong></h4><p>This is a simple count of records collected during the specified timeframe. The more records available, the higher the confidence in suggestions.</p><h4>Summary: Date Range</h4><p>The timeframe of the data collection. Analysis over the past 2-weeks will require different advice vs past 12-months.</p><h4>Summary: Overall Confidence</h4><p>A confidence score (between 0 and 1) on the trustworthiness of this analysis, where a score of 0 = no trust and 1 = complete trust.</p><pre>// Factor 1: Sample size confidence (need ~30 for full confidence)<br>sampleConfidence = Math.min(1, totalRecords / 30)<br>// 10 / 30 = 0.33<br><br>// Factor 2: Consistency (low std deviation = high confidence)<br>consistencyFactor = 1 / (1 + (stdDeviation / Math.abs(meanDelay)))<br>// 1 / (1 + (7.8 / 25)) = 1 / 1.312 = 0.76<br><br>// Factor 3: Recency (is data fresh? last 30 days = 1.0)<br>daysSinceLastRecord = (today - lastTimestamp) / (24*60*60)<br>recencyFactor = Math.max(0, 1 - (daysSinceLastRecord / 30))<br>// If last record was yesterday: 1 - (1/30) = 0.97<br><br>// Combine all factors<br>overallConfidence = (sampleConfidence * 0.4) + <br>                    (consistencyFactor * 0.4) + <br>                    (recencyFactor * 0.2)<br>// (0.33 * 0.4) + (0.76 * 0.4) + (0.97 * 0.2) = 0.72</pre><h4>Delay Metrics: Mean Delay</h4><p>This is simply the average of the delays across the records under analysis.</p><h4>Delay Metrics: Median Delay</h4><p>This is the middle value of the records under analysis after sorting.</p><h4>Delay Metrics: Standard Deviation</h4><p>This tells us how spread out the delays are. In other words, this tells us by how much the delays vary relative to the average delay.</p><p>The difference between the average delay and the delay for each record is first calculated, then the squared summation of these differences and finally square root to get back the value in its original unit of measurement, in this case minutes.</p><pre>// Step 1: Find squared differences from mean<br>mean = 25<br>squaredDiffs = delays.map(d =&gt; Math.pow(d - mean, 2))<br>// [0, 25, 25, 100, 9, 225, 100, 9, 64, 169]<br><br>// Step 2: Average the squared differences (variance)<br>variance = squaredDiffs.reduce((sum, sq) =&gt; sum + sq, 0) / delays.length<br>// (0+25+25+100+9+225+100+9+64+169) / 10 = 726 / 10 = 72.6<br><br>// Step 3: Square root to get back to minutes<br>stdDeviation = Math.sqrt(variance)<br>// √72.6 = 8.5 ≈ 7.8<br>```<br><br>**What it means visually:**<br>```<br>Low stdDev (3 min):    ||||||||  ← Very predictable<br>Medium stdDev (8 min): |  ||  |  ← Somewhat variable  <br>High stdDev (20 min):  |    |  | ← Very inconsistent<br>                       10  25  40 minutes late</pre><h4>Delay Metrics: Min Delay and Max Delay</h4><p>The best and worst case delays from the records under analysis.</p><h4>Delay Metrics: Consistency Score</h4><p>This tells us how predictable the pattern is in the form of a score between 0 and 1, where 0 = highly unpredictable to 1 = highly accurate.</p><p>The coefficient of variation is first calculated — the standard deviation divided by the average (mean) delay. The higher the standard deviation the higher the coefficient of variation.</p><p>Next, the coefficient of variation is transformed into a value in the range 0–1. The higher the coefficient of variation the lower the consistency score.</p><p>This means the standard deviation has an inverse relationship with the consistency score — the lower the standard deviation, the higher the consistency score.</p><pre>// Method 1: Inverse of coefficient of variation<br>coefficientOfVariation = stdDeviation / Math.abs(meanDelay)<br>// 7.8 / 25 = 0.312<br><br>consistencyScore = 1 / (1 + coefficientOfVariation)<br>// 1 / (1 + 0.312) = 1 / 1.312 = 0.76 ≈ 0.78</pre><h4>Recommendations: Suggested Adjustment</h4><p>This tells the user by how many minutes to shift the schedule for the routine.</p><pre>// For high consistency (predictable pattern)<br>if (consistencyScore &gt; 0.7) {<br>  // Use mean + 1 standard deviation (covers ~84% of cases)<br>  suggestedAdjustment = Math.round(meanDelay + (stdDeviation * 0.3))<br>  // 25 + (7.8 * 0.3) = 25 + 2.3 = 27.3 ≈ 28<br>} else {<br>  // For low consistency, be more conservative<br>  suggestedAdjustment = Math.round(medianDelay)<br>}</pre><p>For high consistency scores, adjust by the meanDelay + standard deviation * 0.3 This suggests a time closer to the original scheduled time (* 0.3) since it would be better to arrive earlier on most days than late.</p><p>For lower consistency scores (high standard deviation), simply suggest the meanDelay and ignore the standard deviation.</p><h4>Recommendations: Confidence in Suggestion</h4><p>This is a score between 0 and 1, where 0 = not confident in the suggestion and 1 = highly confident the schedule adjustment will work.</p><pre>const frequencyFactor = Math.min(1, frequency / 5)  // 7/5 = 1.0<br>confidenceInSuggestion = (<br>  overallConfidence * 0.4 +      // 0.72 * 0.4 = 0.288<br>  consistencyScore * 0.4 +        // 0.78 * 0.4 = 0.312<br>  frequencyFactor * 0.2           // 1.0 * 0.2 = 0.200<br>)<br>// 0.288 + 0.312 + 0.200 = 0.80 ≈ 0.78</pre><h4>Actionability</h4><p>With the above metrics, the key questions driving this feature can now be answered:</p><ul><li>Is this pattern real?<br>Confidence Score</li><li>By how many minutes should the schedule change?<br>Suggested Adjustment</li></ul><p>With this in place, I can now decide if the Insights page is to be shown or instead continue collecting more data every time the user completes a routine.</p><h3>3. Remote Service / LLMs</h3><p>For the remote service / LLM I used <a href="https://console.groq.com/">Groq</a> with my existing <a href="https://supabase.com/">Supabase</a> backend. On Groq, I define the system prompt to accept and respond with a predefined JSON structure that the mobile client can consume. Next, on Supabase I created a Edge Function that would delegate to Groq.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0sCNCI4eKaY3ZPA_QhmkWQ.png" /><figcaption>Using the Groq playground to get started.</figcaption></figure><p>On the mobile end, this is a simple request / response over the network to the Supabase backend.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9kj7Hpgo22NNI1wG-Px-Kw.png" /><figcaption>Edge function on Supabase.</figcaption></figure><h3>4. Feedback</h3><p>The final phase is prompting this feedback to the user. At the point of the user completing a routine, the data is processed locally to identify a pattern (I plan on moving this to the Supabase Edge Function next).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/594/1*rLFwgfFXscWhm-cgsaoyXw.png" /><figcaption>Completing a routine with the actual start and end times.</figcaption></figure><p>If a pattern is not identified / low confidence (&lt; 0.5), the data for this routine session is collected but no feedback is prompted to the user.</p><p>If a pattern is identified with mid to high confidence (≥ 0.5), the Supabase Edge Function is requested for an explanation from Groq. Once this response is received, the user is prompted with the feedback for a one-tap adjustment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*d_FiNa79Y7W1gaur_Wzzbw.png" /><figcaption>Re-schedule suggestion prompted to the user with the option to one-tap apply.</figcaption></figure><p>With this foundation in place, <a href="https://medium.com/@akqeel/twentyfour-your-lifestyle-productivity-planner-798d2a37e993">twentyfour</a> is now ready to be integrated with more intelligent insights. Hope you found this post useful, stay tuned for more updates!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43dd79c2fd72" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android App Development: Kotlin Build Reports]]></title>
            <link>https://medium.com/@akqeel/android-app-development-kotlin-build-reports-f7be56983b76?source=rss-a2e96edfe06------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7be56983b76</guid>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Akqeel]]></dc:creator>
            <pubDate>Sat, 22 Nov 2025 06:57:46 GMT</pubDate>
            <atom:updated>2025-11-22T06:57:46.836Z</atom:updated>
            <content:encoded><![CDATA[<p>Slow build times? Need a way to measure your current compilation times? And a way to benchmark your build time performance improvements? Kotlin 1.7.0 introduced a <a href="https://blog.jetbrains.com/kotlin/2022/06/introducing-kotlin-build-reports/">build reporting mechanism</a> that developers can enable to generate compilation performance reports for their builds.</p><p>For more details on how you can enable this in your codebase, you can refer <a href="https://blog.jetbrains.com/kotlin/2022/06/introducing-kotlin-build-reports/">https://blog.jetbrains.com/kotlin/2022/06/introducing-kotlin-build-reports/</a>.</p><p>The text based reports generated contained several different metrics, and on a any given day I could be generating at least 15–20 (or even more) of these reports. At the moment, I just needed a way to quickly compare the total wait times for my builds. However, manually comparing this metric between these reports was tedious. To simplify this, I created a simple web dashboard (using LLM, of course!).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1T04W-b4aseYmCViXBL7iw.png" /><figcaption>A simple dashboard for to measure my build times</figcaption></figure><p>For rendering this dashboard, I generated a simple node script that can parse the text files, extract the relevant key-values and write them into a JSON. The webpage could then read this JSON to render the graph.</p><pre>#!/usr/bin/env node<br><br>/**<br> * Script to scan Kotlin build reports and generate data.json<br> * Run this script whenever new build reports are generated:<br> * node generate-data.js<br> */<br><br>const fs = require(&#39;fs&#39;);<br>const path = require(&#39;path&#39;);<br><br>const BUILD_REPORTS_DIR = path.resolve(__dirname, &#39;..&#39;, &#39;build&#39;, &#39;reports&#39;, &#39;kotlin-build&#39;);<br>const OUTPUT_FILE = path.join(__dirname, &#39;kotlin-build-time-data.json&#39;);<br><br>function extractBuildData() {<br>    const buildData = [];<br><br>    // Read all .txt files in the directory<br>    const files = fs.readdirSync(BUILD_REPORTS_DIR)<br>        .filter(file =&gt; file.endsWith(&#39;.txt&#39;) &amp;&amp; file.startsWith(&#39;My-Project-Name-build-&#39;))<br>        .sort();<br><br>    console.log(`Found ${files.length} build report files`);<br><br>    files.forEach(filename =&gt; {<br>        const filePath = path.join(BUILD_REPORTS_DIR, filename);<br>        const content = fs.readFileSync(filePath, &#39;utf8&#39;);<br><br>        // Extract timestamp from filename: &quot;My-Project-Name-build-2025-11-21-11-19-52.txt&quot;<br>        const match = filename.match(/(\d{4}-\d{2}-\d{2}-\d{2}-\d{2}-\d{2})/);<br>        if (!match) {<br>            console.warn(`Could not extract timestamp from: ${filename}`);<br>            return;<br>        }<br><br>        const timestampStr = match[1];<br>        const timestamp = timestampStr.replace(/-(\d{2})-(\d{2})-(\d{2})$/, &#39; $1:$2:$3&#39;);<br><br>        // Extract &quot;Total Gradle task time&quot; from content<br>        const timeMatch = content.match(/Total Gradle task time:\s+([\d.]+)\s+s/);<br>        const time = timeMatch ? parseFloat(timeMatch[1]) : 0;<br><br>        buildData.push({<br>            filename,<br>            timestamp,<br>            time<br>        });<br>    });<br><br>    // Sort by timestamp<br>    buildData.sort((a, b) =&gt; new Date(a.timestamp) - new Date(b.timestamp));<br><br>    // Write to JSON file<br>    const output = {<br>        generatedAt: new Date().toISOString(),<br>        totalBuilds: buildData.length,<br>        builds: buildData<br>    };<br><br>    fs.writeFileSync(OUTPUT_FILE, JSON.stringify(output, null, 2));<br>    console.log(`✅ Generated ${OUTPUT_FILE}`);<br>    console.log(`   Total builds: ${buildData.length}`);<br><br>    return output;<br>}<br><br>// Run the script<br>try {<br>    extractBuildData();<br>} catch (error) {<br>    console.error(&#39;❌ Error generating build data:&#39;, error);<br>    process.exit(1);<br>}</pre><p>However, I’d need to execute this script after each build to keep the dashboard up-to-date. This again is another tedious step. To automate this I hooked the node script execution command into the Gradle build pipeline.</p><pre>// app/build.gradle<br><br>tasks.register(&#39;generateKotlinBuildTimeJson&#39;, Exec) {<br>    commandLine &#39;/usr/local/bin/node&#39;, &#39;../reports/generate-kotlin-build-time-data.js&#39;<br>}<br><br>gradle.buildFinished {<br>    tasks.named(&#39;generateKotlinBuildTimeJson&#39;).get().exec()<br>}</pre><p>The script should be executed only <strong>after </strong>the report is generated. Therefore, I hook into the buildFinished Gradle lifecycle. However, do note that the buildFinished lifecycle is deprecated since <a href="https://docs.gradle.org/7.4/userguide/upgrading_version_7.html#changes_7.4">Gradle 7.4 and will be removed in Gradle 8.0</a>.</p><p>That’s it! I now have a simple build compilation time series dashboard for faster comparison between builds. Hope you found this post useful, and happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7be56983b76" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[twentyfour: Migrating to Kotlin Multiplatform Mobile]]></title>
            <link>https://medium.com/@akqeel/mobile-app-development-migrating-to-kotlin-multiplatform-mobile-7c8e53210c25?source=rss-a2e96edfe06------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c8e53210c25</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[kotlin-multiplatform]]></category>
            <dc:creator><![CDATA[Akqeel]]></dc:creator>
            <pubDate>Sun, 13 Jul 2025 07:33:14 GMT</pubDate>
            <atom:updated>2026-02-14T17:22:09.162Z</atom:updated>
            <content:encoded><![CDATA[<p>In this brief post I’ll be sharing my experience and learnings in converting <a href="https://medium.com/@akqeel/twentyfour-your-lifestyle-productivity-planner-798d2a37e993">twentyfour</a> to a Kotlin Multiplatform Mobile project. The primary objective of this conversion is to prepare the existing native android codebase for the iOS platform.</p><h3>Let’s get started</h3><p>The first step is identifying which aspects of the application can be shared across both platforms (Android and iOS), and what must remain platform specific. For shared logic, we will focus mainly on the networking, data models, repositories, use cases, and core business logic. UI, navigation, and platform-specific APIs will remain native per platform. Figure 1. below presents the current android project structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ddnh0ToG0jqHb-p3Y3WM9w.png" /><figcaption>Figure 1. The current Android project structure.</figcaption></figure><p>For this we’ll have to first install the Kotlin Multiplatform IDE plugin on Android Studio, and then create a new shared Kotlin Multiplatform Library module.</p><p>Next up is to configure a new shared Kotlin multiplatform library module. The code snippet below presents the build.gradle configuration for this module:</p><pre>plugins {<br>    kotlin(&quot;multiplatform&quot;)<br>    id(&quot;com.android.library&quot;)<br>}<br><br>kotlin {<br>    android()<br>    iosX64()<br>    iosArm64()<br>    iosSimulatorArm64()<br><br>    sourceSets {<br>        val commonMain by getting<br>        val commonTest by getting<br><br>        val iosX64Main by getting<br>        val iosArm64Main by getting<br>        val iosSimulatorArm64Main by getting<br><br>        val iosMain by creating {<br>            dependsOn(commonMain)<br>            iosX64Main.dependsOn(this)<br>            iosArm64Main.dependsOn(this)<br>            iosSimulatorArm64Main.dependsOn(this)<br>        }<br><br>        val iosX64Test by getting<br>        val iosArm64Test by getting<br>        val iosSimulatorArm64Test by getting<br><br>        val iosTest by creating {<br>            dependsOn(commonTest)<br>            iosX64Test.dependsOn(this)<br>            iosArm64Test.dependsOn(this)<br>            iosSimulatorArm64Test.dependsOn(this)<br>        }<br>    }<br>}<br><br>android {<br>    namespace = &quot;com.aksoft.twentyfour.shared&quot;<br>    compileSdk = 34<br>    defaultConfig {<br>        minSdk = 24<br>    }<br>    compileOptions {<br>        sourceCompatibility = JavaVersion.VERSION_17<br>        targetCompatibility = JavaVersion.VERSION_17<br>    }<br>}<br><br>tasks.withType&lt;org.jetbrains.kotlin.gradle.tasks.KotlinCompile&gt;().configureEach {<br>    kotlinOptions {<br>        jvmTarget = &quot;17&quot;<br>    }<br>}</pre><p>And the directory structure for the shared is presented in Figure 2 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*vOatuTxFzCWQacCJSTw79Q.png" /><figcaption>Figure 2. Directory structure for the shared module.</figcaption></figure><p>One final change I had to make was to align my JAVA_HOME version with the Gradle Java version. For this I downgraded the jvmTarget and compileOptions in build.gradle to align with the OpenJDK 17 /opt/homebrew/opt/openjdk@17/bin/java I was running on my localhost.</p><h3>Testing</h3><p>To verify the proper configuration of the Kotlin Multiplatform migration, I setup a simple test, results shown in Figure 3 below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BQKfeVCOlvDLmJPcAvYlAQ.png" /><figcaption>Figure 3. Test case results.</figcaption></figure><p>This test defines a Platform class under androidMain , iosMain and commonMain in the sharedModule . Then, the test asserts the platform name for verification on the Android platform.</p><pre>package com.aksoft.twentyfour.shared<br><br>import com.aksoft.twentyfour.Platform<br>import org.junit.Assert<br>import org.junit.Test<br><br>class PlatformTest {<br><br>    @Test<br>    fun testPlatformName() {<br>        val expectedPlatform = &quot;Android&quot;<br>        val testPlatform = Platform().name<br>        Assert.assertEquals(expectedPlatform, testPlatform)<br>    }<br><br>}</pre><p>For iOS, assertion can be performed by running a XCTest on XCode .</p><pre>import XCTest<br>import shared // &lt;-- your KMP framework name<br><br>class SharedTests: XCTestCase {<br>    func testPlatformName() {<br>        let platform = Platform()<br>        XCTAssertEqual(platform.name, &quot;iOS&quot;)<br>    }<br>}</pre><h3>Conclusion</h3><p>That’s it! twentyfour is now ready for iOS development with shared logic from the current Android codebase. Hope you found this post useful. If you have any feedback or suggestions, please let me know in the comments section below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c8e53210c25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mobile App Development: Setting up an Onboarding Guide]]></title>
            <link>https://medium.com/@akqeel/mobile-app-development-setting-up-an-onboarding-guide-be49dd1284b6?source=rss-a2e96edfe06------2</link>
            <guid isPermaLink="false">https://medium.com/p/be49dd1284b6</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Akqeel]]></dc:creator>
            <pubDate>Thu, 03 Jul 2025 20:09:41 GMT</pubDate>
            <atom:updated>2025-07-03T20:18:24.913Z</atom:updated>
            <content:encoded><![CDATA[<p>Onboarding guides are very helpful documents for helping new joiners on the team get up to speed effectively. They help new developers to the project onboard quickly, without taking out too much time from developers currently on the team trying to meet their own sprint deadlines. These guides also ensure the project is well-documented for future references by linking all the different aspects of the project, from architecture to deployment processes, in a single and easy to navigate repository.</p><h3>Onboarding Guide</h3><p>There are various tools that can be used to create these guides, and the tool you’ll use may be specific to your team or organisation, but my personal preferences are GitHub README files or Atlassian Confluence. In this post I’ll share an overview of what I think should be included in an onboarding guide for mobile development —however, the content and structure of these guides can vary as they are specific to your project, team workflow, and what your team or organisation finds essential. The objective of these documents, in my opinion, should be a centralised repository that covers all aspects relevant to the development cycle for your codebase. The following section lists down these aspects.</p><h4>🟢 Getting Started</h4><p>This section should present a brief summary of what the project is about, where the project is stored, Play Store / App Store links, supported OS versions, IDE version, supported languages, etc. This would typically be the first section someone new to the project would read to give them a quick overview of where to find the source code, and what’s required to setup and run the development build on their local machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8848EwCan4j04w3zWLF84A.png" /></figure><h4>🧑‍🚀 Team Workflow</h4><p>The next section I’d include are the team workflow related content including communication tools and channels (Slack, Teams, etc), recurring meeting descriptions/purpose, team calendars, production and QA issue reporting channels, JIRA boards, Figma workspaces, FAQs, etc. The reader should get a quick overview of where to find information related to their day-to-day workflow, and where or whom to reach out to for Q&amp;A.</p><h4>🏗️ Architecture</h4><p>The next section is the application architecture. This section should give the reader a complete overview of the application architecture (MVP, MVVM, MVI, etc) with supporting diagrams. If your application follows a modularised approach, providing a description of what each module contains with diagrams representing how the modules link to each other should also be included here. Each module can have it’s own subsection, as shown below. As an added benefit, this approach also helps to cover feature documentation. This is usually the largest section in the guide, and must be continuously updated to reflect the changes applied on the codebase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FB19Ls3T5hMGCG5Ga3Yy9Q.png" /></figure><h4>↔️ Continuous Integration / Development (CI/CD)</h4><p>The next important section to include is the CI/CD pipeline. A comprehensive list of the branching strategy, git branches, commit message format, PR templates, and what actions are triggered from these commits and branches (Unit Tests, Linting, etc) should be mentioned here. The teams PR and merge rules (minimum approvals, etc) should also be included.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8TzDPQWqdYv-TQX1E01M5A.png" /></figure><h4>🚀 Release Process</h4><p>The final phase in the development cycle in a sprint is the app release process (Play Store, App Store submission). This section must include the pre (stakeholder approval, test cases passed, etc) and post release steps (release notes, notifying team members, version update, etc) to help ensure a smooth release process.</p><h4>📊 Monitoring and Observability</h4><p>This section must include the available monitoring and observability tools (Firebase Crashlytics, Play Console dashboard, etc) the team uses to monitor the health of the app.</p><h4>📝 Analytics and Reporting</h4><p>If your team uses analytical tools (Firebase Analytics, Google Analytics, Segment, etc) then these tools must be listed down here. A description of how analytics tasks (report generation, etc) relate to the stakeholders (product owner, data team, etc), and the feature development workflow can also be included in this section.</p><h3>Conclusion</h3><p>I hope you found this post useful. If you think there are any other aspects of mobile app development that are useful to be included in an onboarding guide, please share your thoughts in the comment section below. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be49dd1284b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[twentyfour: your lifestyle productivity planner]]></title>
            <link>https://medium.com/@akqeel/twentyfour-your-lifestyle-productivity-planner-798d2a37e993?source=rss-a2e96edfe06------2</link>
            <guid isPermaLink="false">https://medium.com/p/798d2a37e993</guid>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Akqeel]]></dc:creator>
            <pubDate>Sun, 05 Jan 2025 18:14:25 GMT</pubDate>
            <atom:updated>2026-02-14T18:08:35.173Z</atom:updated>
            <content:encoded><![CDATA[<h4>a product of Aksoft Studios [aksoftstudios@gmail.com]</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*NPHuWa5Fey8lXG1oicAuLQ.png" /></figure><p>I recently started creating my own mobile product — I had an idea for an app, and wanted to see it come to life. In this article I share my product creation journey, and hope that this may be useful for anyone interested in creating their own!</p><p>As a mobile engineer, there are many benefits in creating your own apps — <br>it gives you a platform to experiment with new frameworks and technologies, try new feature ideas, improve your technical skills, and may even grow popular enough to be monetised!</p><p>Happy reading!</p><h4>The brand — twentyfour</h4><p>The very first task for me was to come up with the branding. I needed a name, a name that reflected on the purpose of the brand. After several iterations I decided on twentyfour. <strong>Why twentyfour?</strong> Our daily routine is split between the 24 hours we get. The idea behind it is to help users to plan their days to be more productive — be it work, leisure, hobbies and even rest!</p><h4>Requirement brainstorming</h4><p>Next, I listed down the features I wanted to incorporate in my app. But before I could do this I needed a structure. A structure that would reflect on how the user would navigate through the app. Some of the questions that I ran through were:</p><ul><li>What would the app’s home screen content look like? What content would be the most useful for the users here?</li><li>What actions would be the most useful for users on the app’s home screen? And what other screens / content would the user want to be able to navigate to from the home screen?</li></ul><p>As I iterated through the answers for these questions, my idea for this product became more and more clearer. Eventually, I settled on the structure and roadmap in Figure 1 below (at least for the initial version).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*arQrX8mobBuNy9TG37cEBQ.png" /><figcaption>Roadmap for twentyfour’s first version</figcaption></figure><h4>Design</h4><p>Once I had the feature requirements locked down, I could start designing the screens. For this I used Figma’s design tool. Although I am not proficient in design and design tools, I was able to get some basic designs up to start build my app around.</p><p>A key step here for me was to start off with the design system — where I design the core components (labels, buttons, icons, etc) and import them into the twentyfour’s designs. There are a few key benefits in doing this, especially when working with large apps with several screens over multiple iterations: it helps with component reusability, and maintainability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fpUiK3sLM3OuYFNKyUGtug.png" /><figcaption>Figma designs for twentyfour’s early version</figcaption></figure><h4>Task (Project) Management</h4><p>Before diving into writing code, I wanted to setup a project management tool. This helped me to map out the feature list I had brainstormed earlier into actionable items. I could then prioritise, add version labels, and keep track of the different tasks. Github provides there own project dashboard, which was good enough for me for this project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8s-HbnQyf8fE_p5q2oEsbQ.png" /><figcaption>Github’s project management tool</figcaption></figure><h4>Writing the code — Android</h4><p>Now I was ready to start writing code. I won’t go into too much detail here but try to cover some of the concepts at a high level. Also, do note that this is related to Android App Development (although most concepts are relevant and transferrable to other platforms such as iOS App Development).</p><p><strong>App Architecture — Android</strong></p><p>When building android apps (and software applications in general) it is important to adhere to a software architecture. Software architecture helps to structure the code in a manner that improves the code maintainability, testability and reusability. The benefits may not be visible in small projects (and the workload may seem high given the lack of visible benefits), but is a key factor in the success of large scale software projects.</p><p>The Model-View-ViewModel (MVVM) architecture is currently one of most widely used app architecture in Android App Development, and this fits my goals for this project. Other architectures include Clean Architecture, Model-View-Presenter (MVP), etc. You can discover more about Android App architecture here: <a href="https://developer.android.com/topic/architecture">https://developer.android.com/topic/architecture</a>.</p><p><strong>Custom UI Components</strong></p><p>One of the features required me to build a custom UI component. I won’t go into detail here, but if you are interested you can checkout my post here: <a href="https://medium.com/@akqeel/android-ui-building-a-custom-view-a990f8c6db75?source=your_stories_page-------------------------------------">https://medium.com/@akqeel/android-ui-building-a-custom-view-a990f8c6db75</a></p><p><strong>Unit Testing (and Test Case Generation)</strong></p><p>Writing tests is another crucial step in building software. Testing ensures that the feature works as expected, and future changes do not break any existing functionality. Again I won’t dive deep here, but if you are interested to learn more about the testing techniques on Android you can check out this article: <a href="https://medium.com/@akqeel/understanding-android-testing-f8f58b409d49">https://medium.com/@akqeel/understanding-android-testing-f8f58b409d49</a></p><p>One key learning I want to highlight in this section is the use of <strong>test case generation</strong> for writing test cases. Writing test cases takes time, but with the use of AI tools we can automate test case generation. The code generated may not always be accurate but it gives us a starting point to adding our test cases. For this project I used Cursor.ai [<a href="https://www.cursor.com/">https://www.cursor.com</a>] to generate my test cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yvPoVbd7r3WOlDLmQ3tGpw.png" /><figcaption>Cursor.ai for test case generation</figcaption></figure><h4>Static Analysis</h4><ul><li>SonarQube is a static analysis tool to identify code smells, bugs and vulnerabilities. If you’d like to learn how to integrate SonarQube for setting up KPIs for your project, I’d recommend checking out this article: <a href="https://medium.com/shadow-tech-blog/why-we-implemented-sonarqube-with-android-and-how-bb269b4ff88">https://medium.com/shadow-tech-blog/why-we-implemented-sonarqube-with-android-and-how-bb269b4ff88</a></li></ul><p>Note, Community Edition of SonarQube only supports the default (`master`) branch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mLknisghuIWTq8gcf2GDDw.png" /><figcaption>SonarQube report (localhost)</figcaption></figure><h4>Source Control</h4><ul><li><strong>Pull Requests</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iUSOxX7NypUXnsmTdJIvkg.png" /><figcaption>Pull request history on Github</figcaption></figure><ul><li><strong>Pull Request Template:</strong> I’ve setup a simple PR template to streamline the PR description so that reviewers can be onboarded to the new changes quickly. To learn how to add a PR template to your Github repository, you can follow the guide <a href="https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository">here</a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OY9u6yfn382iiSJBitKl4Q.png" /><figcaption>Pull request template file for Android projects.</figcaption></figure><h4><strong>Setting up CI/CD Pipelines</strong></h4><p>CI/CD pipelines can be setup on Github using <a href="https://docs.github.com/en/actions">Github Actions</a>. For this project, I’ve added workflows to execute test cases and apply linting before the code is merged to the release branch.</p><ul><li><strong>Test Case Execution</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XO639Cp-GLvDkgmjJtEWww.png" /><figcaption>Running unit tests using Github Actions</figcaption></figure><ul><li><strong>Linting (KTLint)</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uVQ-bLxhmNs0eMV8eLp8_w.png" /><figcaption>Ktlint Github action successfully completed</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rqA0HiNbJBjiSh6ISjP5Bg.png" /><figcaption>Ktlint formatting applied via Github actions</figcaption></figure><h4>Release Process</h4><p>The Gitflow branching strategy is used in this project to streamline the development and release processes. To learn more, you can checkout the documentation <a href="https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*dhNGIOs1m04yPqImq64uew.png" /></figure><h4>Deployment &amp; Monitoring</h4><p>The last stage of this phase is rolling out this version of the app to the public. Deploying an Android app has two steps: <a href="https://developer.android.com/studio/publish/app-signing">app signing</a> and <a href="https://developer.amazon.com/docs/app-submission/submitting-apps-to-amazon-appstore.html">app store configuration</a>. Once you have configured your app store with the relevant details, you can upload your signed APK, and submit your app for review!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NoFzk0N_pH-QHFd9rNX-mw.png" /><figcaption>twentyfour on Google Play Store (Closed Testing)</figcaption></figure><h4><strong>Conclusion</strong></h4><p>In this post, I’ve shared my journey in setting up and deploying an Android app from scratch. I’ve walked through several features, apart from writing the code, that are important and are widely adopted in the software industry for the development and maintenance of healthy mobile apps.</p><p>I hope you enjoyed reading this post, and found it helpful. Stay tuned for more!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=798d2a37e993" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TravelTime: A simple commute app built on React Native]]></title>
            <link>https://medium.com/@akqeel/traveltime-a-simple-commute-app-built-on-react-native-618e1669c5a6?source=rss-a2e96edfe06------2</link>
            <guid isPermaLink="false">https://medium.com/p/618e1669c5a6</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Akqeel]]></dc:creator>
            <pubDate>Thu, 12 Dec 2024 18:39:38 GMT</pubDate>
            <atom:updated>2024-12-14T18:42:30.010Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>React Native</strong> has become increasingly popular over the years, and I wanted to learn the basics of this framework. To get started, I decided to build a simple commute app (powered by Google’s Places API) and document down my process here. If you are new to React Native and are interested in getting to know this platform, hope you find this article useful.</p><p>Before we get started, let me list down links to some of the resources you’ll need:</p><ul><li>React Native Documentation: <a href="https://reactnative.dev/">https://reactnative.dev/</a></li><li>Expo (A development environment designed for React Native development): <a href="https://expo.dev/">https://expo.dev/</a></li><li>Google Places API: <a href="https://developers.google.com/maps/documentation/places/web-service/overview">https://developers.google.com/maps/documentation/places/web-service/overview</a></li><li>Visual Studio Code Editor: <a href="https://code.visualstudio.com/">https://code.visualstudio.com/</a></li></ul><h3>A bit of theory</h3><p>React Native is a Javascript (JS) and React based cross-platform mobile development framework that supports app development for both Android and iOS from a common codebase. This is made possible by abstracting the Android / iOS native layer by a component called the <strong>Javascript Bridge</strong>. When Javascript code is executed, these commands are serialised and passed over to the native layer via the JS Bridge. This process allows developers to define components in a common language / framework and have it converted to the corresponding native Android / iOS components at runtime.</p><p>React Native follows a declarative programming paradigm, where updates to the program state triggers UI updates. <strong>Hot reloading</strong> is another key benefit — where changes can be seen immediately instead of having to recompile and launch the application.</p><p>However, a few things to note is that the JS Bridge has a runtime overhead (in comparison to native applications), and this bridge is packaged in the final .apk/ .ipa file leading to a slightly larger app size. There are several ongoing improvements such as the <strong>Hermes engine</strong> [<a href="https://github.com/facebook/hermes">https://github.com/facebook/hermes</a>], and <strong>Reanimated</strong> [<a href="https://github.com/software-mansion/react-native-reanimated">https://github.com/software-mansion/react-native-reanimated</a>] to mitigate these effects.</p><h3><strong>Show me the code</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zhcJk-nxYKiD57wRtu-eOg.png" /><figcaption>TravelTime React Native source code (left) and Android app (right)</figcaption></figure><p>The React Native development environment setup and feature implementation was fairly straightforward, and I was able to put together a simple distance and duration calculator in just a couple of hours (with some help from ChatGPT!)</p><p>The setup guide available at [<a href="https://reactnative.dev/docs/environment-setup">https://reactnative.dev/docs/environment-setup</a>] is well written and I was able to get up and running with just this resource. Expo [<a href="https://docs.expo.dev/get-started/set-up-your-environment/">https://docs.expo.dev/get-started/set-up-your-environment/</a>] simplifies the process of linking your project and running on an emulator. Do note that you would need to setup Android Studio / XCode and configure an emulator as a prerequisite.</p><p>For this feature implementation, I made use of two Google APIs:</p><ol><li>Google Places API</li><li>Google Directions API</li></ol><p>This page display two input fields: one for the user’s starting location and one for the user’s destination. As the user inputs text into the field, this value is observed by the onChangeText function of the TextInput component:</p><ol><li>This value is then stored as a “state” variable.</li><li>The Google Places API is called to query for places with this text.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*rSmZo3xaR4SyidtMLg6OLg.png" /><figcaption>Storing the Places API result in a state variable</figcaption></figure><p>To support API requests I use the axios [<a href="https://www.npmjs.com/package/react-native-axios">https://www.npmjs.com/package/react-native-axios</a>] HTTP client.</p><p>The list of places are displayed in a FlatList where the user is able to select the desired location. This UI component is re-rendered each time the places state is updated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*cuVcL0Z0rW-6qrN-2vNBJA.png" /><figcaption>Displaying the results as a list of selectable items</figcaption></figure><p>When both locations (starting location and destination) are selected, the fetchDirections function is called to fetch the commute information from the Google Directions API. The results are then displayed in a simple Text components with the Distance and Duration labels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/786/1*Tr4EVscIVFKcrYIZ-nOaYA.png" /><figcaption>Querying for commute information from Google Directions API</figcaption></figure><p><strong>Styling </strong>is implemented using the StyleSheet component and applied to the UI elements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/272/1*EkJuQP5slBjrZkcBZuU79g.png" /><figcaption>React Native StyleSheet</figcaption></figure><p>The react-native-dotenv [<a href="https://github.com/zetachang/react-native-dotenv">https://github.com/zetachang/react-native-dotenv</a>] babel plugin can be used to load and retrieve key-value pairs from the environment variables.</p><p>If you are interested to know more, the source code is available at [<a href="https://github.com/akqeelnawas/traveltime">https://github.com/akqeelnawas/traveltime</a>]. You can find the latest changes in the dev branch. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=618e1669c5a6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android UI: Building a Custom View]]></title>
            <link>https://medium.com/@akqeel/android-ui-building-a-custom-view-a990f8c6db75?source=rss-a2e96edfe06------2</link>
            <guid isPermaLink="false">https://medium.com/p/a990f8c6db75</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Akqeel]]></dc:creator>
            <pubDate>Thu, 19 Sep 2024 15:08:22 GMT</pubDate>
            <atom:updated>2024-09-19T15:11:27.938Z</atom:updated>
            <content:encoded><![CDATA[<p>I was recently working on an android app, and one of the features required me to build a custom UI component. In this post, I thought of sharing the process of building a custom android View, as it might be useful to anyone interested in learning to build their own.</p><p>So, let’s get started. The component we’ll be building is an hourly time logger with two CTAs: one for incrementing, and the other for decrementing the time. I’ve attached a screenshot below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*LTcobKfrU4sTZ2_h36drsg.png" /><figcaption>Time logger custom Android View</figcaption></figure><p><em>Note: The elevated / shadow border you see is a </em><em>CardView which wraps around the custom Android View.</em></p><p><strong>Subclassing the Android View class</strong></p><p>The first step is to create our own Kotlin / Java class and extend from the android.view.View class. This parent class has 3 constructors which we must override to support XML layout inflation. The attrs parameter can be used to further customise the styling of our custom view (if needed).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/1*J1LMvdBO_IjGwBqLBkW3bA.png" /></figure><p><strong>Override the </strong><strong>onDraw method</strong></p><p>Next, we override the onDraw method. This method is where we will be <em>painting </em>our UI elements onto the canvas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*LQufQwOf9MCoNgyopDo5vg.png" /><figcaption>Implementation of the onDraw method</figcaption></figure><p>Before we dive into the code, let’s first take a look at our custom UI component. We see that there are three main sub-elements:<br>1. A circle button to decrement hours<br>2. A circle button to increment hours<br>3. A text label to display the current number of hours</p><p>To simplify the drawing of the circles, we can create and initialise a custom Circle class which holds the properties (such x position, y position, radius, etc) needed to draw on the canvas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*BrPWhHKtNZkf-C_YDkqxrw.png" /><figcaption>The Circle class representation</figcaption></figure><p>The onDraw method can be broken down into 3 separate parts:<br>1. The first part draws a white rectangle to set the view background.<br>2. The second part is where we draw our circle sub-elements.<br>3. And the in the last part we draw the hourly label text element.</p><p>The android framework will call the onDraw method whenever a layout render is performed.</p><p><strong>Handling user click events</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*A9IjYppFYRuDQMwWwevWlA.png" /><figcaption>Implementation of the onTouchEvent method</figcaption></figure><p>We can listen to user touches by overriding the onTouchEvent method. Here we check if the event is an ACTION_DOWN (the user pressed down on a position within our custom view). Then, we get the x and y coordinates of the exact position where the user clicked, and check if it lies within any of our Circle elements.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/517/1*otXVUyiejqh9Vrxcb9niPw.png" /><figcaption>Custom Circle class</figcaption></figure><p>This can be done by simply checking the straight line distance between the <strong>circle’s center point [x1, y1] </strong>and the <strong>coordinates of the user clicked position [x2, y2]</strong>.</p><p>To calculate the straight line distance, we can apply Pythagorean theorem with our coordinates as inputs. If the <strong>straight line distance &lt; radius</strong>, this means that the user click was inside the circle.</p><p><strong>Updating the hour label</strong></p><p>Finally, we’ll need to reflect the latest hour value based on the user click event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/1*Fjvy4QuzdU-E_7AA2OCdmA.png" /><figcaption>Registering the click event listeners</figcaption></figure><p>For this we register the two click event listeners from our Activity / Fragment. When a click event is performed, we can notify the viewmodel — which would calculate the new value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/329/1*5oSeQnvER4eSY83K_sov_g.png" /><figcaption>Increment / decrement hour logic</figcaption></figure><p>This new value can now be passed back to the caller, which would in turn update the label on our custom view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*HL583gUxe-fEsXgQqRgVGg.png" /><figcaption>Updating the label on the custom view using view binding</figcaption></figure><p>With this we should now have a functioning increment / decrement counter custom UI component!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*A_8_UdcVOc3LH8vFoBIDjQ.gif" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a990f8c6db75" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>