Skip to content

Latest commit

 

History

History
230 lines (180 loc) · 5.57 KB

File metadata and controls

230 lines (180 loc) · 5.57 KB

Test Instructions - Location Tracking V3 Final

📱 APK Location

The new APK is located at:

composeApp/build/outputs/apk/debug/composeApp-debug.apk

🔧 Changes in This Version

Real Device

  • minDistance = 0m (was 5m) → Continuous updates even when stationary
  • ✅ Improved logs with visible accuracy
  • ✅ Should receive updates every 5 seconds

Emulator

  • ✅ Improved detection (more fingerprints checked)
  • ✅ Detailed device logs (FINGERPRINT, MODEL, etc.)
  • ✅ FORCE_MOCK_GPS option (currently false)

🧪 Test 1: Real Device

Installation

# Uninstall old version first
adb uninstall com.followmemobile.camidecavalls

# Install new APK
adb install composeApp/build/outputs/apk/debug/composeApp-debug.apk

Test Procedure

  1. Start Logcat in a window:
adb logcat | grep AndroidLocationService
  1. Open the app on the phone

  2. Go to TrackingScreen (select a route)

  3. Press "Start Tracking"

  4. Watch the logs - You should see:

🚀 startTracking called
🔍 Device Info:
  FINGERPRINT: ...
  MODEL: ...
  MANUFACTURER: ...
  BRAND: ...
  DEVICE: ...
  PRODUCT: ...
🔍 Is Emulator: false
🔍 Force Mock GPS: false
✅ Location permission granted
📱 REAL DEVICE - Using actual GPS
⚙️ Creating LocationRequest with interval=5000ms, minDistance=0.0m  ← MUST be 0.0m!
📡 Requesting location updates...
✅ Location updates requested successfully
📍 Got last location (emulator workaround): XX.XXX, Y.YYY
📍 Real location update: XX.XXX, Y.YYY, accuracy: 100.0m
[wait 5 seconds]
📍 Real location update: XX.XXX, Y.YYY, accuracy: 50.0m
[wait 5 seconds]
📍 Real location update: XX.XXX, Y.YYY, accuracy: 15.0m
[continues every 5 seconds...]

✅ SUCCESS if:

  • You see minDistance=0.0m (NOT 5.0m!)
  • Receive updates every ~5 seconds
  • Accuracy improves over time
  • Works even when STATIONARY (indoors)

❌ FAIL if:

  • You see minDistance=5.0m → Using old APK, reinstall
  • No updates after the first → Copy entire log here
  • "Is Emulator: true" on real device → Device has strange fingerprint

🧪 Test 2: Android Emulator

Test Procedure

  1. Start Logcat:
adb logcat | grep AndroidLocationService
  1. Open app on emulator

  2. Go to TrackingScreen

  3. Press "Start Tracking"

  4. Watch the logs - You should see:

🚀 startTracking called
🔍 Device Info:
  FINGERPRINT: google/sdk_gphone64_arm64/...   ← Tells us if it's emulator
  MODEL: sdk_gphone64_arm64
  MANUFACTURER: Google
  BRAND: google
  DEVICE: emu64a
  PRODUCT: sdk_gphone64_arm64
🔍 Is Emulator: true   ← MUST be true!
🔍 Force Mock GPS: false
✅ Location permission granted
🎮 EMULATOR DETECTED - Using mock route coordinates
🎮 Starting mock location updates every 5000ms
🎮 Mock location 1/18: 39.8975369760724, 4.25736044721203
[wait 5 seconds]
🎮 Mock location 2/18: 39.8974507634291, 4.26061349991107
[continues through 18 points, loops]

✅ SUCCESS if:

  • You see Is Emulator: true
  • You see 🎮 EMULATOR DETECTED
  • Mock locations start automatically
  • 18 points loop every 5 seconds

❌ FAIL if:

  • Is Emulator: falseCOPY THE LOG with complete Device Info
    • In this case, activate FORCE_MOCK_GPS (see below)

🔧 Workaround: Emulator Not Detected

If emulator shows Is Emulator: false, force mock manually:

Step 1: Activate FORCE_MOCK_GPS

Edit AndroidLocationService.kt:42:

private val FORCE_MOCK_GPS = true  // Change to true

Step 2: Rebuild

./gradlew clean
./gradlew :composeApp:assembleDebug

Step 3: Reinstall

adb uninstall com.followmemobile.camidecavalls
adb install composeApp/build/outputs/apk/debug/composeApp-debug.apk

Step 4: Test again

You should see:

🔍 Is Emulator: false
🔍 Force Mock GPS: true
🎮 FORCED MOCK MODE - Using mock route coordinates

📊 What to Do with Results

If Real Device Works

Copy entire log here from first location to 3-4 updates. Verify:

  • Accuracy: should improve (100m → 15m → 5m)
  • Frequency: ~5 seconds between updates
  • UI: Does map update? Do statistics update?

If Emulator Doesn't Detect

Copy complete "Device Info" block:

🔍 Device Info:
  FINGERPRINT: ...
  MODEL: ...
  MANUFACTURER: ...
  ... (all)

I'll use this info to add your emulator to detection.

If Nothing Works

  1. Verify APK installed: adb shell pm list packages | grep camidecavalls
  2. Verify version: In log search for minDistance= → MUST be 0.0m
  3. Copy entire log from app start

🎯 Goals of This Test

  1. Real Device: Confirm continuous updates every 5s
  2. Emulator: Identify fingerprint for detection
  3. Accuracy: Verify improvement over time
  4. UI: Test if map/stats update correctly

📝 Report Template

When you have results, copy this:

## Test Real Device
- Device: [phone model]
- minDistance in log: [0.0m or 5.0m?]
- Updates received: [YES/NO]
- Frequency: [every X seconds]
- Initial accuracy: [±XXm]
- Accuracy after 30s: [±XXm]
- UI updated: [YES/NO]

Complete log:
[paste here]

## Test Emulator
- Emulator type: [ARM/x86]
- Is Emulator detected: [true/false]
- Device Info from log:
  [paste complete block here]
- Mock GPS active: [YES/NO]
- Updates received: [YES/NO]

Complete log:
[paste here]

🚀 Final Notes

  • minDistance=0.0m is CRITICAL - If you see 5.0m, it's not the new version
  • Logs are key - Without logs I can't debug
  • Real device first - It's the most important
  • Emulator is secondary - If it doesn't work, we'll use FORCE_MOCK_GPS