ananya-bangera / Msft-project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Smart Advertising
AdvertAIse 📲

A platform for companies to utilize smart advertising techniques to analyze and improve their advertisements based on user inputs
Microsoft Engage 2022


Table of Contents

💭Problem Statement

Develop a browser-based application or a native mobile application to demonstrate application of Face Recognition technology in the area of smart advertising.

📰Description

The AdvertAIse mobile application will act as a platform for the companies to utilise smart advertising techniques to analyse and improve their advertisements based on user inputs. The generalised data will help them to get a clear idea of places where work is needed. This will help them to make their advertisements more engaging thereby ensuring a better and effective reach of their advertisement. The focus is on providing overall suggestions as in features liked by most of the users and places where improvement is required.

Use Cases

The Flutter-based app has two access levels :
  1. Company
  2. User

1. Company

  • The companies can post the videos to promote their products
  • The analysis of data i.e of emotions of users will be tracked via an Emotion Detection System at various timestamps of the advertisement.
  • Generalised data will be sent to the respective company’s Dashboard wherein a complete analysis will be displayed.
  • This app will serve as a survey with input being fed by the recognition system which can further be helpful for the marketing team of the company to categorize the features to be ameliorated and those to be abolished.

2. User

  • The users can view the videos posted by the companies
  • The rewards will be provided by the company to the users depending on the advertisements watched by them which can be redeemed
  • Also apart from these rewards user ranking will be provided on basis of the number of advertisements watched
  • The interface provides users with a gamified environment

Business Potential

  • The companies can be charged some fee for using the platform.
  • The users can be provided coins, coupons, and discounts by the participating companies

🔗Resources

🤖Tech-Stack

Flutter Dart FIgma Tensorflow Firebase Teachable Machine Android

📈Progress

  • 2 Access Levels Implemented using Firebase Auth - User & Company
  • Videos Added by company stored in Firebase Storage
  • Videos sorted by categories
  • Figma Designs for the UI created
  • UI implemented in Flutter
  • Emotion Detection Model trained on Teachable Machine, TfLite file generated
  • Model Integrated with Flutter using the tflite package
  • Timestamp-based records of emotions stored in Firebase Database
  • Analytics Graphs(Bar Charts and Pie Charts) for uploaded videos
  • Add a gamified environment for the users
  • Introduce ranking system and leaderboards
  • Display Watched Videos History in the Profile section

🔮Future Scope

  • Allow users to redeem and apply coupons based on their scores
  • Allow companies to run special campaigns
  • Add a subscription-based model for companies to use the platform

🚧Major Roadblocks

  1. Dart Version Conflict with Firebase Dependencies
    The current Dart SDK version is 2.13.1.
    Because smart_advertising depends on cloud_firestore >=3.1.10 which requires SDK version >=2.16.0 <3.0.0, version solving failed.
     pub get failed (1; Because smart_advertising depends on cloud_firestore >=3.1.10 which requires SDK version >=2.16.0 <3.0.0, version solving failed.)
     Process finished with exit code 1
    
    Solved by using version suitable to my current SDK version
  2. BuildContext Error
    error: [dart] The argument type 'Context' can't be assigned to the parameter type 'BuildContext'. [argument_type_not_assignable]
    
    By passing the BuildContext context or Just context in the function helped me solved the problem
  3. Missing Firebase Dependency
    lib/pages/registeration.dart:252:21: Warning: Operand of null-aware operation '!' has type 'User' which excludes null.
      - 'User' is from 'package:firebase_auth/firebase_auth.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_auth-2.0.0/lib/firebase_auth.dart').
     userModel.uid = user!.uid;
     /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_platform_interface-5.5.0/lib/src/method_channel/method_channel_firestore.dart:112:15: Error: Method not found: 'Error.throwWithStackTrace'.
             Error.throwWithStackTrace(
     ^^^^^^^^^^^^^^^^^^^
     /C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore_platform_interface-5.5.0/lib/src/method_channel/utils/exception.dart:14:11: Error: Method not found: 'Error.throwWithStackTrace'.
         Error.throwWithStackTrace(exception, stackTrace);
    
    Solved by adding the dependency firebase_auth_platform_interface: ^5.0.0
  4. Null value Error - a frequent error
    Flutter Compile Error on Firebase Auth: "A non-null value must be returned since the return type 'Never' doesn't allow null."
    
    Solution:
    The error message was added from dart 2.16, i.e from flutter 2.10, so the primary solution will be to upgrade your flutter version, which will also upgrade dart version.
    android{
            //change compile sdk version to 31
            compileSdkVersion 31
     }
    
  5. MultiDex Error
    D8: Cannot fit requested classes in a single dex file 
    
    Add multiDex to your app-level build.gradle file. Under defaultConfig add this line
    multiDexEnabled true
    
    Then in dependencies add multidex and check versions
    implementation 'androidx.multidex:multidex: 2.0.1'
    
  6. TFLite embedding not supported for Android V2
    The plugin `tflite` uses a deprecated version of the Android embedding.
     To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
     If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
    
    Solved by referencing a GitHub repo which updated the TFLite package
  7. Use of async/await from Builder
    type 'Future<dynamic>' is not a subtype of type 'List<String>'
    
    Solution:
    You cannot use async/await when returning from a build method (or a builder closure). Any time you have async when building the widget tree, it's best to use a FutureBuilder

🛠Project Setup

  1. Clone the GitHub repo
git clone https://github.com/ananya-bangera/Msft-project.git
  1. Load the project in Android Studio
  2. Download all the packages listed in pubspec.yaml using pub get command
  3. Integrate with your Firebase Project by adding your Firebase keys

⚙Usage

Based on your Android Development environment, proceed for a Gradle Build to debug and run the app in development mode.

👨‍💻Contributors

👨‍🏫Acknowledgement

📱Screenshots


REGISTER HOMEPAGE




BARCHART PIECHART




UPLOADVIDEO DISPLAYVIDEO



LEADERBOARD PROFILE



About


Languages

Language:Dart 99.5%Language:Swift 0.4%Language:Kotlin 0.1%Language:Objective-C 0.0%