Give the Fly App its own identity instead of the DJI sample's

The app still shipped under the identity of the DJI MSDK Flutter sample it
was started from, so every install, log line and crash report named a DJI
sample rather than PilotVault. Rename both namespaces:

  Android  com.dji.flutter.dji_msdk_sample -> com.pilotvault.flyapp
  Dart     dji_msdk_sample                 -> pilotvault_fly

The Kotlin sources move under com/pilotvault/flyapp to match. The manifest's
meta-data name stays com.dji.sdk.API_KEY — that string is fixed by the SDK's
own lookup and is not ours to rename.

A DJI App Key is bound to the application id, so the old key died with the
old id and a new one was registered against com.pilotvault.flyapp. That
forced the key to be touched anyway, so stop committing it: the Gradle
property becomes PILOTVAULT_FLY_API_KEY and now lives in the developer's
~/.gradle/gradle.properties, which Gradle merges into every build.
android/gradle.properties keeps the build flags — gitignoring it wholesale
would have taken useAndroidX and the Flutter migrator flags out of version
control with it — and documents where the key belongs.

A missing key prints a banner rather than silently baking the placeholder
into an APK that cannot register, which otherwise only surfaces as a
registration failure once the tablet is out at the aircraft. That warning
uses println because `flutter build` filters Gradle's warn-level output.

The rename means Android treats this as a new app: uninstall
com.dji.flutter.dji_msdk_sample before installing, or both will sit on the
tablet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
tajniak81andClaude Opus 4.8 committed 2026-07-21 21:11:17 +02:00
1 parent 6ef15a9e80
commit 58655531f0
18 files changed
+66 -30

No files matched your search

@@ -48,10 +48,12 @@
android:name="org.apache.http.legacy"
android:required="false" />
<!-- DJI App Key. The value is injected from gradle.properties (DJI_API_KEY). -->
<!-- DJI App Key. The value is injected from gradle.properties
(PILOTVAULT_FLY_API_KEY). The meta-data name below is fixed by the
DJI SDK and must stay "com.dji.sdk.API_KEY". -->
<meta-data
android:name="com.dji.sdk.API_KEY"
android:value="${DJI_API_KEY}" />
android:value="${PILOTVAULT_FLY_API_KEY}" />
<activity
android:name=".MainActivity"
@@ -1,4 +1,4 @@
package com.dji.flutter.dji_msdk_sample
package com.pilotvault.flyapp
import dji.common.error.DJIError
import dji.common.useraccount.UserAccountState
@@ -1,4 +1,4 @@
package com.dji.flutter.dji_msdk_sample
package com.pilotvault.flyapp
import dji.common.camera.ExposureSettings
import dji.common.camera.SettingsDefinitions
@@ -1,4 +1,4 @@
package com.dji.flutter.dji_msdk_sample
package com.pilotvault.flyapp
import android.app.Application
import android.content.Context
@@ -1,4 +1,4 @@
package com.dji.flutter.dji_msdk_sample
package com.pilotvault.flyapp
import android.content.Context
import android.os.Handler
@@ -1,4 +1,4 @@
package com.dji.flutter.dji_msdk_sample
package com.pilotvault.flyapp
import android.content.Context
import android.graphics.SurfaceTexture
@@ -1,4 +1,4 @@
package com.dji.flutter.dji_msdk_sample
package com.pilotvault.flyapp
import dji.common.flightcontroller.FlightControllerState
import dji.sdk.base.BaseProduct
@@ -1,4 +1,4 @@
package com.dji.flutter.dji_msdk_sample
package com.pilotvault.flyapp
import dji.common.gimbal.Rotation
import dji.common.gimbal.RotationMode
@@ -1,4 +1,4 @@
package com.dji.flutter.dji_msdk_sample
package com.pilotvault.flyapp
import android.Manifest
import android.content.pm.PackageManager
@@ -1,4 +1,4 @@
package com.dji.flutter.dji_msdk_sample
package com.pilotvault.flyapp
import android.graphics.Bitmap
import dji.common.camera.SettingsDefinitions
@@ -1,4 +1,4 @@
package com.dji.flutter.dji_msdk_sample
package com.pilotvault.flyapp
import android.graphics.RectF
import dji.common.mission.activetrack.ActiveTrackMission