SchoolTripTrack is a comprehensive multi-vendor school bus tracker system for managing the daily school bus operation that links the school, the guardians and the buses into one powerful system..
SchoolTripTrack consists of two Flutter apps for guardians and drivers along with an Admin panel with a Laravel API system as a back-end and a Vue.js front-end system as a web interface.
Here we present how you can generate both the Android and iOS mobile apps from the purchased source code.
Go to Firebase Console and in Project settings, click on Add App
Choose Android and enter the package name of the app. The package name can be found in the file android/app/build.gradle
Download the google-services.json file and place it in the path "android/app"
Edit the firebase_options file in lib/firebase_options.dart by your changing the FirebaseOptions by yours that can be obtained from the downloaded google-services.json file
Repeat the same steps for iOS app by choosing iOS instead of Android in the first step.
Please note that some terms may be different than the ones in the google-services.json file. For example, the mobilesdk_app_id in the google-services.json file is called "appId" in the FirebaseOptions class. Another example is the project_number in the google-services.json file is called "messagingSenderId" in the FirebaseOptions class.
Edit the manifest file in android/app/src/main/AndroidManifest.xml by adding your Google maps API key in the following line
com.google.android.geo.API_KEY
Replace YOUR-API-KEY with your Google maps API key in ios/Runner/AppDelegate.swift
GMSServices.provideAPIKey("YOUR-API-KEY")
Edit the file lib/utils/config.dart to configure the Flutter app before building.
static String webUrl = "SchoolTripTrack.creativeapps.info/backend";
static String googleApikey = "AIzaSy......";
static String socketUrl = "YourSocketUrl";
static String socketPort = 'YourSocketPort';
flutter pub get
Edit the file lib/utils/config.dart to configure the ads by changing the following lines
static String androidInterstitialAdUnitId = "YourAdmobInterstitialIdForAndroid";
static String iosInterstitialAdUnitId = "YourAdmobInterstitialIdForIOS";
Edit the manifest file in android/app/src/main/AndroidManifest.xml by adding your Admob App ID in the following line
com.google.android.gms.ads.APPLICATION_ID
flutter pub getIn order to build the android app correctly, please make sure that you have installed the latest Android Studio IDE. Please install Android Studio 3.5 or above.
Before you can publish your Flutter app to Google Play, the app needs a digital signature.
On Mac, use the following command:
keytool -genkey -v -keystore ~/key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias key
On Windows, use the following command:
keytool -genkey -v -keystore c:/Users/USER_NAME/key.jks -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -alias key
Create a file named /android/key.properties that will reference your keystore, it will look like this:
storePassword= keyPassword= keyAlias=key storeFile=/key.jks>
You will find your Gradle file at /android/app/build.gradle. Start editing and follow these steps:
Add the keystore information that we just created before "android{":
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
Then, replace:
content_copy
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now,
// so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
With the signing configuration info:
content_copy
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
You have now configured your app’s Gradle file and your release builds will be signed automatically.
Now you’ll build your app’s APK so it can be uploaded to the Google Play Store. Go to your command line and follow these steps:
cdflutter build apkIf everything goes well, you will have an APK ready at /build/app/outputs/apk/release/app.apk
Your app is ready! Next, follow this link to uploading an APK to the Google Play Store.
You can also generate the APK directly from the Android Studio by opening the android project inside the purchased folder.
In order to build the iOS app please make sure that you have XCode installed. Please install XCode 11.3 or above, then open it and follow the following steps
Please run this command in the the project directory
flutter build ios
Before you can build and release your app on the App Store, you need to set up a place for it using App Store Connect. But first, you need to register a unique bundle ID for your app. This can be done by logging into your Apple Developer account and following these steps:
Now that we have a unique bundle ID, it’s time to set up a place for your app on the App Store Connect. Log in to the App Store Connect.
You’ve set everything up from Apple’s side, and next you’ll adjust your Xcode project’s settings to prepare your app for release. Go ahead and fire up Xcode.
At this point, all the settings have been updated for release and there is a placeholder ready on App Store Connect, which means you can build and release.
flutter build iosBack on App Store Connect, check the status of your build from the Activities tab. Once it’s ready to release:
That’s it! Your app will now be uploaded to the App Store. Apple will review your app before releasing and keep you updated on the status of your app.
Edit the app_theme.dart file in the path "FlutterApp/lib/app_theme.dart". The file contains all used colors in the app and font styles of the text.
For Android, go to "FlutterApp/android/app/src/main/res" folder. You should see some folders beginning with mipmap-* which represent different pixel densities. Replace launcher_icon.png file in each folders to use custom icons.
For iOS, the icon config and files are located inside "FlutterApp/ios/Runner/Assets.xcassets/AppIcon.appiconset". The Contents.json file defines a list of icon images with different sizes and scales. The files are located in the same folder. It's recommended to follow the guideline for designing iOS icon
Once again, thank you so much for purchasing our SchoolTripTrack App. As I said at the beginning, I'd be glad to help you if you have any questions. I'll do my best to assist. If you have a more general question relating to the items on CodeCanyon, you might consider visiting the forums and asking your question in the "Item Discussion" section.
CreativeAppsDev Team