<?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>Debug School: Abhishek singh</title>
    <description>The latest articles on Debug School by Abhishek singh (@abhishek).</description>
    <link>https://www.debug.school/abhishek</link>
    <image>
      <url>https://www.debug.school/images/H4WNYuUuNO4Ij0FslG7gSt2-BFyJAwj3NSIPfctkSx0/rs:fill:90:90/g:sm/mb:500000/ar:1/aHR0cHM6Ly93d3cu/ZGVidWcuc2Nob29s/L3VwbG9hZHMvdXNl/ci9wcm9maWxlX2lt/YWdlLzc4OC80ZmQy/YWYxMi0wMjM0LTQ5/YWUtOGJkNS1iNmNj/ZDAzODgwMzkuanBn</url>
      <title>Debug School: Abhishek singh</title>
      <link>https://www.debug.school/abhishek</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://www.debug.school/feed/abhishek"/>
    <language>en</language>
    <item>
      <title>Traccar Integration — Complete Guide</title>
      <dc:creator>Abhishek singh</dc:creator>
      <pubDate>Tue, 02 Jun 2026 12:03:11 +0000</pubDate>
      <link>https://www.debug.school/abhishek/traccar-integration-complete-guide-3khg</link>
      <guid>https://www.debug.school/abhishek/traccar-integration-complete-guide-3khg</guid>
      <description>&lt;p&gt;&lt;strong&gt;Traccar Integration — Complete Guide&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What is Traccar &amp;amp; Why It's Here
Traccar is an open-source GPS tracking server. In Motoshare, it is used to:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Register each vehicle's GPS device (identified by its IMEI number)&lt;br&gt;
Track live vehicle position (latitude, longitude, speed, etc.)&lt;br&gt;
Let partners open a live tracking map in the browser&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Architecture&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Mobile/Web App&lt;br&gt;
      │&lt;br&gt;
      ▼&lt;br&gt;
Laravel API (motoshare-web)&lt;br&gt;
      │&lt;br&gt;
      ├── TraccarService  ──► Traccar Server HTTP API  (port 8082)&lt;br&gt;
      │                            /api/users&lt;br&gt;
      │                            /api/devices&lt;br&gt;
      │                            /api/positions&lt;br&gt;
      │                            /api/session&lt;br&gt;
      │                            /api/session/token&lt;br&gt;
      │&lt;br&gt;
      ├── addvechicles table  (stores imei + traccar_device_id)&lt;br&gt;
      └── users table         (stores traccar_password)&lt;br&gt;
Two key database columns added by migrations:&lt;/p&gt;

&lt;p&gt;Table   Column  Purpose&lt;br&gt;
addvechicles    traccar_device_id   Cached Traccar internal device ID (skips IMEI lookup on every position call)&lt;br&gt;
users   traccar_password    Stored Traccar password for generating per-user JWT tokens&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Configuration (.env Variables)
Add these to your .env file:&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Traccar server URL — the backend API (Laravel calls this internally)
&lt;/h1&gt;

&lt;p&gt;TRACCAR_API_URL=&lt;a href="http://localhost:8082" rel="noopener noreferrer"&gt;http://localhost:8082&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Traccar admin credentials (must be a Traccar admin account)
&lt;/h1&gt;

&lt;p&gt;TRACCAR_API_ADMIN_EMAIL=&lt;a href="mailto:admin@example.com"&gt;admin@example.com&lt;/a&gt;&lt;br&gt;
TRACCAR_API_ADMIN_PASSWORD=your_admin_password&lt;/p&gt;

&lt;h1&gt;
  
  
  Traccar web UI URL (browser-facing, for the map redirect)
&lt;/h1&gt;

&lt;p&gt;TRACCAR_WEB_URL=&lt;a href="http://localhost:8082" rel="noopener noreferrer"&gt;http://localhost:8082&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  HTTP timeout in seconds
&lt;/h1&gt;

&lt;p&gt;TRACCAR_API_TIMEOUT=10&lt;/p&gt;

&lt;h1&gt;
  
  
  Set false on local dev if Traccar has a self-signed SSL cert
&lt;/h1&gt;

&lt;p&gt;TRACCAR_VERIFY_SSL=true&lt;/p&gt;

&lt;h1&gt;
  
  
  Master switch — set true to enable the integration
&lt;/h1&gt;

&lt;p&gt;TRACCAR_ENABLED=true&lt;br&gt;
Important: TRACCAR_API_URL and TRACCAR_WEB_URL can be different. API URL is what Laravel connects to (may be internal network). Web URL is what the browser opens (must be publicly reachable).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;All API Endpoints
4.1 Get Traccar JWT Token&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;GET /api/traccar/token&lt;br&gt;
Auth: Sanctum token required&lt;br&gt;
What it does: Generates a JWT for the logged-in user so the frontend can open the Traccar map UI.&lt;/p&gt;

&lt;p&gt;Response:&lt;/p&gt;

&lt;p&gt;{ "traccar_token": "eyJhbGciOi..." }&lt;br&gt;
Usage (frontend):&lt;/p&gt;

&lt;p&gt;// Open Traccar map for logged-in user&lt;br&gt;
const res = await axios.get('/api/traccar/token');&lt;br&gt;
window.open(&lt;code&gt;${TRACCAR_WEB_URL}?token=${res.data.traccar_token}&lt;/code&gt;);&lt;br&gt;
4.2 Get Live Vehicle Position&lt;/p&gt;

&lt;p&gt;GET /api/vehicles/{vehicleId}/position&lt;br&gt;
Auth: Sanctum token required&lt;br&gt;
What it does: Returns the latest GPS position for a vehicle by its Motoshare vehicle ID.&lt;/p&gt;

&lt;p&gt;Response:&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "vehicle_id": 42,&lt;br&gt;
  "imei": "123456789012345",&lt;br&gt;
  "latitude": 12.9716,&lt;br&gt;
  "longitude": 77.5946,&lt;br&gt;
  "speed": 0.0,&lt;br&gt;
  "course": 180.0,&lt;br&gt;
  "accuracy": 5.2,&lt;br&gt;
  "altitude": 920.0,&lt;br&gt;
  "device_time": "2026-06-02T10:30:00.000+0000",&lt;br&gt;
  "fix_time":    "2026-06-02T10:29:58.000+0000",&lt;br&gt;
  "attributes": { "ignition": true, "motion": false }&lt;br&gt;
}&lt;br&gt;
Error responses:&lt;/p&gt;

&lt;p&gt;{ "error": "Vehicle not found or no GPS device" }   // 404 — vehicle missing or no IMEI set&lt;br&gt;
{ "error": "No position data available" }            // 404 — device registered but no GPS fix yet&lt;br&gt;
{ "error": "Internal server error" }                 // 500&lt;br&gt;
4.3 Get Live Position by Booking&lt;/p&gt;

&lt;p&gt;GET /api/bookings/{bookingId}/position&lt;br&gt;
Auth: Sanctum token required&lt;br&gt;
What it does: Same as above but looks up the vehicle through a booking ID — useful for riders tracking their rented vehicle.&lt;/p&gt;

&lt;p&gt;Response: Same fields as 4.2 plus:&lt;/p&gt;

&lt;p&gt;{ "booking_id": 99, "vehicle_id": 42, ... }&lt;br&gt;
4.4 Open Tracker in Browser (Web Route)&lt;/p&gt;

&lt;p&gt;GET /tracker/launch&lt;br&gt;
Auth: Keycloak session (kc_auto middleware)&lt;br&gt;
What it does: Generates a Traccar JWT for the logged-in user, then serves a bridge page (traccar_bridge.blade.php) that:&lt;/p&gt;

&lt;p&gt;Deletes any existing Traccar browser session (so the JWT always wins)&lt;br&gt;
Redirects to TRACCAR_WEB_URL?token=&lt;br&gt;
How to trigger from sidebar/menu:&lt;/p&gt;

&lt;p&gt;&lt;a href="{{%20route('tracker.launch')%20}}"&gt;Open Tracker&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How the Service Works — Internal Flows
5.1 Registering a Vehicle's GPS Device
Triggered when: A vehicle is added/updated with an IMEI number via saveTraccarDevice().&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;uploadvechiclecontroller::update_vehiclestab()&lt;br&gt;
    │&lt;br&gt;
    └─► UtilityFunctionsController::saveTraccarDevice($request, $email, $vehicleId)&lt;br&gt;
            │&lt;br&gt;
            └─► TraccarService::saveDevice($request, $email, $vehicleId)&lt;br&gt;
                    │&lt;br&gt;
                    ├─ getUserByEmail($email)      → find/create Traccar user account&lt;br&gt;
                    ├─ syncDevice($request, ...)   → create or update Traccar device&lt;br&gt;
                    ├─ linkDeviceToUser(...)        → link device to user in Traccar&lt;br&gt;
                    └─ update addvechicles.traccar_device_id   ← cached for fast lookups&lt;br&gt;
Request fields needed: imei, brand, vehicleType, model&lt;/p&gt;

&lt;p&gt;5.2 Getting Position (Fast Path)&lt;br&gt;
Once traccar_device_id is cached on the vehicle:&lt;/p&gt;

&lt;p&gt;GET /api/vehicles/{id}/position&lt;br&gt;
    │&lt;br&gt;
    └─► resolveVehiclePosition($vehicle)&lt;br&gt;
            │&lt;br&gt;
            ├─ IF traccar_device_id set → getLatestPositionByDeviceId(id)   [1 HTTP call]&lt;br&gt;
            └─ IF only imei set        → getDeviceByUniqueId(imei)           [2 HTTP calls]&lt;br&gt;
                                          → getLatestPositionByDeviceId(id)&lt;br&gt;
Always register devices via saveTraccarDevice — it sets traccar_device_id and halves position lookup cost.&lt;/p&gt;

&lt;p&gt;5.3 JWT Token Generation for Map Access&lt;/p&gt;

&lt;p&gt;ensureUserToken($email)&lt;br&gt;
    │&lt;br&gt;
    ├─ resolveTraccarPassword($email, $laravelUser)&lt;br&gt;
    │       ├─ IF traccar_password stored in users table → return it            [0 HTTP calls]&lt;br&gt;
    │       ├─ IF Traccar account exists but no stored password → provisionTraccarPassword()&lt;br&gt;
    │       └─ IF no Traccar account → createUser() + store password&lt;br&gt;
    │&lt;br&gt;
    ├─ getSessionJwt($email, $password)&lt;br&gt;
    │       ├─ POST /api/session   (creates session cookie)&lt;br&gt;
    │       └─ POST /api/session/token  (exchanges cookie for JWT)&lt;br&gt;
    │&lt;br&gt;
    ├─ IF JWT fails (stale password) → retryWithFreshPassword() → getSessionJwt()&lt;br&gt;
    └─ IF all fails → adminSessionJwt() (admin fallback)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;TraccarService Public Methods Reference
Method  Description Called From
saveDevice($request, $email, $vehicleId)    Register/update a GPS device for a vehicle  saveTraccarDevice() wrappers
ensureUserToken($email) Get a Traccar JWT for a user    getTraccarToken, /tracker/launch
getUserByEmail($email)  Fetch Traccar user by email Internal
createUser($name, $email, $password)    Create a new Traccar user account   Internal
getDeviceByUniqueId($imei)  Fetch Traccar device by IMEI    Internal
createDevice($name, $imei, ...) Register a new GPS device   Internal
updateDevice($deviceId, ...)    Update an existing GPS device   Internal
linkDeviceToUser($userId, $deviceId)    Give user permission to see device  Internal
getLatestPosition($imei)    Get last GPS position by IMEI   resolveVehiclePosition
getLatestPositionByDeviceId($id)    Get last GPS position by device ID (fast)   resolveVehiclePosition&lt;/li&gt;
&lt;li&gt;Database Migrations
Two migrations were added:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;add_traccar_device_id_to_addvechicles_table&lt;/p&gt;

&lt;p&gt;ALTER TABLE addvechicles ADD COLUMN traccar_device_id INT NULL;&lt;br&gt;
add_traccar_password_to_users_table&lt;/p&gt;

&lt;p&gt;ALTER TABLE users ADD COLUMN traccar_password VARCHAR(255) NULL;&lt;br&gt;
Run with: php artisan migrate&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How to Add GPS Tracking to a Vehicle (Step by Step)
Step 1 — Vehicle must have an IMEI field set
When adding/editing a vehicle, pass imei in the request body.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 2 — saveTraccarDevice is called automatically&lt;br&gt;
uploadvechiclecontroller.php:1662 calls $this-&amp;gt;utilityController-&amp;gt;saveTraccarDevice($request, $useremail, $vehicleId) after vehicle save.&lt;/p&gt;

&lt;p&gt;Step 3 — Verify registration worked&lt;br&gt;
Check addvechicles table: traccar_device_id should be non-null for that vehicle.&lt;/p&gt;

&lt;p&gt;Step 4 — Poll position from frontend&lt;/p&gt;

