Follow these steps to set up and run the BlinkID Android mobile application (BlinkID-Android-App).
Before you begin, ensure you have the following installed on your machine:
- Android Studio
- Git
- An Android device or emulator for testing
Open a terminal or command prompt and clone the repository using Git:
git clone https://github.com/your-username/BlinkID-Android-App.git- Open Android Studio.
- Click on
Open an Existing Project. - Navigate to the directory where you cloned the repository and select the
BlinkID-Android-Appfolder.
Ensure you have a Firebase project set up for the application. Follow these steps to configure Firebase:
- Go to the Firebase Console.
- Select your project or create a new one.
- Add an Android app to your project:
- Register your app with your application's package name (e.g.,
com.example.blinkid). - Download the
google-services.jsonfile provided by Firebase.
- Register your app with your application's package name (e.g.,
- Place the
google-services.jsonfile in theappdirectory of your Android project.
Ensure all dependencies are updated in the build.gradle files:
-
build.gradle (Project: BlinkID-Android-App):buildscript { repositories { google() mavenCentral() } dependencies { classpath "com.android.tools.build:gradle:7.0.2" classpath 'com.google.gms:google-services:4.3.10' } } allprojects { repositories { google() mavenCentral() } }
-
build.gradle (Module: app):apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' android { compileSdkVersion 31 defaultConfig { applicationId "com.example.blinkid" minSdkVersion 21 targetSdkVersion 31 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } } dependencies { implementation 'androidx.core:core-ktx:1.6.0' implementation 'androidx.appcompat:appcompat:1.3.1' implementation 'com.google.android.material:material:1.4.0' implementation 'androidx.constraintlayout:constraintlayout:2.1.0' implementation 'com.google.firebase:firebase-auth:21.0.1' implementation 'com.google.firebase:firebase-database:20.0.3' implementation 'com.google.firebase:firebase-storage:20.0.0' testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.3' androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0' }
- Sync the project with Gradle files by clicking
Sync Nowin the notification bar or by going toFile > Sync Project with Gradle Files. - Build the project by clicking on
Build > Make Projector pressingCtrl+F9.
- Connect your Android device via USB or start an emulator in Android Studio.
- Click on
Run > Run 'app'or pressShift+F10.
Once the application is installed on your device or emulator, verify that it is working correctly by going through the registration and authentication processes, including facial recognition and push notifications.
You have successfully set up and run the BlinkID Android mobile application. For further customization or deployment, refer to the additional documentation and resources available in the repository.