Skip to content

Smart Building System with Nodejs in backend and mysql Database

Notifications You must be signed in to change notification settings

kashiftufail007/FYP-Smart-Building-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

❀️ FYP-Smart-Building-System ❀️

✨ IoT Based Smart Building System ✨



Table of Contents

Splash Screen πŸš€ ❀️

This is animated Splash Screen for My Android App

  • bganim πŸ’»
<translate android:duration="800" 
  android:toYDelta="30%p" 
    android:fromYDelta="0%"/>
  • clovernim πŸ’»
<alpha android:duration="800" 
  android:toAlpha="0.0"
    android:fromAlpha="1.0"/>
  • frombottom πŸ’»
<translate android:duration="800" 
  android:toYDelta="0%" 
      android:fromYDelta="10%p"/>
<alpha android:duration="600" 
    android:toAlpha="1.0" 
        android:fromAlpha="0.0"/>

Login Screen πŸš€ ❀️

  • Email Format Checking Function πŸ’»
Pattern EMAIL_ADDRESS_PATTERN = Pattern
    .compile("[a-zA-Z0-9+._%-+]{1,256}" + "@"
          + "[a-zA-Z0-9][a-zA-Z0-9-]{0,64}" + "(" + "."
              + "[a-zA-Z0-9][a-zA-Z0-9-]{0,25}" + ")+");
  • Use Android πŸ’œ Volley πŸ’œ Framework
    • Import Volley Library to build.gradle
            implementation 'com.mcxiaoke.volley:library:1.0.18'
  • Implement a Link with NodeJS API
    private String Login_GET_User_All_Data_API = 
        "http://10.0.2.2:3000/login_response_data";
  • Link Volley to handle Requests
    requestQueue = Volley.newRequestQueue(getApplicationContext());



Forget Password πŸš€ ❀️

If you forget Password , You can Login Via

  • Google SignIn
  • Mobile Verification

Here Mobile Code Verification is Done with

LocalTxt API

Then You will move to next Activty for verification













          Code Verificaition Activity  πŸ’»
           If verification code matched 

                 Move to Home Page

                       You can resend code after One Mint 

                       You can Change Number




Home Screen πŸš€ ❀️

Button will be Generated Dynamically According to User Access

final Button btn = new Button(this);

On Button Click Data will be Updated in SQLite πŸ’»

 SQLite_DATABASE_OBJECT.update_device_on_off_status_detail_table(btn.getId(), 0);










Schedule Screen πŸš€ ❀️

Here all Schedule Added will be Display and you can add more

  • One Scheddule per Device
  • Scheduled Device will not Display again in Drop Down

Array is defined to Store data about devices under Action

  ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>
        (this,android.R.layout.simple_spinner_item, list);







Storage Screen πŸš€ ❀️

Here all data from database (MySQL) is fetched and Displayed

  • Temperature Data
  • Humidity Data
  • Use Android πŸ’œ MPAndroidChart πŸ’œ πŸ’»
    • Import MPAndroidChart Library to build.gradle
  implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'









Profile Screen πŸš€ ❀️

Here your all data will be display

  • Your Name
  • Location
  • etc
  • Can View Help Manual πŸ’œ

Can Update

  • User Name

  • Phone Number

  • Password

  • Can Manage Devices

  • Can Manage Schedules

  • Use Android πŸ’œ Glide πŸ’œ

    • Import Glide Library to build.gradle
  implementation 'com.github.bumptech.glide:glide:3.8.0'

Update Picture to profile page using Glide

    Glide.with(getApplicationContext()).load(kashif_pic)
                    .thumbnail(0.5f)
                     .crossFade()
                     .diskCacheStrategy(DiskCacheStrategy.ALL)
                     .into(imageView_for_profile_picture);
   

Implicit Intent in App ( Open messaging app Automatically and write about use)

Intent n = new Intent(Intent.ACTION_VIEW);
                n.setType("vnd.android-dir/mms-sms");
                n.putExtra("address", "+92308xxxxx");
                n.putExtra("sms_body","User:   "xyz +"\nLocation:   "+abc+"\n Issue:\n    ");
                startActivity(n);
             

Device Management πŸš€ ❀️

Can be use to

Enable Devce Control

Disable Device

If a Device is Disabled , All Schedule on it will be distroy and no more schedule can be added
















Add AlertDialog Boxes

  AlertDialog.Builder builder = new AlertDialog.Builder(HomePageActivity.this);
                    builder.setTitle("Disable Device !");
                    builder.setMessage("\n If you Disable this device, Schedule on this  will be Delete !");
                    builder.setIcon(R.drawable.ic_sad);
     





Schedule Management πŸš€ ❀️

Can be use to

Delete Schedule

After Deletion Device will be release

Delete on Back-end Side too

Send Notification when time reach and according Action on device



  NotificationManager notificationManager = 
     (NotificationManager) getSystemService(
           Context.NOTIFICATION_SERVICE);
           
  NotificationCompat.Builder notificationBuilder = 
   new NotificationCompat.Builder(
      this, NOTIFICATION_CHANNEL_ID);

Libraries Imported πŸš€ ❀️ ❀️

    implementation 'com.github.bumptech.glide:glide:3.8.0'
    implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'
    implementation 'com.google.firebase:firebase-auth:16.2.1'
    implementation 'com.google.android.gms:play-services-auth:16.0.1'
    implementation 'pl.droidsonroids.gif:android-gif-drawable:1.+'
    implementation 'com.mcxiaoke.volley:library:1.0.18'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.shobhitpuri.custombuttons:google-signin:1.0.0'

Backend NodeJS APIs πŸš€ ❀️ ❀️

Use Node JS on Backend with MySQL Database File Availble in Code Above πŸš€ (Named: SBS APIs)πŸš€

Author πŸ‘€ ❀️

Muhammad Kashif ❀️

License πŸ“

Copyright Β© 2019-2020, Muhammad Kashif. Released under the MIT License.

Please ⭐️ this repository if this project helped you!
More Projects πŸ’ͺ πŸ’ͺ πŸ’ͺ