&lt;p&gt;// Every 10 seconds&lt;br&gt;
setInterval(async () =&amp;gt; {&lt;br&gt;
  const res = await axios.get(&lt;code&gt;/api/vehicles/${vehicleId}/position&lt;/code&gt;);&lt;br&gt;
  map.setCenter({ lat: res.data.latitude, lng: res.data.longitude });&lt;br&gt;
}, 10000);&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Common Issues &amp;amp; Fixes
Symptom Cause   Fix
No position data available (404)    Device registered but GPS hasn't sent data yet  Wait for GPS hardware to get a satellite fix and transmit
Vehicle not found or no GPS device (404)    imei column is null/empty in DB Set IMEI when adding/editing the vehicle
JWT works once, then fails  Traccar session expired ensureUserToken auto-retries with a fresh password; if still failing check users.traccar_password column
traccar_device_id is null   saveTraccarDevice was never called or IMEI was blank    Re-save the vehicle with a valid IMEI
Admin fallback used constantly  Traccar user accounts not provisioning  Check logs for provisionTraccarPassword - PUT failed; verify admin credentials in .env
SSL errors on local dev Self-signed cert    Set TRACCAR_VERIFY_SSL=false in .env
Traccar returns all users instead of filtered   Admin token bypasses ?email= filter This is expected — the service filters client-side, works correctly
/tracker/launch shows blank TRACCAR_WEB_URL not set Add TRACCAR_WEB_URL to .env and run php artisan config:clear&lt;/li&gt;
&lt;li&gt;Quick Checklist for a Fresh Setup&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;☐ Traccar server running and accessible from Laravel server&lt;br&gt;
☐ TRACCAR_API_URL set (internal network URL)&lt;br&gt;
☐ TRACCAR_WEB_URL set (browser-accessible URL)&lt;br&gt;
☐ TRACCAR_API_ADMIN_EMAIL + TRACCAR_API_ADMIN_PASSWORD set&lt;br&gt;
☐ TRACCAR_ENABLED=true&lt;br&gt;
☐ php artisan migrate  (adds traccar_device_id + traccar_password columns)&lt;br&gt;
☐ php artisan config:clear&lt;br&gt;
☐ Add a vehicle with a valid IMEI → verify traccar_device_id populates in DB&lt;br&gt;
☐ Call GET /api/traccar/token → verify JWT returned&lt;br&gt;
☐ Call GET /api/vehicles/{id}/position → verify coordinates returned&lt;/p&gt;

</description>
    </item>
    <item>
      <title>End-to-End Flow: Motoshare App to Traccar Tracking</title>
      <dc:creator>Abhishek singh</dc:creator>
      <pubDate>Tue, 19 May 2026 11:27:26 +0000</pubDate>
      <link>https://www.debug.school/abhishek/end-to-end-flow-motoshare-app-to-traccar-tracking-2n8h</link>
      <guid>https://www.debug.school/abhishek/end-to-end-flow-motoshare-app-to-traccar-tracking-2n8h</guid>
      <description>&lt;p&gt;Below is the &lt;strong&gt;complete end-to-end flow&lt;/strong&gt; for adding one &lt;strong&gt;Track Vehicle&lt;/strong&gt; button in the &lt;strong&gt;Motoshare Flutter app&lt;/strong&gt; and opening &lt;strong&gt;Traccar tracking with Motoshare authentication&lt;/strong&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  End-to-End Flow: Motoshare App to Traccar Tracking
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. Main Requirement
&lt;/h2&gt;

&lt;p&gt;In the &lt;strong&gt;Motoshare Flutter app&lt;/strong&gt;, add one button:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Track Vehicle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When user clicks this button:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Motoshare Flutter App
        ↓
Track Vehicle Button
        ↓
Open Traccar Manager App / gps.motoshare.in
        ↓
Motoshare OAuth / OpenID Authentication
        ↓
Traccar Dashboard Opens
        ↓
User tracks allowed vehicles
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  2. Final Architecture
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Flutter App
        ↓
Laravel Backend
        ↓
Traccar Server
        ↓
gps.motoshare.in
        ↓
Traccar Manager App / Web Dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple meaning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Flutter App = Button and user action
Laravel = Authentication and Traccar device/user mapping
Traccar = GPS tracking system
Physical GPS Tracker = Sends vehicle location
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  3. Vehicle Registration Flow
&lt;/h1&gt;

&lt;p&gt;When vehicle is added in Motoshare:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User adds vehicle in Motoshare app
        ↓
User enters vehicle details + GPS IMEI
        ↓
Flutter sends data to Laravel backend
        ↓
Laravel saves vehicle in Motoshare database
        ↓
Laravel creates device in Traccar using Traccar API
        ↓
Laravel saves Traccar Device ID in vehicle table
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example vehicle data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vehicle Name: Honda Activa
Vehicle Number: JH05 AB 1234
GPS IMEI: 864895060123456
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Traccar, device should be created like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Device Name: Honda Activa - JH05 AB 1234
Unique ID: 864895060123456
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Important:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Unique ID = GPS tracker IMEI
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  4. Physical GPS Tracker Flow
&lt;/h1&gt;

&lt;p&gt;Live tracking will work only when physical GPS tracker sends data to Traccar.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Physical GPS tracker installed in vehicle
        ↓
SIM card inserted in GPS tracker
        ↓
Tracker configured with APN + gps.motoshare.in + correct port
        ↓
Tracker sends live location to gps.motoshare.in
        ↓
Vehicle becomes online in Traccar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example tracker setting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Server: gps.motoshare.in
Port: 5023 or correct device protocol port
APN: airtelgprs.com / jionet / www
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Important:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;8082 = Traccar web/API port
5023 or other protocol port = GPS tracker data port
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  5. Track Vehicle Button Flow in Flutter
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Simple Button Flow
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User opens Motoshare Flutter app
        ↓
Clicks Track Vehicle
        ↓
App opens Traccar Manager App or gps.motoshare.in
        ↓
Traccar checks login session
        ↓
If user is already authenticated, dashboard opens
        ↓
If user is not authenticated, Motoshare login opens
        ↓
After login, user returns to Traccar dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  6. Authentication Flow
&lt;/h1&gt;

&lt;p&gt;Your desired authentication flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Traccar Login
        ↓
Motoshare OAuth / OpenID Authentication
        ↓
Traccar Dashboard
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yes, it can automatically authenticate and go to dashboard if SSO/OpenID is configured properly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Case 1: User already has active Motoshare session
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Click Track Vehicle
        ↓
Open gps.motoshare.in / Traccar Manager
        ↓
Motoshare session found
        ↓
Auto authentication
        ↓
Traccar dashboard opens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Case 2: User does not have active Motoshare session
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Click Track Vehicle
        ↓
Open gps.motoshare.in / Traccar Manager
        ↓
Redirect to Motoshare login
        ↓
User enters login details
        ↓
Redirect back to Traccar
        ↓
Dashboard opens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So first-time login may be required. After login/session is saved, it can open dashboard directly next time.&lt;/p&gt;




&lt;h1&gt;
  
  
  7. Required Traccar OpenID Configuration
&lt;/h1&gt;

&lt;p&gt;Your Traccar config should have Motoshare OAuth/OpenID enabled.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;entry&lt;/span&gt; &lt;span class="na"&gt;key=&lt;/span&gt;&lt;span class="s"&gt;'web.url'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;https://gps.motoshare.in&lt;span class="nt"&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;entry&lt;/span&gt; &lt;span class="na"&gt;key=&lt;/span&gt;&lt;span class="s"&gt;'web.port'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;8082&lt;span class="nt"&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;entry&lt;/span&gt; &lt;span class="na"&gt;key=&lt;/span&gt;&lt;span class="s"&gt;'openid.force'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;true&lt;span class="nt"&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;entry&lt;/span&gt; &lt;span class="na"&gt;key=&lt;/span&gt;&lt;span class="s"&gt;'openid.issuerUrl'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;https://motoshare.in&lt;span class="nt"&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;entry&lt;/span&gt; &lt;span class="na"&gt;key=&lt;/span&gt;&lt;span class="s"&gt;'openid.authUrl'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;https://motoshare.in/oauth/authorize&lt;span class="nt"&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;entry&lt;/span&gt; &lt;span class="na"&gt;key=&lt;/span&gt;&lt;span class="s"&gt;'openid.tokenUrl'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;https://motoshare.in/oauth/token&lt;span class="nt"&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;entry&lt;/span&gt; &lt;span class="na"&gt;key=&lt;/span&gt;&lt;span class="s"&gt;'openid.userInfoUrl'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;https://motoshare.in/api/user&lt;span class="nt"&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Traccar login will use Motoshare authentication.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  8. Required Redirect URLs
&lt;/h1&gt;

&lt;p&gt;In Laravel OAuth/OpenID client settings, allow these callback URLs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://gps.motoshare.in/api/session/openid/callback
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Traccar Manager mobile app, also allow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;org.traccar.manager:/api/session/openid/callback
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are required so login can return back to Traccar after Motoshare authentication.&lt;/p&gt;




&lt;h1&gt;
  
  
  9. Flutter App Button Options
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Option A: Easiest and Most Reliable
&lt;/h2&gt;

&lt;p&gt;Open web dashboard:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://gps.motoshare.in
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Track Vehicle Button
        ↓
Open https://gps.motoshare.in
        ↓
Motoshare SSO login
        ↓
Traccar dashboard opens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is simplest and needs minimum coding.&lt;/p&gt;




&lt;h2&gt;
  
  
  Option B: Open Traccar Manager App
&lt;/h2&gt;

&lt;p&gt;Flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Track Vehicle Button
        ↓
Open Traccar Manager App
        ↓
Server URL: https://gps.motoshare.in
        ↓
Motoshare SSO login
        ↓
Traccar dashboard opens
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Important:&lt;/p&gt;

&lt;p&gt;First time, user may need to set server URL in Traccar Manager:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://gps.motoshare.in
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  10. Flutter Button Code: Simple Web Dashboard
&lt;/h1&gt;

&lt;p&gt;Use this for fastest implementation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:url_launcher/url_launcher.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;Future&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;openGpsTracking&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;Uri&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;Uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'https://gps.motoshare.in'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;launchUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;mode:&lt;/span&gt; &lt;span class="n"&gt;LaunchMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;externalApplication&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Button:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;ElevatedButton&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;onPressed:&lt;/span&gt; &lt;span class="n"&gt;openGpsTracking&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Track Vehicle'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  11. Flutter Button Code: Open Traccar Manager App
&lt;/h1&gt;

&lt;p&gt;Android package:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;org.traccar.manager
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Flutter dependencies:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;dependencies&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;url_launcher&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;^6.3.0&lt;/span&gt;
  &lt;span class="na"&gt;android_intent_plus&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;^5.0.2&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:android_intent_plus/android_intent.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="s"&gt;'package:url_launcher/url_launcher.dart'&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="n"&gt;Future&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="kt"&gt;void&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;openTraccarManager&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="kt"&gt;String&lt;/span&gt; &lt;span class="n"&gt;packageName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;'org.traccar.manager'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="n"&gt;intent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;AndroidIntent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nl"&gt;action:&lt;/span&gt; &lt;span class="s"&gt;'android.intent.action.MAIN'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;package:&lt;/span&gt; &lt;span class="n"&gt;packageName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;category:&lt;/span&gt; &lt;span class="s"&gt;'android.intent.category.LAUNCHER'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;intent&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;launch&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;final&lt;/span&gt; &lt;span class="kt"&gt;Uri&lt;/span&gt; &lt;span class="n"&gt;playStoreUrl&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;Uri&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="s"&gt;'https://play.google.com/store/apps/details?id=&lt;/span&gt;&lt;span class="si"&gt;$packageName&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;launchUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="n"&gt;playStoreUrl&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;mode:&lt;/span&gt; &lt;span class="n"&gt;LaunchMode&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;externalApplication&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Button:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;ElevatedButton&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;onPressed:&lt;/span&gt; &lt;span class="n"&gt;openTraccarManager&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;child:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;Text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;'Track Vehicle'&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  12. Laravel Backend Responsibilities
&lt;/h1&gt;

&lt;p&gt;Laravel should handle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Vehicle save
2. GPS IMEI save
3. Traccar device creation
4. Traccar Device ID save
5. User mapping with Traccar
6. Device permission assignment
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Vehicle table should store:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gps_imei
traccar_device_id
gps_enabled
gps_status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  13. Permission Flow
&lt;/h1&gt;

&lt;p&gt;Authentication only logs the user into Traccar.&lt;/p&gt;

&lt;p&gt;Vehicle visibility depends on Traccar permissions.&lt;/p&gt;

&lt;p&gt;Recommended:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Admin:
Can see all vehicles.

Partner:
Can see only own vehicles.

Renter:
Can see vehicle only during active booking, if required later.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Partner adds vehicle
        ↓
Laravel creates device in Traccar
        ↓
Laravel maps partner user in Traccar
        ↓
Laravel assigns device to partner user
        ↓
Partner opens Traccar Manager
        ↓
Partner sees only assigned vehicle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  14. Complete Final Flow
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Physical GPS tracker is installed in vehicle.

2. SIM card is inserted in GPS tracker.

3. GPS tracker is configured with:
   - APN
   - gps.motoshare.in
   - correct GPS protocol port

4. Vehicle is added in Motoshare Flutter app with GPS IMEI.

5. Flutter sends vehicle details to Laravel backend.

6. Laravel saves vehicle in Motoshare database.

7. Laravel creates device in Traccar using IMEI as Unique ID.

8. Laravel stores Traccar Device ID.

9. Laravel assigns vehicle/device permission to correct user.

10. User clicks Track Vehicle button in Flutter app.

11. App opens Traccar Manager App or https://gps.motoshare.in.

12. Traccar redirects to Motoshare OAuth/OpenID login.

