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>
14 lines
370 B
Dart
14 lines
370 B
Dart
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import 'package:pilotvault_fly/main.dart';
|
|
|
|
void main() {
|
|
testWidgets('Shows the login screen when signed out',
|
|
(WidgetTester tester) async {
|
|
await tester.pumpWidget(const DjiSampleApp());
|
|
|
|
expect(find.text('Sign in'), findsWidgets);
|
|
expect(find.text('Sign in to continue'), findsOneWidget);
|
|
});
|
|
}
|