<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Terry Mechan</title>
    <description>The latest articles on Forem by Terry Mechan (@terry_mechan_f9b7e8856db5).</description>
    <link>https://forem.com/terry_mechan_f9b7e8856db5</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3720329%2F53924ad1-c2f6-49ee-b242-0fc3527704f8.jpg</url>
      <title>Forem: Terry Mechan</title>
      <link>https://forem.com/terry_mechan_f9b7e8856db5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/terry_mechan_f9b7e8856db5"/>
    <language>en</language>
    <item>
      <title>How I Built a Full-Stack Android App at 84 Years Old (Using Google Gemini as my Junior Dev</title>
      <dc:creator>Terry Mechan</dc:creator>
      <pubDate>Mon, 19 Jan 2026 20:14:55 +0000</pubDate>
      <link>https://forem.com/terry_mechan_f9b7e8856db5/how-i-built-a-full-stack-android-app-at-84-years-old-using-google-gemini-as-my-junior-dev-3gjk</link>
      <guid>https://forem.com/terry_mechan_f9b7e8856db5/how-i-built-a-full-stack-android-app-at-84-years-old-using-google-gemini-as-my-junior-dev-3gjk</guid>
      <description>&lt;p&gt;By Terry Mechan&lt;/p&gt;

&lt;p&gt;They say you can’t teach an old dog new tricks. I firmly disagree.&lt;/p&gt;

&lt;p&gt;I started my career as a British Telecom apprentice in 1960. &lt;/p&gt;

&lt;p&gt;I spent decades managing technology projects across Africa and Asia and developing patent-winning security systems for De La Rue. &lt;/p&gt;

&lt;p&gt;I know engineering. I know logic. I know architecture. I know innovation&lt;/p&gt;

&lt;p&gt;But I didn’t know Kotlin or anything to do with building an Android App.&lt;/p&gt;

&lt;p&gt;At 84, I wanted to build a solution to a modern problem: Mainstream family safety apps have turned into surveillance tools. They drain battery and track 24/7 history. I wanted to build a Privacy-First Utility that only checks location on-demand via SMS and Email, without the receiver needing an app.&lt;/p&gt;

&lt;p&gt;I had the vision, but not the syntax. So, I hired an AI assistant:-Google Gemini.&lt;/p&gt;

&lt;p&gt;Here is how I used AI not to “do it for me,” but to act as my hands while I provided the brain.&lt;/p&gt;

&lt;p&gt;The Architecture&lt;/p&gt;

&lt;p&gt;Most people use AI to write email subject lines. I used it to build a full-stack architecture. I needed four distinct technologies to talk to each other securely:&lt;/p&gt;

&lt;p&gt;Android App (Kotlin): To run on the phone and manage GPS.&lt;br&gt;
Cloud Messaging (Firebase FCM): To wake up the phone from “Doze Mode” instantly.&lt;br&gt;
Backend API (PHP): To handle secure requests.&lt;br&gt;
Database (MySQL): To store authorized “Buddy” relationships.&lt;/p&gt;

&lt;p&gt;I acted as the Technical Director. I described the logic flow, error handling, and privacy constraints. Gemini acted as the Junior Developer, writing the syntax and refactoring based on my testing.&lt;/p&gt;

&lt;p&gt;Here is a look under the hood.&lt;/p&gt;

&lt;p&gt;Challenge 1: The “Sleeping” Phone (Kotlin &amp;amp; Firebase)&lt;/p&gt;

&lt;p&gt;The biggest technical hurdle was Android’s “Doze Mode.” If a phone is in a pocket for an hour, the OS kills background network access to save battery. I needed a way to wake it up remotely to check location.&lt;br&gt;
I explained the logic to Gemini: “I need a high-priority signal that bypasses battery optimization to trigger a location check immediately.”&lt;br&gt;
Gemini recommended Firebase Cloud Messaging (FCM) and wrote this Kotlin service to handle the “Wake Up” command.&lt;/p&gt;

&lt;p&gt;The Code (Kotlin):&lt;/p&gt;

&lt;p&gt;// Generated by Gemini, Architected by Terry Mechan&lt;br&gt;
override fun onMessageReceived(remoteMessage: RemoteMessage) {&lt;br&gt;
val action = remoteMessage.data["action"]&lt;/p&gt;

&lt;p&gt;if (action == "buddy_location_request") {&lt;br&gt;
// The phone is asleep. We need to wake it up and grab a snapshot.&lt;br&gt;
val webTriggerCode = remoteMessage.data["web_trigger_code"]&lt;br&gt;
val replyToNumber = remoteMessage.data["requester_phone_number"]&lt;/p&gt;

&lt;p&gt;// Critical: Use WorkManager to guarantee execution even if app is killed&lt;br&gt;
val workerData = Data.Builder()&lt;br&gt;
.putString("task", "FETCH_BUDDY_LOCATION")&lt;br&gt;
.putString("reply_to_number", replyToNumber)&lt;br&gt;
.build()&lt;br&gt;
val request = OneTimeWorkRequestBuilder()&lt;br&gt;
.setInputData(workerData)&lt;br&gt;
.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST)&lt;br&gt;
.build()&lt;br&gt;
WorkManager.getInstance(applicationContext).enqueue(request)&lt;br&gt;
}&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;My contribution: I realized the initial code failed when the app was force-closed by the OS. &lt;/p&gt;

&lt;p&gt;I directed Gemini to switch from a standard IntentService to WorkManager with setExpedited to ensure reliability during deep sleep.&lt;/p&gt;

&lt;p&gt;Challenge 2: The “No-App” Interface (PHP)&lt;/p&gt;

&lt;p&gt;My core requirement was that the Receiver (the Buddy) should not need to install the app. They should just click a link.&lt;/p&gt;

&lt;p&gt;I needed a secure, expiring link system. &lt;/p&gt;

&lt;p&gt;I directed Gemini to write a PHP script that validates a secure token against my MySQL database before allowing a location request.&lt;/p&gt;

&lt;p&gt;The Code (PHP):&lt;/p&gt;

&lt;p&gt;// Validating the Secure Link (Backend Logic)&lt;br&gt;
$web_code = $_GET['code'];&lt;br&gt;
$stmt = $pdo-&amp;gt;prepare("SELECT owner_user_id, is_master_buddy_switch_on FROM sms_authorized_requesters WHERE web_trigger_code = ?");&lt;br&gt;
$stmt-&amp;gt;execute([$web_code]);&lt;br&gt;
$buddy = $stmt-&amp;gt;fetch();&lt;br&gt;
if ($buddy) {&lt;br&gt;
if ($buddy['is_master_buddy_switch_on'] == 1) {&lt;br&gt;
// Send the 'Wake Up' signal to the Android Phone via Firebase&lt;br&gt;
sendFCMToDevice($buddy['owner_user_id'], 'buddy_location_request');&lt;br&gt;
echo json_encode(["status" =&amp;gt; "success", "message" =&amp;gt; "Location requested. Check your SMS."]);&lt;br&gt;
} else {&lt;br&gt;
echo json_encode(["status" =&amp;gt; "error", "message" =&amp;gt; "User is currently offline."]);&lt;br&gt;
}&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;My contribution: I insisted on the logic check for is_master_buddy_switch_on. Privacy is paramount; if the user toggles the switch OFF in the app, the PHP backend must reject the request instantly.&lt;/p&gt;

&lt;p&gt;Challenge 3: The Data Structure (MySQL)&lt;/p&gt;

&lt;p&gt;We needed a way to link “Buddies” (Requesters) to “Users” (Phone Owners) without storing sensitive personal data unnecessarily.&lt;/p&gt;

&lt;p&gt;I sketched the schema; Gemini wrote the SQL.&lt;/p&gt;

&lt;p&gt;The Code (MySQL):&lt;/p&gt;

&lt;p&gt;CREATE TABLE sms_authorized_requesters (&lt;br&gt;
id INT AUTO_INCREMENT PRIMARY KEY,&lt;br&gt;
owner_user_id INT NOT NULL,&lt;br&gt;
requester_name VARCHAR(100),&lt;br&gt;
requester_phone_number VARCHAR(20),&lt;br&gt;
web_trigger_code VARCHAR(64) UNIQUE, -- The secret key&lt;br&gt;
is_email_only TINYINT DEFAULT 0,&lt;br&gt;
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,&lt;br&gt;
FOREIGN KEY (owner_user_id) REFERENCES users(id) ON DELETE CASCADE&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;The Result: MyBuddy&lt;/p&gt;

&lt;p&gt;After 12 months of iteration, testing, and “arguing” with the AI (yes, you have to correct it!), the result is a robust, published application.&lt;br&gt;
MyBuddy allows users to share their location or set arrival alerts without 24/7 tracking.&lt;/p&gt;

&lt;p&gt;The code is efficient (thanks to Kotlin Coroutines).&lt;br&gt;
The backend is fast (thanks to PHP).&lt;br&gt;
The logic is sound (thanks to 60 years of engineering experience).&lt;/p&gt;

&lt;p&gt;This project proved to me that AI does not replace human experience — it amplifies it. It allowed an 84-year-old to build a product that usually requires a team of five.&lt;/p&gt;

&lt;p&gt;Where to see it:&lt;/p&gt;

&lt;p&gt;The Philosophy: Read more about my concept of “Sharing without the stalking” on the main website:&lt;br&gt;
👉&lt;a href="https://www.placemeguardian.com/" rel="noopener noreferrer"&gt; PlaceMe Guardian Homepage&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Tech Demo: Try the technology right now without installing the app (Web Simulation):&lt;br&gt;
👉 &lt;a href="https://www.placemeguardian.com/demoportal.php" rel="noopener noreferrer"&gt;Try the Web Demo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The App: View the live release on the Play Store:&lt;br&gt;
👉 &lt;a href="https://play.google.com/store/apps/details?id=com.terrymechan.placemeguardian" rel="noopener noreferrer"&gt;MyBuddy on Google Play&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>kotlin</category>
      <category>ai</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