13. If user session exists, authentication happens automatically.
    If not, user logs in once.

14. After successful login, user is redirected to Traccar dashboard.

15. User sees only allowed vehicles.

16. Live location appears because physical GPS tracker is sending data to gps.motoshare.in.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  15. Final Simple Summary
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Motoshare Flutter App:
Add Track Vehicle button.

Button Action:
Open Traccar Manager App or https://gps.motoshare.in.

Authentication:
Traccar uses Motoshare OAuth/OpenID.

Backend:
Laravel creates Traccar device and assigns user permission.

Tracking:
Physical GPS tracker sends live location to gps.motoshare.in.

Result:
User clicks Track Vehicle → auto/login with Motoshare → Traccar dashboard opens → vehicle tracking visible.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>GPS Tracking Integration Report for Motoshare</title>
      <dc:creator>Abhishek singh</dc:creator>
      <pubDate>Tue, 19 May 2026 11:02:40 +0000</pubDate>
      <link>https://www.debug.school/abhishek/gps-tracking-integration-report-for-motosharein-538j</link>
      <guid>https://www.debug.school/abhishek/gps-tracking-integration-report-for-motosharein-538j</guid>
      <description>&lt;h3&gt;
  
  
  GPS Tracking Integration Report for Motoshare.in
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Project
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Motoshare.in Vehicle GPS Tracking Setup&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Tracking Server
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Traccar Server:&lt;/strong&gt; &lt;code&gt;gps.motoshare.in&lt;/code&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  1. Current Understanding
&lt;/h1&gt;

&lt;p&gt;We have already developed a vehicle management system for &lt;strong&gt;Motoshare.in&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Current completed flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Motoshare Vehicle Add Form
        ↓
Vehicle Details + GPS IMEI
        ↓
Create Device in gps.motoshare.in through Traccar API
        ↓
Vehicle appears in Traccar dashboard
        ↓
Tracking should happen directly on gps.motoshare.in
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The main requirement is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When a vehicle is added in Motoshare.in with a GPS tracker IMEI number, that device should be created in Traccar, and all vehicles should be tracked directly on the Traccar map at &lt;code&gt;gps.motoshare.in&lt;/code&gt;.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Currently, we do &lt;strong&gt;not&lt;/strong&gt; need to integrate the live tracking map inside &lt;code&gt;motoshare.in&lt;/code&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  2. Important Clarification
&lt;/h1&gt;

&lt;p&gt;Adding the IMEI number in Traccar only creates a &lt;strong&gt;device record&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It does &lt;strong&gt;not automatically start live tracking&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For live tracking, one GPS source must send location data to Traccar.&lt;/p&gt;

&lt;p&gt;There are two options:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Option 1: Traccar Client Mobile App
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yes, possible, but please understand clearly:&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1: Traccar Client Mobile App
&lt;/h2&gt;

&lt;p&gt;This tracks the &lt;strong&gt;mobile phone location&lt;/strong&gt;, not the physical vehicle tracker.&lt;/p&gt;

&lt;p&gt;Flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Mobile Phone + Traccar Client App
        ↓
Phone GPS location
        ↓
gps.motoshare.in
        ↓
Shows as one device in Traccar map
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use this when you want to track:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Driver phone
Renter phone
Staff phone
Temporary testing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Physical GPS Tracker Device
&lt;/h2&gt;

&lt;p&gt;This tracks the &lt;strong&gt;actual vehicle location&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Physical GPS Tracker installed in vehicle
        ↓
SIM card inside tracker
        ↓
gps.motoshare.in
        ↓
Shows vehicle location in Traccar map
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use this when you want to track:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Bike
Car
Rental vehicle
Fleet vehicle
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Can both be used together?
&lt;/h2&gt;

&lt;p&gt;Yes, both can be used together, but they should be added as &lt;strong&gt;separate devices&lt;/strong&gt; in Traccar.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Device 1:
Name: Honda Activa - Vehicle Tracker
Unique ID: 864895060123456
Source: Physical GPS tracker IMEI

Device 2:
Name: Driver Phone - Rakesh
Unique ID: 7709488616-driver
Source: Traccar Client mobile app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Important
&lt;/h2&gt;

&lt;p&gt;Do &lt;strong&gt;not&lt;/strong&gt; use the same Unique ID for both mobile app and physical tracker.&lt;/p&gt;

&lt;p&gt;Each device must have a different Unique ID.&lt;/p&gt;

&lt;h2&gt;
  
  
  Simple Answer
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Traccar Client App = tracks mobile phone
Physical GPS Tracker = tracks vehicle

For Motoshare vehicle tracking, physical GPS tracker is best.
For testing or driver/renter tracking, Traccar Client app can be used.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So if your goal is &lt;strong&gt;track vehicle&lt;/strong&gt;, then use &lt;strong&gt;physical GPS tracker device&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;If your goal is &lt;strong&gt;test gps.motoshare.in quickly&lt;/strong&gt;, then use &lt;strong&gt;Traccar Client App&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 2: Physical GPS Tracker Device
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Option 2: Physical GPS Tracker Device
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since we do not want to use the Traccar Client mobile app, we need to use a &lt;strong&gt;physical GPS tracker device&lt;/strong&gt; installed in each vehicle.&lt;/p&gt;




&lt;h1&gt;
  
  
  3. Final Required Flow Without Traccar Client App
&lt;/h1&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Physical GPS Tracker installed in vehicle
        ↓
SIM card inserted inside GPS tracker
        ↓
GPS tracker configured with server + port + APN
        ↓
GPS tracker sends location data to gps.motoshare.in
        ↓
Traccar receives GPS data
        ↓
Vehicle becomes online in Traccar dashboard
        ↓
Admin tracks all vehicles on gps.motoshare.in map
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  4. What is Required for Each Vehicle?
&lt;/h1&gt;

&lt;p&gt;For each vehicle, we need:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Physical GPS tracker device
2. SIM card with active internet
3. GPS tracker IMEI number
4. Correct GPS tracker password
5. Correct SMS command format
6. Correct Traccar protocol port
7. Device added in Traccar using IMEI as Unique ID
8. Device configured to send data to gps.motoshare.in
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  5. Example Setup
&lt;/h1&gt;

&lt;p&gt;Example vehicle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Vehicle Name: Honda Activa
Vehicle Number: JH05 AB 1234
GPS Tracker IMEI: 864895060123456
GPS Tracker SIM Number: 85485125324
Traccar Server: gps.motoshare.in
GPS Port: 5023
SIM Provider: Airtel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Traccar, add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Device Name: Honda Activa - JH05 AB 1234
Unique ID: 864895060123456
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Important:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Unique ID = GPS tracker IMEI number
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The SIM number and IMEI number are different.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SIM Number = number where SMS commands are sent
IMEI Number = unique GPS device ID added in Traccar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  6. SMS Command Explanation
&lt;/h1&gt;

&lt;p&gt;GPS devices are configured by sending SMS commands to the SIM number inside the GPS tracker.&lt;/p&gt;

&lt;p&gt;These commands are sent from our mobile phone to the GPS tracker SIM.&lt;/p&gt;

&lt;p&gt;Example GPS tracker SIM number:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;85485125324
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Command 1: APN Setting
&lt;/h2&gt;

&lt;p&gt;Template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apn&amp;lt;PASSWORD&amp;gt; &amp;lt;SIM_APN&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example for Airtel:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apn123456 airtelgprs.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Meaning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GPS device, use Airtel internet.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Breakdown:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apn = internet setting command
123456 = GPS tracker password
airtelgprs.com = Airtel APN
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Jio:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apn123456 jionet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Vi:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apn123456 www
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Command 2: Server/IP Setting
&lt;/h2&gt;

&lt;p&gt;Template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;adminip&amp;lt;PASSWORD&amp;gt; &amp;lt;SERVER_DOMAIN&amp;gt; &amp;lt;PORT&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;adminip123456 gps.motoshare.in 5023
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Meaning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GPS device, send location data to gps.motoshare.in on port 5023.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Breakdown:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;adminip = server/IP setting command
123456 = GPS tracker password
gps.motoshare.in = Traccar server
5023 = GPS tracker protocol port
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Final target:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gps.motoshare.in:5023
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Command 3: Upload Interval Setting
&lt;/h2&gt;

&lt;p&gt;Template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;upload&amp;lt;PASSWORD&amp;gt; &amp;lt;SECONDS&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;upload123456 30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Meaning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GPS device, send location every 30 seconds.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Breakdown:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;upload = location sending interval command
123456 = GPS tracker password
30 = every 30 seconds
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  7. Complete Example SMS Flow
&lt;/h1&gt;

&lt;p&gt;If SIM is Airtel and password is &lt;code&gt;123456&lt;/code&gt;, send these SMS messages one by one to the GPS tracker SIM number:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;apn123456 airtelgprs.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;adminip123456 gps.motoshare.in 5023
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;upload123456 30
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple meaning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Use Airtel internet.
2. Send GPS location to gps.motoshare.in on port 5023.
3. Send location every 30 seconds.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  8. Important: Commands Can Be Different
&lt;/h1&gt;

&lt;p&gt;The above commands are common examples.&lt;/p&gt;

&lt;p&gt;But every GPS tracker brand/model can have a different SMS command format.&lt;/p&gt;

&lt;p&gt;Some trackers use this format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APN,airtelgprs.com#
SERVER,gps.motoshare.in,5023#
TIMER,30#
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;adminip123456 gps.motoshare.in 5023
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some devices may use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SERVER,gps.motoshare.in,5023
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the exact command must be confirmed from the GPS tracker manual or seller.&lt;/p&gt;




&lt;h1&gt;
  
  
  9. About Onelap GPS Tracker
&lt;/h1&gt;

&lt;p&gt;We are using &lt;strong&gt;Onelap&lt;/strong&gt; device.&lt;/p&gt;

&lt;p&gt;Important limitation:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Onelap devices may be locked to Onelap’s own platform by default.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So before using Onelap device with &lt;code&gt;gps.motoshare.in&lt;/code&gt;, we must confirm whether Onelap allows a custom server configuration.&lt;/p&gt;

&lt;p&gt;We need to ask Onelap support:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;I want to connect my Onelap GPS tracker with my own Traccar server.

Server: gps.motoshare.in

Please provide:
1. SMS command password
2. APN SMS command format
3. Server/IP/domain and port SMS command format
4. Upload interval SMS command format
5. Device protocol name
6. Correct Traccar-compatible port
7. Confirmation whether this device supports custom server or not
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If Onelap does not allow custom server configuration, then the device cannot directly send GPS data to &lt;code&gt;gps.motoshare.in&lt;/code&gt;.&lt;/p&gt;




&lt;h1&gt;
  
  
  10. Where to Find GPS Tracker Password?
&lt;/h1&gt;

&lt;p&gt;GPS tracker password is the password of the &lt;strong&gt;physical GPS device&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It is not:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Traccar password
Server password
Motoshare login password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is used inside SMS commands.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;adminip123456 gps.motoshare.in 5023
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;123456 = GPS tracker password
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where to get it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. GPS tracker manual
2. Device sticker or box
3. GPS tracker seller
4. Onelap support
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Common default passwords:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;123456
000000
888888
1234
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Most trackers commonly use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;123456
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But for Onelap, we should confirm from Onelap support.&lt;/p&gt;




&lt;h1&gt;
  
  
  11. What is Port 8082?
&lt;/h1&gt;

&lt;p&gt;Our Traccar config currently shows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;entry&lt;/span&gt; &lt;span class="na"&gt;key=&lt;/span&gt;&lt;span class="s"&gt;'web.port'&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;8082&lt;span class="nt"&gt;&amp;lt;/entry&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;8082 = Traccar web dashboard/API port
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is used to open:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://gps.motoshare.in
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But physical GPS trackers usually do &lt;strong&gt;not&lt;/strong&gt; send GPS data to port &lt;code&gt;8082&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For GPS tracker data, we need a &lt;strong&gt;protocol port&lt;/strong&gt;, for example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;5023
5027
5055
5086
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The correct port depends on the GPS tracker model/protocol.&lt;/p&gt;

&lt;p&gt;So this is wrong for most physical trackers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SERVER,gps.motoshare.in,8082
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Correct format should be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SERVER,gps.motoshare.in,&amp;lt;GPS_PROTOCOL_PORT&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SERVER,gps.motoshare.in,5023
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  12. How to Find Active Traccar Ports on Server?
&lt;/h1&gt;

&lt;p&gt;Run this command on the server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ss &lt;span class="nt"&gt;-tulnp&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;java
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;netstat &lt;span class="nt"&gt;-tulnp&lt;/span&gt; | &lt;span class="nb"&gt;grep &lt;/span&gt;java
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will show which ports Traccar is listening on.&lt;/p&gt;

&lt;p&gt;Example output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;0.0.0.0:8082
0.0.0.0:5023
0.0.0.0:5055
0.0.0.0:5027
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Meaning:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;8082 = Web/API port
5023 = GPS protocol port
5055 = OsmAnd / Traccar Client type port
5027 = Teltonika type port
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  13. Firewall Requirement
&lt;/h1&gt;

&lt;p&gt;If the GPS tracker uses port &lt;code&gt;5023&lt;/code&gt;, then this port must be open on the server.&lt;/p&gt;

