'use client'; import React, { useState, useEffect } from 'react'; import Link from 'next/link'; import { DownloadLinksContent } from '../lib/cms'; interface DownloadHubClientProps { content: DownloadLinksContent; versionInfo: string; } export function DownloadHubClient({ content, versionInfo }: DownloadHubClientProps) { const [detectedOs, setDetectedOs] = useState<'android' | 'ios' | 'desktop' | 'unknown'>('unknown'); const [osName, setOsName] = useState('Detecting system...'); const [copiedSha, setCopiedSha] = useState(false); // Release SHA-256 checksum (can be updated per official binary build) const sha256Checksum = '9bc16329ef539371e62cea175c89df8de6accd8f44171jekb17504a91f3e72c84'; useEffect(() => { if (typeof window === 'undefined') return; const ua = navigator.userAgent || ''; if (/android/i.test(ua)) { setDetectedOs('android'); setOsName('Android Device'); } else if (/iphone|ipad|ipod/i.test(ua)) { setDetectedOs('ios'); setOsName('Apple iOS'); } else if (/macintosh|mac os x/i.test(ua)) { setDetectedOs('desktop'); setOsName('macOS Workstation'); } else if (/windows/i.test(ua)) { setDetectedOs('desktop'); setOsName('Windows PC'); } else if (/linux/i.test(ua)) { setDetectedOs('desktop'); setOsName('Linux Workstation'); } else { setDetectedOs('unknown'); setOsName('Web Client'); } }, []); const handleCopySha = async () => { try { await navigator.clipboard.writeText(sha256Checksum); setCopiedSha(true); setTimeout(() => setCopiedSha(false), 2000); } catch (_) { // Fallback } }; const downloadUrl = content.android_url || 'https://motorsignal.app/builds/motorsignal-release.apk'; return (
{/* Background radial glow */}
{/* Header / Hero */}
{/* OS Detection Eyebrow Badge */}
Detected Client: {osName} {detectedOs === 'android' && ( Direct Install Supported )}

MotorSignal Multi-Platform Hub

Install the 20 Hz motorcycle telemetry engine directly to your Android device, test drive on iOS TestFlight, or pair with your cloud rider portal.

{/* Primary Action Row: APK Direct Download (Left) & Instant QR Scan (Right) */}
{/* Left Column: Direct Download Action (7 cols) */}
{/* Top Cyan Accent Line */}
OFFICIAL RELEASE {versionInfo || 'v1.0.4 (build 42)'}

MotorSignal for Android

Direct installation package compiled with aerospace-grade 20 Hz IMU sensor fusion, Waze police radar overlays, and Drift Schema 7 offline persistence.

{/* Specs Pills */}
PACKAGE SIZE 221 MB
MINIMUM OS Android 10+
SAMPLING 20 Hz IMU
OFFLINE 100% Ready
{/* Primary Action Button */}
{/* Right Column: Phone Install QR Code (5 cols) */}
Instant Mobile Transfer

Scan with Phone Camera

Point your Android camera at the QR code below to download the APK directly to your motorcycle handset.

{/* Render High-Contrast SVG QR Code */}
{/* Outer Frame & Quiet Zone */} {/* Top-Left Position Detection Pattern */} {/* Top-Right Position Detection Pattern */} {/* Bottom-Left Position Detection Pattern */} {/* Timing & Data Cells Matrix */} {/* Middle Region Blocks */} {/* Bottom-Right Data Clusters */}
Compatible with Android 10, 11, 12, 13, 14, and 15
{/* SHA-256 Package Integrity Verification Card */}

SHA-256 Package Verification Checksum

Verify the cryptographic signature of your downloaded APK before installing to guarantee untampered binary integrity:

{sha256Checksum}
{/* Numbered Sideloading Step Cards (1, 2, 3) */}

How to Install Android APK

Follow these 3 quick steps to sideload MotorSignal directly onto your motorcycle handset

{/* Step 1 */}
01

Download APK File

Tap the Download APK button above or scan the QR code using your phone's camera. If prompted, tap Keep or Download anyway.

{/* Step 2 */}
02

Allow Unknown Apps

Tap the downloaded file in your Notifications or Downloads. In Android Settings, toggle "Allow from this source" for your browser or Files app.

{/* Step 3 */}
03

Mount & Ride

Launch MotorSignal and grant Location & Sensor permissions. Fasten your device to your handlebar mount, select your cockpit HUD mode, and hit the road.

{/* Bottom CTA / Portal Link */}

Already have MotorSignal installed?{' '} Open Rider Cloud Portal →

); }