{"id":7525,"date":"2025-11-01T16:35:04","date_gmt":"2025-11-01T16:35:04","guid":{"rendered":"https:\/\/robertjwallace.com\/?p=7525"},"modified":"2025-11-30T14:54:04","modified_gmt":"2025-11-30T14:54:04","slug":"i-dont-need-no-stinking-google-play-store","status":"publish","type":"post","link":"https:\/\/robertjwallace.com\/es\/i-dont-need-no-stinking-google-play-store\/","title":{"rendered":"I don&#8217;t need no stinking Google Play store"},"content":{"rendered":"<p class=\"\">If you have been following my posts you know that I have been playing around with creating apps for use as a Magician.  But I wondered what else I could do.  I was out driving using a speedometer app that has advertisements and features that I don&#8217;t care about so&#8230;<\/p>\n\n\n\n<p class=\"\"> <\/p>\n\n\n\n<!--more-->\n\n\n\n<p class=\"\">When I got home I fired up Google Gemini and asked:<br>&#8220;I want a html\/javascript cordova app that displays your speed (based on gps) in MPH and a clock with an AM\/PM indicator. IF possible I would like a start\/stop button and a reset button and I would like it to track trip duration in time and miles. Can you build that.&#8221;<\/p>\n\n\n\n<p class=\"\">Gemini replied:<\/p>\n\n\n\n<p class=\"\">&#8220;That sounds like a great idea for a practical mobile utility! I&#8217;ve created a single-file HTML\/JavaScript app that leverages the device&#8217;s GPS (as is standard in Cordova environments) to calculate speed, track distance and duration, and save your trip data using Firestore.<\/p>\n\n\n\n<p class=\"\">Here is the complete file.&#8221;  <\/p>\n\n\n\n<p class=\"\">It even created the Javascript file I needed and gave me the Cordova commands I needed to install it:<br>Step 1: Create the Cordova Project<\/p>\n\n\n\n<p class=\"\">This command creates a new project directory named <code>gps-tracker<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cordova create speedometer com.example.speedometer speedometer\ncd speedometer<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Add the Android Platform<\/h2>\n\n\n\n<p class=\"\">You must explicitly tell Cordova which mobile platform you intend to build for.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cordova platform add android<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Install Geolocation Plugin (Crucial for Permissions)<\/h2>\n\n\n\n<p class=\"\">This step adds the necessary native code and permissions (like <code>ACCESS_FINE_LOCATION<\/code>) to the app&#8217;s configuration, which will allow the app to prompt you for GPS access at runtime.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cordova plugin add cordova-plugin-geolocation<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Integrate Your HTML\/JavaScript File<\/h2>\n\n\n\n<p class=\"\">The Cordova project structure uses the <code>www<\/code> folder for all web assets. You need to replace the default <code>index.html<\/code> file with your custom one.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li class=\"\"><strong>Locate your file:<\/strong> Find the <code>index.html<\/code> file you were working on.<\/li>\n\n\n\n<li class=\"\"><strong>Copy\/Move the file:<\/strong> Overwrite the placeholder file in the project directory.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code># Assuming your custom index.html is one directory up\ncp ..\/index.html www\/index.html\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Build the Application<\/h2>\n\n\n\n<p class=\"\">This command compiles the web assets into a native Android application package (<code>.apk<\/code>).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cordova build android\n<\/code><\/pre>\n\n\n\n<p class=\"\"><strong>Output File Location:<\/strong> If the build is successful, the generated APK file can typically be found here: <code>platforms\/android\/app\/build\/outputs\/apk\/debug\/app-debug.apk<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Deploy to the Connected Device<\/h2>\n\n\n\n<p class=\"\">cordova run android<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Final Results<br><\/h2>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"473\" height=\"1024\" data-id=\"7526\" data-src=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2025\/11\/screenshot_20251101_092241_speedometer2999791246793726329-473x1024.jpg\" alt=\"\" class=\"wp-image-7526 lazyload\" data-srcset=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2025\/11\/screenshot_20251101_092241_speedometer2999791246793726329-473x1024.jpg 473w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2025\/11\/screenshot_20251101_092241_speedometer2999791246793726329-138x300.jpg 138w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2025\/11\/screenshot_20251101_092241_speedometer2999791246793726329-6x12.jpg 6w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2025\/11\/screenshot_20251101_092241_speedometer2999791246793726329-540x600.jpg 540w\" data-sizes=\"(max-width: 473px) 100vw, 473px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 473px; --smush-placeholder-aspect-ratio: 473\/1024;\"><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"473\" height=\"1024\" data-id=\"7527\" data-src=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2025\/11\/screenshot_20251101_092344_speedometer4900342285438085710-473x1024.jpg\" alt=\"\" class=\"wp-image-7527 lazyload\" data-srcset=\"https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2025\/11\/screenshot_20251101_092344_speedometer4900342285438085710-473x1024.jpg 473w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2025\/11\/screenshot_20251101_092344_speedometer4900342285438085710-138x300.jpg 138w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2025\/11\/screenshot_20251101_092344_speedometer4900342285438085710-6x12.jpg 6w, https:\/\/robertjwallace-images.s3.us-east-2.amazonaws.com\/wp-content\/uploads\/2025\/11\/screenshot_20251101_092344_speedometer4900342285438085710-540x600.jpg 540w\" data-sizes=\"(max-width: 473px) 100vw, 473px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 473px; --smush-placeholder-aspect-ratio: 473\/1024;\"><\/figure>\n<\/figure>","protected":false},"excerpt":{"rendered":"<p>If you have been following my posts you know that I have been playing around with creating apps for use as a Magician. But I wondered what else I could do. I was out driving using a speedometer app that has advertisements and features that I don&#8217;t care about so&#8230;<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_eb_attr":"","footnotes":""},"categories":[171,192,143],"tags":[],"class_list":["post-7525","post","type-post","status-publish","format-standard","hentry","category-ai","category-android-app","category-computer-stuff"],"featured_image_src":null,"featured_image_src_square":null,"author_info":{"display_name":"Bob","author_link":"https:\/\/robertjwallace.com\/es\/author\/admin\/"},"_links":{"self":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/7525","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/comments?post=7525"}],"version-history":[{"count":1,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/7525\/revisions"}],"predecessor-version":[{"id":7528,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/posts\/7525\/revisions\/7528"}],"wp:attachment":[{"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/media?parent=7525"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/categories?post=7525"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/robertjwallace.com\/es\/wp-json\/wp\/v2\/tags?post=7525"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}