&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw allow 5023/tcp
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw allow 5023/udp
&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw reload
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the server is hosted on AWS/Cloud, also open the same port in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Security Group / Firewall Inbound Rules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Custom TCP: 5023 from 0.0.0.0/0
Custom UDP: 5023 from 0.0.0.0/0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  14. How to Check Whether Device Is Connecting?
&lt;/h1&gt;

&lt;p&gt;Check Traccar logs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo tail&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; /opt/traccar/logs/tracker-server.log
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then power on the GPS device or send the server command again.&lt;/p&gt;

&lt;p&gt;If the device connects, logs should show device activity.&lt;/p&gt;

&lt;p&gt;Also check Traccar dashboard:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://gps.motoshare.in
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected result:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Device status: Online
Last update time: Current
Latitude/Longitude: Visible
Vehicle marker: Visible on map
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  15. Limitations
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. IMEI registration alone is not enough
&lt;/h2&gt;

&lt;p&gt;Adding IMEI in Traccar only creates the device.&lt;/p&gt;

&lt;p&gt;It will not show live tracking unless the physical GPS tracker sends location data.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Correct port is mandatory
&lt;/h2&gt;

&lt;p&gt;If the wrong port is configured, the device will not connect.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;8082 is web/API port, not GPS data port.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The GPS tracker needs the correct protocol port.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. GPS tracker model dependency
&lt;/h2&gt;

&lt;p&gt;Every GPS tracker has different:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SMS command format
Default password
Protocol
Port
Server setting method
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So we must know the exact device model.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Onelap may be locked
&lt;/h2&gt;

&lt;p&gt;Onelap device may be locked to Onelap’s own server/app.&lt;/p&gt;

&lt;p&gt;If custom server is not supported, we cannot directly connect it to Traccar.&lt;/p&gt;

&lt;p&gt;Possible options then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Use Onelap dashboard/app
2. Ask Onelap for API access
3. Use a Traccar-compatible GPS tracker
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  5. SIM internet is required
&lt;/h2&gt;

&lt;p&gt;The SIM inside the GPS tracker must have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Active internet data
SMS service
Correct APN
Network coverage
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without SIM internet, the tracker cannot send live location.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Server firewall must allow GPS port
&lt;/h2&gt;

&lt;p&gt;Even if the GPS tracker is configured correctly, it will not connect if the port is blocked.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. IMEI must match
&lt;/h2&gt;

&lt;p&gt;The IMEI added in Traccar must exactly match the real GPS tracker IMEI.&lt;/p&gt;

&lt;p&gt;If IMEI is wrong, Traccar may receive data but not match it with the device.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. GPS signal required
&lt;/h2&gt;

&lt;p&gt;If the device is indoors, underground, or has poor satellite signal, the location may not update properly.&lt;/p&gt;




&lt;h1&gt;
  
  
  16. Final Implementation Checklist
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Motoshare Side
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Add GPS IMEI field in vehicle form.
2. Save GPS IMEI in Motoshare database.
3. Call Traccar API to create device.
4. Save Traccar device ID in Motoshare database.
5. Prevent duplicate IMEI.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Traccar Side
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Device should be created with IMEI as Unique ID.
2. Correct GPS protocol port should be active.
3. Required port should be open in firewall/security group.
4. Logs should be monitored for GPS connection.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  GPS Device Side
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. Insert active SIM card.
2. Configure APN.
3. Configure server: gps.motoshare.in.
4. Configure correct port.
5. Configure upload interval.
6. Power on device.
7. Verify device online in Traccar.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h1&gt;
  
  
  17. Final Summary
&lt;/h1&gt;

&lt;p&gt;We have already completed the basic integration where vehicles added in &lt;strong&gt;Motoshare.in&lt;/strong&gt; can be registered as GPS devices in &lt;strong&gt;Traccar&lt;/strong&gt; using their GPS IMEI number.&lt;/p&gt;

&lt;p&gt;However, live tracking does not start only by saving the IMEI. For live tracking, each vehicle must have a physical GPS tracker device installed with an active SIM card. The tracker must be configured to send location data to our Traccar server &lt;code&gt;gps.motoshare.in&lt;/code&gt; using the correct GPS protocol port.&lt;/p&gt;

&lt;p&gt;The Traccar web/API port is &lt;code&gt;8082&lt;/code&gt;, but this is not normally used for physical GPS device data. We need the correct tracker protocol port based on the GPS device model.&lt;/p&gt;

&lt;p&gt;Since we are using an &lt;strong&gt;Onelap&lt;/strong&gt; GPS tracker, the main dependency is confirmation from Onelap whether the device supports a custom server. If Onelap allows custom server configuration, they must provide the SMS command format, password, APN command, server/IP command, upload interval command, and correct Traccar-compatible port.&lt;/p&gt;

&lt;p&gt;If Onelap does not allow custom server configuration, the device cannot directly connect to &lt;code&gt;gps.motoshare.in&lt;/code&gt;. In that case, we need either Onelap API integration or a Traccar-compatible physical GPS tracker.&lt;/p&gt;

&lt;p&gt;Final production flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Motoshare.in
        ↓
Add vehicle with GPS IMEI
        ↓
Create device in gps.motoshare.in
        ↓
Install physical GPS tracker in vehicle
        ↓
Configure tracker with SIM APN + gps.motoshare.in + correct port
        ↓
Tracker sends live location to Traccar
        ↓
Admin tracks all vehicles on gps.motoshare.in
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Google Sign-In on Play Store — Troubleshooting Guide</title>
      <dc:creator>Abhishek singh</dc:creator>
      <pubDate>Thu, 07 May 2026 07:31:43 +0000</pubDate>
      <link>https://www.debug.school/abhishek/google-sign-in-on-play-store-troubleshooting-guide-4328</link>
      <guid>https://www.debug.school/abhishek/google-sign-in-on-play-store-troubleshooting-guide-4328</guid>
      <description>&lt;h1&gt;
  
  
  Google Sign-In on Play Store — Troubleshooting Guide
&lt;/h1&gt;

&lt;p&gt;A complete, copy-pasteable guide for resolving the &lt;strong&gt;#1 cause of Google&lt;br&gt;
Sign-In failure on Play Store builds&lt;/strong&gt;: SHA-1 fingerprint mismatch between&lt;br&gt;
your local builds and the Play App Signing key.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Confirmed working: &lt;strong&gt;2026-05-07&lt;/strong&gt;. Project: &lt;code&gt;motoshare_driver_admin&lt;/code&gt;,&lt;br&gt;
Cloud project: &lt;code&gt;motoshare-a61eb&lt;/code&gt; (display name &lt;code&gt;Motoshare&lt;/code&gt;).&lt;/p&gt;
&lt;/blockquote&gt;


&lt;h2&gt;
  
  
  1. Symptoms
&lt;/h2&gt;

&lt;p&gt;The bug always presents the same way:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Build&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;flutter run&lt;/code&gt; (debug build on emulator)&lt;/td&gt;
&lt;td&gt;Google Sign-In &lt;strong&gt;works&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;flutter run --release&lt;/code&gt; on a USB-connected phone&lt;/td&gt;
&lt;td&gt;Google Sign-In &lt;strong&gt;works&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Side-loaded local APK / AAB&lt;/td&gt;
&lt;td&gt;Google Sign-In &lt;strong&gt;works&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;App downloaded from Play Store / Internal testing track&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Google Sign-In silently fails&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Common error patterns reported by users:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;"Sign-In failed" toast right after picking an account&lt;/li&gt;
&lt;li&gt;Account picker opens but never returns&lt;/li&gt;
&lt;li&gt;Plugin throws &lt;code&gt;PlatformException(sign_in_failed, …, status: 12500)&lt;/code&gt; or status &lt;code&gt;10&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your Sign-In fails on any other build (e.g. emulator), this is &lt;strong&gt;not the&lt;br&gt;
bug&lt;/strong&gt; described here — see Section 7 — When this guide doesn't apply.&lt;/p&gt;


&lt;h2&gt;
  
  
  2. Why it happens — the root cause
&lt;/h2&gt;

&lt;p&gt;When you upload an &lt;code&gt;.aab&lt;/code&gt; to Google Play, Google &lt;strong&gt;strips your signature and&lt;br&gt;
re-signs the app with their own key&lt;/strong&gt; (the "App signing by Google Play"&lt;br&gt;
feature, mandatory since 2021). This means three different signing keys are&lt;br&gt;
in play, with three different SHA-1 fingerprints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                                                  SHA-1 fingerprint
                                                  ─────────────────
[1]  flutter run / debug builds      → debug key      AA:BB:CC:...
[2]  flutter build appbundle         → upload key     DD:EE:FF:...
[3]  Install from Play Store         → Google's       11:22:33:...
                                       app signing
                                       key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Google Sign-In's Android client checks the running app's signature against&lt;br&gt;
the SHA-1s registered on its OAuth Android client. If the SHA-1 doesn't&lt;br&gt;
match, sign-in is rejected before any UI even appears.&lt;/p&gt;

&lt;p&gt;Most developers register only key &lt;a href="https://www.debug.schooldebug"&gt;1&lt;/a&gt; or &lt;a href="https://www.debug.schoolupload"&gt;2&lt;/a&gt;. Key [3] is&lt;br&gt;
controlled by Google and lives in Play Console — it's not on your machine,&lt;br&gt;
which is why this bug never reproduces locally.&lt;/p&gt;


&lt;h2&gt;
  
  
  3. Architecture: where SHA-1s need to be
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                                                  ┌──────────────────────┐
                                                  │  Google Cloud OAuth  │
   Phone runs APK signed with one of these keys → │  Android client(s)   │
                                                  │  for package         │
   ┌──────────┐  ┌──────────┐  ┌──────────────┐   │  com.cotocus...      │
   │ Debug    │  │ Upload   │  │ App signing  │ ←─┤  Each client holds   │
   │ keystore │  │ keystore │  │ (Google)     │   │  exactly ONE SHA-1   │
   └──────────┘  └──────────┘  └──────────────┘   └──────────────────────┘
        │             │              │
        SHA-1 [1]    SHA-1 [2]      SHA-1 [3]   ← all three must be
                                                  registered against the
                                                  same package name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Because each Android OAuth client only allows &lt;strong&gt;one&lt;/strong&gt; SHA-1, you need&lt;br&gt;
&lt;strong&gt;multiple Android OAuth clients with the same package name&lt;/strong&gt;, one per&lt;br&gt;
SHA-1. Google's auth servers accept whichever SHA-1 matches the running&lt;br&gt;
build.&lt;/p&gt;


&lt;h2&gt;
  
  
  4. The fix — step by step
&lt;/h2&gt;

&lt;p&gt;Total time: ~5 minutes. &lt;strong&gt;No app rebuild or new release upload required.&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1 — Get the &lt;strong&gt;App signing key&lt;/strong&gt; SHA-1 from Play Console
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;a href="https://play.google.com/console" rel="noopener noreferrer"&gt;Play Console&lt;/a&gt; → select your app.&lt;/li&gt;
&lt;li&gt;Left sidebar → &lt;strong&gt;Test and release&lt;/strong&gt; → &lt;strong&gt;App integrity&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Find the &lt;strong&gt;App signing&lt;/strong&gt; section. Click to expand if needed.&lt;/li&gt;
&lt;li&gt;Two certificates appear:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;App signing key certificate         ← copy SHA-1 from THIS one
  SHA-1: 11:22:33:44:55:66:...
  SHA-256: ...

Upload key certificate
  SHA-1: DD:EE:FF:...
  SHA-256: ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Copy the &lt;strong&gt;SHA-1&lt;/strong&gt; under &lt;strong&gt;App signing key certificate&lt;/strong&gt;. It will look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;9A:04:19:E7:58:68:3A:70:7B:7D:5B:D1:28:91:36:5C:B1:3C:5E:D7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(40 hex chars separated by colons.)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Critical:&lt;/strong&gt; copy from &lt;em&gt;App signing key certificate&lt;/em&gt;, &lt;strong&gt;not&lt;/strong&gt; from&lt;br&gt;
&lt;em&gt;Upload key certificate&lt;/em&gt;. They are different keys.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Step 2 — Add a new Android OAuth client in Google Cloud Console
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;a href="https://console.cloud.google.com/" rel="noopener noreferrer"&gt;Google Cloud Console&lt;/a&gt; → make sure
the project selector at the top shows the &lt;strong&gt;same project&lt;/strong&gt; that your app
uses for Sign-In. (For this repo: &lt;code&gt;Motoshare&lt;/code&gt; / &lt;code&gt;motoshare-a61eb&lt;/code&gt;.)&lt;/li&gt;
&lt;li&gt;Sidebar → &lt;strong&gt;APIs &amp;amp; Services&lt;/strong&gt; → &lt;strong&gt;Credentials&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Top bar → &lt;strong&gt;+ CREATE CREDENTIALS&lt;/strong&gt; → &lt;strong&gt;OAuth client ID&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Fill in:&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Application type&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Android&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Name&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;&amp;lt;your-app&amp;gt; (play signing)&lt;/code&gt; — anything descriptive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Package name&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Same as your existing Android client&lt;/strong&gt; (e.g. &lt;code&gt;com.cotocus.motoshare_driver_admin&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SHA-1 certificate fingerprint&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Paste the SHA-1 from Step 1&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You should now see &lt;strong&gt;two Android OAuth clients&lt;/strong&gt; in the Credentials list,&lt;br&gt;
both with the same package name but different SHA-1s. &lt;strong&gt;Keep both&lt;/strong&gt; — do&lt;br&gt;
not delete the original. The original SHA-1 still serves your local debug&lt;br&gt;
and upload-signed builds.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3 — Verify OAuth consent screen is published
&lt;/h3&gt;

&lt;p&gt;This is a frequent secondary cause of Play Store failures.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sidebar → &lt;strong&gt;Google Auth Platform&lt;/strong&gt; → &lt;strong&gt;Audience&lt;/strong&gt; (formerly "OAuth
consent screen").&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Publishing status&lt;/strong&gt; must be &lt;strong&gt;In production&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;User type&lt;/strong&gt; should be &lt;strong&gt;External&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;If status says &lt;strong&gt;Testing&lt;/strong&gt;, click &lt;strong&gt;PUBLISH APP&lt;/strong&gt; → confirm.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;Apps in &lt;strong&gt;Testing&lt;/strong&gt; mode only allow sign-in for explicitly-added test&lt;br&gt;
users. Anyone else gets an error regardless of SHA-1.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  Step 4 — Confirm the Web client ID in Flutter code
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;google_sign_in&lt;/code&gt; plugin needs the &lt;strong&gt;Web&lt;/strong&gt; client ID to issue ID tokens,&lt;br&gt;
&lt;strong&gt;not&lt;/strong&gt; the Android client ID. Open your code where &lt;code&gt;GoogleSignIn&lt;/code&gt; is&lt;br&gt;
configured:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// lib/src/shared/providers.dart&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;_googleWebClientId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
    &lt;span class="s"&gt;'335553606969-k446g8jjeclomdbf4etgdgdgdfdddrhs5.apps.googleusercontent.com'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Verify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Type is &lt;strong&gt;Web application&lt;/strong&gt; (not Android)&lt;/li&gt;
&lt;li&gt;It lives in the &lt;strong&gt;same Cloud project&lt;/strong&gt; as your Android clients&lt;/li&gt;
&lt;li&gt;The string matches the &lt;code&gt;Client ID&lt;/code&gt; shown for the Web OAuth client in
Cloud Console → Credentials&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For this repo it should match &lt;code&gt;motoshare-driver-admin-web&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5 — Test
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;No rebuild, no new release upload&lt;/strong&gt; — these changes are server-side.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Wait &lt;strong&gt;5–10 minutes&lt;/strong&gt; for Google's auth servers to propagate.&lt;/li&gt;
&lt;li&gt;On a real phone:

&lt;ul&gt;
&lt;li&gt;Uninstall the Play Store version&lt;/li&gt;
&lt;li&gt;Re-install from Play Store (Internal testing track is fine)&lt;/li&gt;
&lt;li&gt;Tap Google Sign-In → pick account → should succeed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  5. Verifying you actually fixed it
&lt;/h2&gt;

&lt;p&gt;After ~10 minutes of normal use, return to the new OAuth client in Cloud&lt;br&gt;
Console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APIs &amp;amp; Services → Credentials → click your new "(play signing)" client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Look at &lt;strong&gt;Last used date&lt;/strong&gt; in the right-hand panel. If it shows today's&lt;br&gt;
date, your Play Store APK is actively reaching this client and SHA-1&lt;br&gt;
matching is working.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Last used date    May 7, 2026 (Note: this data could be delayed by a day
                  or more.)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That timestamp is the strongest single signal that the fix worked.&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Common pitfalls
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Pitfall: copied the &lt;em&gt;Upload key&lt;/em&gt; SHA-1 instead of &lt;em&gt;App signing key&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Both certificates are listed on the same page in Play Console. They are&lt;br&gt;
different keys. Only the &lt;strong&gt;App signing key certificate&lt;/strong&gt; SHA-1 fixes this&lt;br&gt;
bug.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pitfall: deleted the old Android client
&lt;/h3&gt;

&lt;p&gt;Don't. The original client's SHA-1 covers your &lt;strong&gt;debug&lt;/strong&gt; and &lt;strong&gt;release-built&lt;br&gt;
local&lt;/strong&gt; APKs. Deleting it breaks &lt;code&gt;flutter run&lt;/code&gt; and any side-loaded build.&lt;br&gt;
Keep both Android clients alive.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pitfall: pasted the SHA-1 into the wrong Cloud project
&lt;/h3&gt;

&lt;p&gt;Many teams have multiple Cloud projects (in this repo there's also a&lt;br&gt;
&lt;code&gt;Motoshare Old&lt;/code&gt;). The SHA-1 must go into the &lt;strong&gt;same project&lt;/strong&gt; that your&lt;br&gt;
Web client lives in — otherwise the Web ID token issued at runtime can't&lt;br&gt;
be matched to the Android client. Confirm the project selector at the top&lt;br&gt;
of Cloud Console matches the one referenced by &lt;code&gt;_googleWebClientId&lt;/code&gt; in&lt;br&gt;
your Flutter code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pitfall: tried to "Link Cloud project" in Play Console and got "Project not found"
&lt;/h3&gt;

&lt;p&gt;That's a separate feature for the &lt;strong&gt;Play Integrity API&lt;/strong&gt;, unrelated to&lt;br&gt;
Google Sign-In. The error means your account isn't an Owner on the Cloud&lt;br&gt;
project. Skip this — Sign-In doesn't require it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pitfall: still in Testing mode
&lt;/h3&gt;

&lt;p&gt;Even with the right SHA-1, an OAuth consent screen in &lt;strong&gt;Testing&lt;/strong&gt; mode&lt;br&gt;
blocks every Google account that isn't on the test users list. Push to&lt;br&gt;
&lt;strong&gt;In production&lt;/strong&gt; under Audience.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pitfall: passing the Android client ID as &lt;code&gt;serverClientId&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;The &lt;code&gt;google_sign_in&lt;/code&gt; plugin needs the &lt;strong&gt;Web&lt;/strong&gt; client ID. Android client&lt;br&gt;
IDs don't issue ID tokens. Symptom: account picker works, but the backend&lt;br&gt;
ID-token verification fails afterward.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pitfall: &lt;code&gt;google-services.json&lt;/code&gt; references the wrong project
&lt;/h3&gt;

&lt;p&gt;If your repo uses Firebase tooling, an outdated &lt;code&gt;android/app/google-services.json&lt;/code&gt;&lt;br&gt;
can pin Sign-In to a stale project. Re-download it from Firebase Console&lt;br&gt;
(or delete it entirely if you don't use Firebase — &lt;code&gt;google_sign_in&lt;/code&gt; works&lt;br&gt;
without it as long as &lt;code&gt;serverClientId&lt;/code&gt; is hard-coded).&lt;/p&gt;




&lt;h2&gt;
  
  
  7. When this guide doesn't apply
&lt;/h2&gt;

&lt;p&gt;This guide solves &lt;strong&gt;only&lt;/strong&gt; the Play-Store-specific Sign-In failure. If&lt;br&gt;
Sign-In is broken in &lt;strong&gt;all&lt;/strong&gt; environments (emulator, local APK, Play&lt;br&gt;
Store), you have a different bug. Likely culprits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Wrong package name in the OAuth client (must exactly match &lt;code&gt;applicationId&lt;/code&gt; in &lt;code&gt;android/app/build.gradle.kts&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;serverClientId&lt;/code&gt; pointing at a deleted or wrong-project Web client&lt;/li&gt;
&lt;li&gt;OAuth consent screen requesting unverified sensitive scopes&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;google_sign_in&lt;/code&gt; plugin version mismatch with &lt;code&gt;google_sign_in_android&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;MainActivity&lt;/code&gt; not extending &lt;code&gt;FlutterFragmentActivity&lt;/code&gt; (for plugins that need it)&lt;/li&gt;
&lt;li&gt;Backend rejecting the ID token (audience or issuer mismatch in Keycloak)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Use &lt;code&gt;adb logcat | grep -iE "googlesignin|gms|auth"&lt;/code&gt; while reproducing the&lt;br&gt;
failure to capture the exact error code. Status code reference:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;12500&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;SIGN_IN_FAILED&lt;/code&gt; — usually SHA-1 / package mismatch&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;12501&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;User cancelled&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;12502&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sign-in already in progress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;10&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;DEVELOPER_ERROR&lt;/code&gt; — config wrong (SHA-1, package, or client ID)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;7&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Network error&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Status &lt;code&gt;10&lt;/code&gt; and &lt;code&gt;12500&lt;/code&gt; are the SHA-1-related ones.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. Reference: this repo's exact configuration (post-fix)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Cloud project:     Motoshare (motoshare-a61eb), project number 338933606969

OAuth 2.0 Client IDs:
  motoshare-driver-admin-web                Web      338933606969-k446...
  motoshare-driver-admin-app                Android  88:6C:D0:27:21:3F:2E:DA:2E:EE:E3:A6:51:A0:4F:50:1B:F1:F3:20  (debug/upload)
  motoshare-driver-admin-app (play signing) Android  9A:04:19:E7:58:48:3A:70:6B:7D:5B:D1:28:91:36:5C:B1:4C:3E:D7  (Play App Signing)

Both Android clients use package: com.cotocus.motoshare_driver_admin

Flutter code (lib/src/shared/providers.dart):
  serverClientId = '338933606969-k446g8jjeclomdbf4ete2efmgr06rhs5.apps.googleusercontent.com'
                   (matches motoshare-driver-admin-web)

Audience: External, Publishing status: In production
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  9. Quick-start checklist for future apps
&lt;/h2&gt;

&lt;p&gt;When wiring Google Sign-In on a new Android app, do all of this &lt;strong&gt;before&lt;/strong&gt;&lt;br&gt;
the first Play Store release:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Create one &lt;strong&gt;Android&lt;/strong&gt; OAuth client with your &lt;strong&gt;debug&lt;/strong&gt; keystore SHA-1&lt;/li&gt;
&lt;li&gt;[ ] Create one &lt;strong&gt;Web&lt;/strong&gt; OAuth client → use its Client ID as &lt;code&gt;serverClientId&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;[ ] Set OAuth consent screen → &lt;strong&gt;External&lt;/strong&gt;, &lt;strong&gt;In production&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;[ ] Upload first AAB to Play Console → enable App signing&lt;/li&gt;
&lt;li&gt;[ ] Read the &lt;strong&gt;App signing key SHA-1&lt;/strong&gt; from Play Console → App integrity&lt;/li&gt;
&lt;li&gt;[ ] Create a &lt;strong&gt;second&lt;/strong&gt; Android OAuth client with that SHA-1, same package name&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.debug.schoolOptional"&gt; &lt;/a&gt; Create a third Android client with your &lt;strong&gt;upload key&lt;/strong&gt; SHA-1 if you sometimes share an upload-signed APK directly with testers&lt;/li&gt;
&lt;li&gt;[ ] Confirm Sign-In works on Play Store install (Last used date updates within minutes)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tracking SHA-1s up front saves a release cycle of debugging later.&lt;/p&gt;




&lt;h2&gt;
  
  
  10. Reusing this guide
&lt;/h2&gt;

&lt;p&gt;This guide is project-agnostic apart from Section 8. To adapt it for&lt;br&gt;
another app, change:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Cloud project ID, project number, and client IDs in Section 8&lt;/li&gt;
&lt;li&gt;The package name (&lt;code&gt;com.cotocus.motoshare_driver_admin&lt;/code&gt;) in Section 4&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;serverClientId&lt;/code&gt; constant location and value in Steps 4 and Section 8&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Why Google Sign-In Works on Your Emulator But Breaks on Play Store</title>
      <dc:creator>Abhishek singh</dc:creator>
      <pubDate>Thu, 07 May 2026 07:29:41 +0000</pubDate>
      <link>https://www.debug.school/abhishek/why-google-sign-in-works-on-your-emulator-but-breaks-on-play-store-28jo</link>
      <guid>https://www.debug.school/abhishek/why-google-sign-in-works-on-your-emulator-but-breaks-on-play-store-28jo</guid>
      <description>&lt;h1&gt;
  
  
  Why Google Sign-In Works on Your Emulator But Breaks on Play Store — and How to Fix It in 5 Minutes
&lt;/h1&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Suggested tags: #Flutter, #Android, #GoogleSignIn, #PlayStore, #OAuth, #DebuggingDiaries&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Reading time: ~6 minutes&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  The Bug That Only Shows Up After You Ship
&lt;/h2&gt;

&lt;p&gt;Picture this: you've spent two weeks wiring Google Sign-In into your&lt;br&gt;
Android app. It works perfectly on your emulator. It works on your&lt;br&gt;
teammate's Pixel. The QA build, side-loaded over USB, works. You ship a&lt;br&gt;
release build to Google Play, hit the green publish button, and crack open&lt;br&gt;
a celebratory chai.&lt;/p&gt;

&lt;p&gt;Five minutes later, a tester pings you:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"Hey, I downloaded the app from Play Store and Google Sign-In just…&lt;br&gt;
doesn't do anything. Account picker doesn't even open."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You blink. You check your phone. You uninstall the dev build, install from&lt;br&gt;
Play Store… and watch the same thing happen. &lt;strong&gt;The exact same APK that&lt;br&gt;
worked thirty minutes ago is now broken.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Welcome to one of Android's most confusing OAuth bugs. The good news?&lt;br&gt;
There is one specific cause, and it takes about five minutes to fix once&lt;br&gt;
you know what to do. The bad news is that almost no one finds the answer&lt;br&gt;
on the first Stack Overflow page they read, because the symptoms point at&lt;br&gt;
ten different culprits.&lt;/p&gt;

&lt;p&gt;This article walks through what's actually going wrong, why it only&lt;br&gt;
happens on Play Store builds, and the precise fix that resolves it without&lt;br&gt;
a single line of code change or a new release upload.&lt;/p&gt;


&lt;h2&gt;
  
  
  Three Signatures, One Confused OAuth Client
&lt;/h2&gt;

&lt;p&gt;Here's the thing nobody tells you when you set up Google Sign-In: your&lt;br&gt;
Android app gets signed with &lt;strong&gt;at least three different cryptographic&lt;br&gt;
keys&lt;/strong&gt; during its lifetime, and Google checks all of them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                                                  SHA-1 fingerprint
                                                  ─────────────────
[1]  flutter run / debug builds      → debug key      AA:BB:CC:...
[2]  flutter build appbundle         → upload key     DD:EE:FF:...
[3]  Install from Play Store         → Google's       11:22:33:...
                                       app signing
                                       key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run your app from Android Studio or &lt;code&gt;flutter run&lt;/code&gt;, the APK is&lt;br&gt;
signed with your machine's local &lt;strong&gt;debug keystore&lt;/strong&gt;. That's signature [1].&lt;/p&gt;

&lt;p&gt;When you build a release AAB and upload it to Play Store, you sign it with&lt;br&gt;
your &lt;strong&gt;upload keystore&lt;/strong&gt; — usually one you generated when you first set up&lt;br&gt;
Play signing. That's signature [2].&lt;/p&gt;

&lt;p&gt;And here's the kicker: &lt;strong&gt;Google does not actually distribute the AAB you&lt;br&gt;
uploaded.&lt;/strong&gt; Since 2021, Play Console mandates a feature called &lt;em&gt;App&lt;br&gt;
signing by Google Play&lt;/em&gt;. When you upload your &lt;code&gt;.aab&lt;/code&gt;, Google strips your&lt;br&gt;
signature, repackages the bundle into APKs for different device profiles,&lt;br&gt;
and &lt;strong&gt;re-signs them with their own internal key&lt;/strong&gt;. That's signature [3].&lt;br&gt;
You never see this key. You can't access it. It lives entirely on&lt;br&gt;
Google's servers.&lt;/p&gt;

&lt;p&gt;So when a real user installs your app from the Play Store, the APK&lt;br&gt;
running on their phone is signed with a key your machine has never&lt;br&gt;
touched.&lt;/p&gt;

&lt;p&gt;Why does this matter for Google Sign-In? Because Google's OAuth servers&lt;br&gt;
verify the signature of the calling app on every Sign-In request. The&lt;br&gt;
SHA-1 fingerprint of whichever key signed the running APK has to match&lt;br&gt;
one that's registered against your Android OAuth client in Google Cloud&lt;br&gt;
Console.&lt;/p&gt;

&lt;p&gt;When you set up Google Sign-In during development, you almost certainly&lt;br&gt;
registered key &lt;a href="https://www.debug.schooldebug"&gt;1&lt;/a&gt; or key &lt;a href="https://www.debug.schoolupload"&gt;2&lt;/a&gt;. You probably never&lt;br&gt;
registered key [3], because Play hadn't generated it yet — the App&lt;br&gt;
signing key is created the first time you upload an AAB.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That's the bug.&lt;/strong&gt; Your Cloud Console only knows about [1] and/or [2].&lt;br&gt;
The Play Store APK is signed with [3]. Google's OAuth servers see a key&lt;br&gt;
they don't recognize and silently drop the request. From the user's&lt;br&gt;
perspective, Sign-In just… does nothing.&lt;/p&gt;


&lt;h2&gt;
  
  
  Symptoms That Lead Everyone Astray
&lt;/h2&gt;

&lt;p&gt;The reason this bug eats hours of debugging time is that the failure mode&lt;br&gt;
is almost too clean. There's no crash. No red snackbar. No useful logcat&lt;br&gt;
line that says "SHA-1 mismatch."&lt;/p&gt;

&lt;p&gt;What you see instead:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Google account picker briefly flickers, then closes&lt;/li&gt;
&lt;li&gt;A toast saying &lt;em&gt;"Sign-in failed"&lt;/em&gt; appears with no further detail&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;PlatformException(sign_in_failed, …, status: 12500)&lt;/code&gt; — but only if
you're already running through &lt;code&gt;adb logcat&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Sometimes status code &lt;code&gt;10&lt;/code&gt;, which is documented as &lt;code&gt;DEVELOPER_ERROR&lt;/code&gt; and
is even more cryptic than &lt;code&gt;12500&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Status code &lt;code&gt;12500&lt;/code&gt; and &lt;code&gt;10&lt;/code&gt; are the two fingerprints of this specific&lt;br&gt;
bug. If you grep your logcat output and see either, stop reading Stack&lt;br&gt;
Overflow threads about scopes, plugin versions, or token expiry — you&lt;br&gt;
have a SHA-1 problem.&lt;/p&gt;

&lt;p&gt;The other reason people miss this for so long: &lt;strong&gt;everything works in&lt;br&gt;
development.&lt;/strong&gt; Emulator? Works. Local USB build? Works. Internal testing&lt;br&gt;
track &lt;em&gt;if you side-load the APK from a download link&lt;/em&gt;? Works. The bug&lt;br&gt;
only appears once Google's app-signing pipeline gets involved, and that&lt;br&gt;
only happens when a real user clicks Install on the Play Store listing.&lt;/p&gt;


&lt;h2&gt;
  
  
  The Fix, Plain and Simple
&lt;/h2&gt;

&lt;p&gt;Now that we've named the cause, the fix is mechanical. There are exactly&lt;br&gt;
two pieces:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Find out what SHA-1 Google's app-signing key has&lt;/strong&gt; (this lives in
Play Console)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tell Google's OAuth servers about it&lt;/strong&gt; (by registering it on a new
Android OAuth client in Cloud Console)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No code changes. No rebuild. No new release upload. The whole thing is&lt;br&gt;
configuration on Google's side, and the change propagates to your live&lt;br&gt;
Play Store build within minutes.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 1 — Get the App Signing key SHA-1 from Play Console
&lt;/h3&gt;

&lt;p&gt;Open &lt;a href="https://play.google.com/console" rel="noopener noreferrer"&gt;Play Console&lt;/a&gt;, select your app,&lt;br&gt;
and navigate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Test and release  →  App integrity  →  App signing
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll see two certificates listed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;App signing key certificate&lt;/strong&gt; ← copy the SHA-1 from this one&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Upload key certificate&lt;/strong&gt; ← &lt;em&gt;not&lt;/em&gt; this one&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The distinction matters. The Upload key is yours; the App signing key is&lt;br&gt;
Google's. Only the App signing key SHA-1 fixes this bug. Both certificates&lt;br&gt;
are listed on the same page, which is exactly why people copy the wrong&lt;br&gt;
one.&lt;/p&gt;

&lt;p&gt;The SHA-1 looks something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;9A:04:19:E7:48:48:3A:70:6B:5D:5B:h1:28:91:36:5C:B1:4C:3E:D7
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;40 hexadecimal characters separated by colons. Copy it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 — Register a new Android OAuth client with that SHA-1
&lt;/h3&gt;

&lt;p&gt;Open &lt;a href="https://console.cloud.google.com/" rel="noopener noreferrer"&gt;Google Cloud Console&lt;/a&gt;, make sure&lt;br&gt;
the project selector at the top points to &lt;strong&gt;the same Cloud project your&lt;br&gt;
app uses for Sign-In&lt;/strong&gt;. (This is a common pitfall — if your team has&lt;br&gt;
multiple Cloud projects, getting this wrong silently breaks everything.)&lt;/p&gt;

&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APIs &amp;amp; Services  →  Credentials  →  + CREATE CREDENTIALS  →  OAuth client ID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Fill in the form:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Field&lt;/th&gt;
&lt;th&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Application type&lt;/td&gt;
&lt;td&gt;Android&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Name&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;&amp;lt;your-app&amp;gt; (play signing)&lt;/code&gt; — anything descriptive&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Package name&lt;/td&gt;
&lt;td&gt;The exact &lt;code&gt;applicationId&lt;/code&gt; from your &lt;code&gt;build.gradle&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SHA-1 certificate fingerprint&lt;/td&gt;
&lt;td&gt;The one you copied from Play Console&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Click Create.&lt;/p&gt;

&lt;p&gt;You will now have &lt;strong&gt;two Android OAuth clients with the same package name&lt;/strong&gt;&lt;br&gt;
in your project — one with your debug/upload SHA-1, one with the Play&lt;br&gt;
App Signing SHA-1. &lt;strong&gt;Don't delete the original.&lt;/strong&gt; Both serve a purpose.&lt;br&gt;
Google's OAuth servers accept whichever SHA-1 matches the running build,&lt;br&gt;
so this configuration covers all three signing keys at once.&lt;/p&gt;

&lt;p&gt;The reason you need two separate clients is a quirk of Cloud Console:&lt;br&gt;
each Android OAuth client allows exactly one SHA-1. Firebase users get a&lt;br&gt;
nicer UI here (multiple fingerprints per app), but if you're working with&lt;br&gt;
the Cloud Console directly, the workaround is to make a second client.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3 — Make sure your OAuth consent screen is published
&lt;/h3&gt;

&lt;p&gt;This is the secondary cause that bites about a third of teams who fix&lt;br&gt;
the SHA-1 issue. Even with a perfect SHA-1 setup, if your OAuth consent&lt;br&gt;
screen is in &lt;strong&gt;Testing&lt;/strong&gt; mode, only emails on the test users list can&lt;br&gt;
sign in. Everyone else gets an error indistinguishable from the SHA-1&lt;br&gt;
bug.&lt;/p&gt;

&lt;p&gt;Navigate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APIs &amp;amp; Services  →  OAuth consent screen  →  Audience
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Google recently renamed parts of this UI to &lt;em&gt;Google Auth Platform&lt;/em&gt;; the&lt;br&gt;
location of the &lt;strong&gt;Audience&lt;/strong&gt; sub-page is the same.)&lt;/p&gt;

&lt;p&gt;Look at &lt;strong&gt;Publishing status&lt;/strong&gt;. If it says &lt;em&gt;Testing&lt;/em&gt;, click &lt;strong&gt;PUBLISH&lt;br&gt;
APP&lt;/strong&gt; and confirm. For apps requesting only basic scopes (&lt;code&gt;email&lt;/code&gt;,&lt;br&gt;
&lt;code&gt;profile&lt;/code&gt;, &lt;code&gt;openid&lt;/code&gt;), publishing is instant. For apps requesting&lt;br&gt;
sensitive or restricted scopes, Google will ask for verification, which&lt;br&gt;
can take days — but Sign-In flows for typical apps don't need those&lt;br&gt;
scopes.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 4 — Verify your Flutter code uses the Web client ID
&lt;/h3&gt;

&lt;p&gt;This one isn't strictly part of the fix, but it's worth confirming. The&lt;br&gt;
&lt;code&gt;google_sign_in&lt;/code&gt; plugin needs the &lt;strong&gt;Web&lt;/strong&gt; OAuth client ID to issue ID&lt;br&gt;
tokens, &lt;strong&gt;not&lt;/strong&gt; the Android client ID. If your code has the Android&lt;br&gt;
client ID in &lt;code&gt;serverClientId&lt;/code&gt;, the account picker will work but the&lt;br&gt;
backend ID-token verification will fail.&lt;/p&gt;

&lt;p&gt;Open the file where you initialize &lt;code&gt;GoogleSignIn&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Should look something like this — the ID belongs to a Web-type client.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;_googleWebClientId&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
    &lt;span class="s"&gt;'338935556969-k446g8gdgbdxgbdgvdefmgr06rhs5.apps.googleusercontent.com'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cross-reference it with Cloud Console. The corresponding OAuth client&lt;br&gt;
should be type &lt;strong&gt;Web application&lt;/strong&gt;, not Android. If it's Android, that's&lt;br&gt;
your second bug.&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 5 — Test
&lt;/h3&gt;

&lt;p&gt;This is the part that surprises people the most: &lt;strong&gt;you don't need to&lt;br&gt;
rebuild&lt;/strong&gt;. The fix is purely server-side on Google's auth infrastructure.&lt;br&gt;
Wait 5 to 10 minutes for propagation, then:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Uninstall the Play Store version of your app from a real phone&lt;/li&gt;
&lt;li&gt;Re-install from Play Store (Internal testing track is fine)&lt;/li&gt;
&lt;li&gt;Open the app, tap Google Sign-In, pick an account&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It should now work end-to-end. The same &lt;code&gt;.aab&lt;/code&gt; you uploaded yesterday now&lt;br&gt;
authenticates correctly because Google's OAuth servers learned a new&lt;br&gt;
SHA-1.&lt;/p&gt;


&lt;h2&gt;
  
  
  How to Verify You Actually Fixed It
&lt;/h2&gt;

&lt;p&gt;After ten minutes of normal use, return to your new OAuth client in Cloud&lt;br&gt;
Console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;APIs &amp;amp; Services  →  Credentials  →  click your "(play signing)" client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the right-hand panel you'll see a &lt;strong&gt;Last used date&lt;/strong&gt; field:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Last used date    May 7, 2026 (Note: this data could be delayed by a day
                  or more.)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If it shows today, congratulations: your Play Store APK is hitting this&lt;br&gt;
exact OAuth client and the SHA-1 is matching successfully. That timestamp&lt;br&gt;
is the single strongest signal that the fix worked. Until I saw it on my&lt;br&gt;
own client, I couldn't quite believe a config change was enough — and&lt;br&gt;
neither will the next person you tell about this fix.&lt;/p&gt;




&lt;h2&gt;
  
  
  Pitfalls Worth Calling Out
&lt;/h2&gt;

&lt;p&gt;A few traps that snagged me along the way and might snag you too:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't copy the Upload key SHA-1.&lt;/strong&gt; Both certificates are right next to&lt;br&gt;
each other on the App signing page. Only the App signing key SHA-1&lt;br&gt;
matters here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't delete the old Android OAuth client.&lt;/strong&gt; It still serves your&lt;br&gt;
debug builds and any side-loaded local APKs. Two clients, same package&lt;br&gt;
name, different SHA-1s, both alive — that's correct.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Make sure you're in the right Cloud project.&lt;/strong&gt; Teams with multiple&lt;br&gt;
Cloud projects (legacy ones, separate projects per environment) often&lt;br&gt;
land on the wrong one. The Web client ID hard-coded in your Flutter app&lt;br&gt;
tells you which project Sign-In is bound to — match it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't try to "Link Cloud project" in Play Console looking for this&lt;br&gt;
fix.&lt;/strong&gt; That feature is for the Play Integrity API, which is unrelated to&lt;br&gt;
Google Sign-In, and the most common error you'll see ("Project not&lt;br&gt;
found") just means your account isn't an Owner on the Cloud project. You&lt;br&gt;
don't need to link anything for Sign-In to work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't pass the Android client ID as &lt;code&gt;serverClientId&lt;/code&gt;.&lt;/strong&gt; It has to be&lt;br&gt;
the Web client ID. The plugin will sometimes appear to work and then&lt;br&gt;
break in obscure ways during ID token verification.&lt;/p&gt;




&lt;h2&gt;
  
  
  A Lesson In Distributed Trust
&lt;/h2&gt;

&lt;p&gt;The deeper takeaway here is that mobile app authentication, post-Play&lt;br&gt;
App Signing, involves &lt;em&gt;three&lt;/em&gt; trusted parties: your team's local&lt;br&gt;
keystores, Google Play's signing infrastructure, and Google's identity&lt;br&gt;
servers. They have to agree on the identity of your app, and the only&lt;br&gt;
way they agree is via SHA-1 fingerprints registered against an OAuth&lt;br&gt;
client.&lt;/p&gt;

&lt;p&gt;It's elegant when it works. It's baffling when it doesn't, because the&lt;br&gt;
machinery is invisible until something breaks. The first time you ship a&lt;br&gt;
production Android app with Google Sign-In, this bug is almost&lt;br&gt;
inevitable. The good news is that you only need to learn it once.&lt;/p&gt;

&lt;p&gt;If you're setting up Google Sign-In on a new Android app, here's the&lt;br&gt;
checklist I now run &lt;strong&gt;before&lt;/strong&gt; the first Play Store release:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One Android OAuth client with the debug keystore SHA-1&lt;/li&gt;
&lt;li&gt;One Android OAuth client with the upload keystore SHA-1 (if you ever
share upload-signed APKs directly with testers)&lt;/li&gt;
&lt;li&gt;One Web OAuth client → use its Client ID as &lt;code&gt;serverClientId&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;OAuth consent screen → External, In production&lt;/li&gt;
&lt;li&gt;Upload first AAB, enable App signing, immediately read the App
signing key SHA-1 from Play Console&lt;/li&gt;
&lt;li&gt;Create a third Android OAuth client with that SHA-1, same package name&lt;/li&gt;
&lt;li&gt;Confirm Sign-In works on Play Store install — Last used date updates
within minutes&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Tracking all the SHA-1s up front saves a release cycle of debugging&lt;br&gt;
later, and you'll never wonder again why something that works on three&lt;br&gt;
separate emulators doesn't work after Play touched it.&lt;/p&gt;




&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;If this article saved you an evening, pass it on to whoever sets up&lt;br&gt;
Sign-In on the next Android app at your company. The official Google&lt;br&gt;
documentation describes most of these moving parts individually, but I&lt;br&gt;
have yet to see them connected in one place — and the failure mode is&lt;br&gt;
common enough that I suspect every Android team rediscovers it&lt;br&gt;
independently.&lt;/p&gt;

&lt;p&gt;Five minutes, two new lines in Cloud Console, no rebuild. That's all it&lt;br&gt;
takes to turn "Sign-In is broken on Play Store" into a story you tell&lt;br&gt;
junior devs at standup.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Git Multi-Remote Workflow:It Multiple Remote Management Guide</title>
      <dc:creator>Abhishek singh</dc:creator>
      <pubDate>Wed, 01 Apr 2026 12:41:13 +0000</pubDate>
      <link>https://www.debug.school/abhishek/it-multiple-remote-management-guide-2163</link>
      <guid>https://www.debug.school/abhishek/it-multiple-remote-management-guide-2163</guid>
      <description>&lt;h2&gt;
  
  
  🚀 Git Multi-Remote Workflow: How to Manage and Push Code to Multiple Repositories (origin &amp;amp; old-origin) Like a Pro
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In real-world development—especially when you're working as a CTO or managing multiple environments—you often face a situation like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One repo for &lt;strong&gt;production&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;One repo for &lt;strong&gt;backup / legacy&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;One repo for &lt;strong&gt;client delivery&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;One repo for &lt;strong&gt;internal development&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And suddenly, your simple Git workflow becomes complex.&lt;/p&gt;

&lt;p&gt;You ask:&lt;br&gt;
👉 &lt;em&gt;“How do I manage different codebases across multiple repos without breaking anything?”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This guide solves that completely.&lt;/p&gt;

&lt;p&gt;By the end, you will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Understand how Git multi-remote works&lt;/li&gt;
&lt;li&gt;Switch between repos safely&lt;/li&gt;
&lt;li&gt;Handle different code in &lt;code&gt;origin&lt;/code&gt; and &lt;code&gt;old-origin&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Use production-level strategies (branch isolation, syncing, migration)&lt;/li&gt;
&lt;li&gt;Avoid dangerous mistakes like overwriting code&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What is Multi-Remote in Git&lt;/li&gt;
&lt;li&gt;Understanding origin vs old-origin&lt;/li&gt;
&lt;li&gt;Core Concept: Code vs Remote (Most Important)&lt;/li&gt;
&lt;li&gt;Real Workflow Scenarios&lt;/li&gt;
&lt;li&gt;Step-by-Step Implementation (Production Setup)&lt;/li&gt;
&lt;li&gt;Managing Different Codebases Safely&lt;/li&gt;
&lt;li&gt;Architecture-Level Strategy (CTO Thinking)&lt;/li&gt;
&lt;li&gt;Comparison: Single Repo vs Multi Repo&lt;/li&gt;
&lt;li&gt;Common Mistakes &amp;amp; Fixes&lt;/li&gt;
&lt;li&gt;Expert Pro Tips&lt;/li&gt;
&lt;li&gt;FAQ&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;li&gt;Meta Description&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;
  
  
  1. What is Multi-Remote in Git
&lt;/h2&gt;

&lt;p&gt;Git allows you to connect your local project to &lt;strong&gt;multiple remote repositories&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;origin      → New Repo
old-origin  → Old Repo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is called &lt;strong&gt;multi-remote setup&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Understanding origin vs old-origin
&lt;/h2&gt;

&lt;p&gt;In your case:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;origin      &lt;span class="o"&gt;=&lt;/span&gt; New repository
old-origin  &lt;span class="o"&gt;=&lt;/span&gt; Old repository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are just &lt;strong&gt;aliases&lt;/strong&gt;, not actual code.&lt;/p&gt;

&lt;p&gt;👉 Important:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Remote names do NOT store code. They only define destinations.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. Core Concept: Code vs Remote (MOST IMPORTANT)
&lt;/h2&gt;

&lt;p&gt;This is where most developers get confused.&lt;/p&gt;

&lt;h3&gt;
  
  
  Reality:
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;Meaning&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Local branch&lt;/td&gt;
&lt;td&gt;Your actual code&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Remote (origin)&lt;/td&gt;
&lt;td&gt;Where you push&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Remote (old-origin)&lt;/td&gt;
&lt;td&gt;Another destination&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;👉 Key Rule:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Git always pushes &lt;strong&gt;your current local branch code&lt;/strong&gt;, not remote code.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  4. Real Workflow Scenarios
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Scenario 1: Push same code to both repos
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin main
git push old-origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Scenario 2: Different code in both repos
&lt;/h3&gt;

&lt;p&gt;This is your real case.&lt;/p&gt;

&lt;p&gt;You must:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pull code from respective repo&lt;/li&gt;
&lt;li&gt;Switch context locally&lt;/li&gt;
&lt;li&gt;Then push&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  5. Step-by-Step Implementation (Production Setup)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1: Add both remotes
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote rename origin old-origin
git remote add origin git@github.com:yourusername/new-repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 2: Fetch all data
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git fetch origin
git fetch old-origin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 3: Create separate local branches
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; new-main origin/main
git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; old-main old-origin/main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Now your structure:
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Branch&lt;/th&gt;
&lt;th&gt;Code Source&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;new-main&lt;/td&gt;
&lt;td&gt;New repo&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;old-main&lt;/td&gt;
&lt;td&gt;Old repo&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Step 4: Work with branches
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Use new repo code:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout new-main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Use old repo code:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout old-main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 5: Push correctly
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Push new repo code:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout new-main
git push origin new-main:main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Push old repo code:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout old-main
git push old-origin old-main:main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  6. Managing Different Codebases Safely
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Golden Rule:
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;One branch = One source of truth&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Never mix:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;origin/main&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;old-origin/main&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Instead:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;new-main&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;old-main&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  If you want to copy code between repos
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Copy old repo → new repo
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout old-main
git push origin old-main:main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Copy new repo → old repo
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout new-main
git push old-origin new-main:main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  7. Architecture-Level Strategy (CTO Thinking)
&lt;/h2&gt;

&lt;p&gt;In enterprise systems, this is how multi-repo is used:&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Cases
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Backup system&lt;/td&gt;
&lt;td&gt;old-origin&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Migration&lt;/td&gt;
&lt;td&gt;move code gradually&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi-client deployment&lt;/td&gt;
&lt;td&gt;separate repos&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Version isolation&lt;/td&gt;
&lt;td&gt;repo-based control&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h3&gt;
  
  
  Architecture Model
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                LOCAL SYSTEM
              /              \
     new-main branch      old-main branch
          |                    |
       origin               old-origin
     (new repo)           (old repo)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  8. Comparison Table
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Pros&lt;/th&gt;
&lt;th&gt;Cons&lt;/th&gt;
&lt;th&gt;Best Use Case&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Single Repo&lt;/td&gt;
&lt;td&gt;Simple&lt;/td&gt;
&lt;td&gt;No flexibility&lt;/td&gt;
&lt;td&gt;Small projects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi Remote&lt;/td&gt;
&lt;td&gt;Flexible&lt;/td&gt;
&lt;td&gt;Needs discipline&lt;/td&gt;
&lt;td&gt;Enterprise&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi Branch&lt;/td&gt;
&lt;td&gt;Controlled&lt;/td&gt;
&lt;td&gt;Slight complexity&lt;/td&gt;
&lt;td&gt;Dev teams&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Multi Repo&lt;/td&gt;
&lt;td&gt;Full isolation&lt;/td&gt;
&lt;td&gt;Hard to sync&lt;/td&gt;
&lt;td&gt;Large org&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  9. Common Mistakes (Real-World)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ❌ Mistake 1: Pushing wrong code
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without checking branch&lt;/p&gt;

&lt;p&gt;✅ Fix:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  ❌ Mistake 2: Mixing repos
&lt;/h3&gt;

&lt;p&gt;Using one branch for both repos&lt;/p&gt;

&lt;p&gt;✅ Fix:&lt;br&gt;
Use separate branches&lt;/p&gt;


&lt;h3&gt;
  
  
  ❌ Mistake 3: Force pushing blindly
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;--force&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;✅ Fix:&lt;br&gt;
Use only when required&lt;/p&gt;


&lt;h3&gt;
  
  
  ❌ Mistake 4: Not fetching remotes
&lt;/h3&gt;

&lt;p&gt;Leads to outdated code&lt;/p&gt;

&lt;p&gt;✅ Fix:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git fetch origin
git fetch old-origin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  10. Expert Pro Tips
&lt;/h2&gt;

&lt;h3&gt;
  
  
  🔥 Pro Tip 1: Always verify before push
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git status
git branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🔥 Pro Tip 2: Use aliases
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gpo&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"git push origin main"&lt;/span&gt;
&lt;span class="nb"&gt;alias &lt;/span&gt;&lt;span class="nv"&gt;gpol&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"git push old-origin main"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🔥 Pro Tip 3: Protect main branch
&lt;/h3&gt;

&lt;p&gt;Use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Protected branches in GitHub&lt;/li&gt;
&lt;li&gt;PR-based deployment&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🔥 Pro Tip 4: Use staging branches
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;staging-main
production-main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🔥 Pro Tip 5: Use tagging for releases
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git tag v1.0
git push origin v1.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  11. FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Can I push different code to two repos?
&lt;/h3&gt;

&lt;p&gt;Yes. Use separate local branches.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Can I sync both repos automatically?
&lt;/h3&gt;

&lt;p&gt;Yes, but better to control manually for safety.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. What happens if both repos have different history?
&lt;/h3&gt;

&lt;p&gt;You must:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;merge OR&lt;/li&gt;
&lt;li&gt;force push carefully&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  4. Is multi-remote safe?
&lt;/h3&gt;

&lt;p&gt;Yes, if you follow branch discipline.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Should I use this in production?
&lt;/h3&gt;

&lt;p&gt;Yes, especially for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;migration&lt;/li&gt;
&lt;li&gt;backup&lt;/li&gt;
&lt;li&gt;multi-client systems&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  12. Conclusion
&lt;/h2&gt;

&lt;p&gt;Managing multiple Git repositories is not complex—if you follow the right architecture.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Takeaways:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Remote = destination&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Branch = code&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Always separate codebases using branches&lt;/li&gt;
&lt;li&gt;Never mix repositories blindly&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Your Action Plan:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Setup &lt;code&gt;origin&lt;/code&gt; and &lt;code&gt;old-origin&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;new-main&lt;/code&gt; and &lt;code&gt;old-main&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Always switch branch before push&lt;/li&gt;
&lt;li&gt;Push carefully based on destination&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>WhatsApp vs SMS Pricing in India: Complete Guide for OTP, Marketing &amp; Notifications (2026)</title>
      <dc:creator>Abhishek singh</dc:creator>
      <pubDate>Tue, 24 Mar 2026 05:31:23 +0000</pubDate>
      <link>https://www.debug.school/abhishek/whatsapp-vs-sms-pricing-in-india-complete-guide-for-otp-marketing-notifications-2026-53l7</link>
      <guid>https://www.debug.school/abhishek/whatsapp-vs-sms-pricing-in-india-complete-guide-for-otp-marketing-notifications-2026-53l7</guid>
      <description>&lt;p&gt;&lt;a href="https://www.debug.school/images/OCVvg7DvZlNa4hMSm0yg2ep2LNLZkrUkLqz8mrwxeR4/rt:fit/w:800/g:sm/q:0/mb:500000/ar:1/aHR0cHM6Ly93d3cu/ZGVidWcuc2Nob29s/L3VwbG9hZHMvYXJ0/aWNsZXMvMXRlYTEw/dDFtdGo0NnA0M2Vr/dHcucG5n" class="article-body-image-wrapper"&gt;&lt;img src="https://www.debug.school/images/OCVvg7DvZlNa4hMSm0yg2ep2LNLZkrUkLqz8mrwxeR4/rt:fit/w:800/g:sm/q:0/mb:500000/ar:1/aHR0cHM6Ly93d3cu/ZGVidWcuc2Nob29s/L3VwbG9hZHMvYXJ0/aWNsZXMvMXRlYTEw/dDFtdGo0NnA0M2Vr/dHcucG5n" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;WhatsApp vs SMS Pricing in India: Complete Guide for OTP, Marketing &amp;amp; Notifications (2026)&lt;/strong&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you're building a product, SaaS platform, or customer communication system in India, one question always comes up:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should I use WhatsApp or SMS for sending OTPs, marketing messages, or notifications?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;At first glance, both seem similar — they deliver messages to users. But when you go deeper, you’ll realize:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Pricing models are completely different&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use cases vary significantly&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cost impact can be huge at scale&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This guide will give you a &lt;strong&gt;complete, practical, and real-world understanding&lt;/strong&gt; of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WhatsApp pricing (Meta direct)&lt;/li&gt;
&lt;li&gt;SMS pricing (Twilio India)&lt;/li&gt;
&lt;li&gt;Cost comparison for OTP, marketing, and notifications&lt;/li&gt;
&lt;li&gt;Best strategy for your business&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;By the end, you won’t need any other resource.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Table of Contents&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What is WhatsApp Business API?&lt;/li&gt;
&lt;li&gt;What is SMS (Twilio)?&lt;/li&gt;
&lt;li&gt;WhatsApp Pricing Model (India)&lt;/li&gt;
&lt;li&gt;SMS Pricing Model (India)&lt;/li&gt;
&lt;li&gt;WhatsApp vs SMS Cost Comparison Table&lt;/li&gt;
&lt;li&gt;OTP Pricing Comparison&lt;/li&gt;
&lt;li&gt;Marketing Pricing Comparison&lt;/li&gt;
&lt;li&gt;Notification Pricing Comparison&lt;/li&gt;
&lt;li&gt;Real-Life Use Cases&lt;/li&gt;
&lt;li&gt;Best Practices&lt;/li&gt;
&lt;li&gt;Common Mistakes to Avoid&lt;/li&gt;
&lt;li&gt;FAQs&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;1. What is WhatsApp Business API?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;WhatsApp Business API (Meta) allows businesses to send:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OTPs (Authentication)&lt;/li&gt;
&lt;li&gt;Notifications (Utility)&lt;/li&gt;
&lt;li&gt;Marketing campaigns&lt;/li&gt;
&lt;li&gt;Customer support messages&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Rich media (images, buttons, links)&lt;/li&gt;
&lt;li&gt;Two-way communication&lt;/li&gt;
&lt;li&gt;High engagement rates&lt;/li&gt;
&lt;li&gt;Template-based messaging&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;2. What is SMS (Twilio)?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;SMS is the traditional way to send messages using telecom networks.&lt;/p&gt;

&lt;p&gt;With Twilio, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send OTPs&lt;/li&gt;
&lt;li&gt;Send alerts&lt;/li&gt;
&lt;li&gt;Run marketing campaigns&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Features:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Works on &lt;strong&gt;all phones&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;No internet required&lt;/li&gt;
&lt;li&gt;Simple implementation&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;3. WhatsApp Pricing Model (India)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;WhatsApp pricing is &lt;strong&gt;not fixed per message&lt;/strong&gt;. It depends on:&lt;/p&gt;

&lt;h3&gt;
  
  
  Message Categories:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Authentication (OTP)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Utility (notifications)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Marketing&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Service (support replies)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Important Rules:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Service messages = FREE (within 24 hours)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;User replies open a 24-hour window&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Charges apply only for template messages outside window&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Approx Pricing (India):
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Approx Cost (INR)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Authentication (OTP)&lt;/td&gt;
&lt;td&gt;₹0.30 – ₹0.80&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Utility (Notification)&lt;/td&gt;
&lt;td&gt;₹0.20 – ₹0.60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Marketing&lt;/td&gt;
&lt;td&gt;₹0.80 – ₹2.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Service (Reply)&lt;/td&gt;
&lt;td&gt;FREE&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;4. SMS Pricing Model (India)&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;SMS pricing is &lt;strong&gt;simple but expensive&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Twilio India Pricing:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;$0.0832 ≈ ₹7.8 per SMS segment&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Important Points:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Charged &lt;strong&gt;per segment (160 characters)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Long messages = &lt;strong&gt;multiple SMS charges&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;No free window&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;5. WhatsApp vs SMS Cost Comparison Table&lt;/strong&gt;
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Use Case&lt;/th&gt;
&lt;th&gt;WhatsApp Cost (INR)&lt;/th&gt;
&lt;th&gt;SMS Cost (INR)&lt;/th&gt;
&lt;th&gt;Winner&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OTP&lt;/td&gt;
&lt;td&gt;₹0.30 – ₹0.80&lt;/td&gt;
&lt;td&gt;₹7.80&lt;/td&gt;
&lt;td&gt;WhatsApp&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Marketing&lt;/td&gt;
&lt;td&gt;₹0.80 – ₹2.50&lt;/td&gt;
&lt;td&gt;₹7.80+&lt;/td&gt;
&lt;td&gt;WhatsApp&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Notification&lt;/td&gt;
&lt;td&gt;₹0.20 – ₹0.60&lt;/td&gt;
&lt;td&gt;₹7.80&lt;/td&gt;
&lt;td&gt;WhatsApp&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Support Reply&lt;/td&gt;
&lt;td&gt;FREE&lt;/td&gt;
&lt;td&gt;₹7.80&lt;/td&gt;
&lt;td&gt;WhatsApp&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;6. OTP Pricing Comparison&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  WhatsApp OTP:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Category: Authentication&lt;/li&gt;
&lt;li&gt;Cost: ~₹0.30 – ₹0.80&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SMS OTP:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Cost: ~₹7.80 per SMS&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example:
&lt;/h3&gt;

&lt;p&gt;If you send &lt;strong&gt;1000 OTPs&lt;/strong&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Channel&lt;/th&gt;
&lt;th&gt;Total Cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;WhatsApp&lt;/td&gt;
&lt;td&gt;₹300 – ₹800&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SMS&lt;/td&gt;
&lt;td&gt;₹7800&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Insight:
&lt;/h3&gt;

&lt;p&gt;👉 WhatsApp is &lt;strong&gt;10x cheaper&lt;/strong&gt; for OTP&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;7. Marketing Pricing Comparison&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  WhatsApp Marketing:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Cost: ₹0.80 – ₹2.50&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Buttons&lt;/li&gt;
&lt;li&gt;Images&lt;/li&gt;
&lt;li&gt;Links&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h3&gt;
  
  
  SMS Marketing:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Cost: ₹7.80+&lt;/li&gt;
&lt;li&gt;Plain text only&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example (1000 messages):
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Channel&lt;/th&gt;
&lt;th&gt;Total Cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;WhatsApp&lt;/td&gt;
&lt;td&gt;₹800 – ₹2500&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SMS&lt;/td&gt;
&lt;td&gt;₹7800+&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Insight:
&lt;/h3&gt;

&lt;p&gt;👉 WhatsApp gives &lt;strong&gt;better ROI + lower cost&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;8. Notification Pricing Comparison&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  WhatsApp Notification:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Utility messages&lt;/li&gt;
&lt;li&gt;Cost: ₹0.20 – ₹0.60&lt;/li&gt;
&lt;li&gt;FREE if within support window&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SMS Notification:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Cost: ₹7.80&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Example (1000 messages):
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Channel&lt;/th&gt;
&lt;th&gt;Total Cost&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;WhatsApp&lt;/td&gt;
&lt;td&gt;₹200 – ₹600&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;SMS&lt;/td&gt;
&lt;td&gt;₹7800&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Insight:
&lt;/h3&gt;

&lt;p&gt;👉 Notifications are &lt;strong&gt;extremely cheap on WhatsApp&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;9. Real-Life Use Cases&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Case 1: E-commerce Platform
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Order confirmation → WhatsApp&lt;/li&gt;
&lt;li&gt;Delivery updates → WhatsApp&lt;/li&gt;
&lt;li&gt;Backup → SMS (if WhatsApp fails)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Case 2: Banking App
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;OTP → WhatsApp + SMS fallback&lt;/li&gt;
&lt;li&gt;Alerts → WhatsApp&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Case 3: SaaS Platform
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Login OTP → WhatsApp&lt;/li&gt;
&lt;li&gt;Notifications → WhatsApp&lt;/li&gt;
&lt;li&gt;Marketing → WhatsApp campaigns&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;10. Best Practices&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Use Hybrid Strategy
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Primary: WhatsApp&lt;/li&gt;
&lt;li&gt;Fallback: SMS&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Optimize Message Length
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;SMS charges per segment&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Use WhatsApp Templates Smartly
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Avoid unnecessary marketing messages&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Track Delivery Rates
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Improve ROI&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5. Use Automation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Trigger-based messaging&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;11. Common Mistakes to Avoid&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;❌ Sending all messages via SMS&lt;br&gt;
❌ Ignoring WhatsApp free window&lt;br&gt;
❌ Not using fallback system&lt;br&gt;
❌ Sending long SMS (cost increases)&lt;br&gt;
❌ Poor template approval strategy&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;12. FAQs&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Is WhatsApp cheaper than SMS in India?
&lt;/h3&gt;

&lt;p&gt;Yes, &lt;strong&gt;5x–20x cheaper&lt;/strong&gt; depending on use case.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Can WhatsApp replace SMS completely?
&lt;/h3&gt;

&lt;p&gt;No, because:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Some users don’t use WhatsApp&lt;/li&gt;
&lt;li&gt;SMS is still needed as fallback&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  3. Which is better for OTP?
&lt;/h3&gt;

&lt;p&gt;👉 &lt;strong&gt;WhatsApp (cost) + SMS (reliability)&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Are WhatsApp replies free?
&lt;/h3&gt;

&lt;p&gt;Yes, within &lt;strong&gt;24-hour service window&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Why is SMS expensive?
&lt;/h3&gt;

&lt;p&gt;Because it uses &lt;strong&gt;telecom networks + carrier charges&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;13. Conclusion&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If you are building a modern application in India:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Best Strategy&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;WhatsApp as primary channel&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Use &lt;strong&gt;SMS as backup only&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Final Comparison:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;WhatsApp = Cheap + Rich + Interactive&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SMS = Expensive + Basic + Reliable&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Actionable Advice:
&lt;/h3&gt;

&lt;p&gt;Start with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WhatsApp OTP system&lt;/li&gt;
&lt;li&gt;WhatsApp notifications&lt;/li&gt;
&lt;li&gt;SMS fallback&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reduce cost by &lt;strong&gt;80–90%&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Improve user experience&lt;/li&gt;
&lt;li&gt;Increase engagement&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
  </channel>
</rss>
