Skip to content

Commit

Permalink
Created a Notification and Messaging Client Backend(connects to server)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zedonboy committed Jan 20, 2021
1 parent 057a08e commit 685f0b8
Show file tree
Hide file tree
Showing 11 changed files with 581 additions and 1 deletion.
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

include ':socketManagerLib'
rootProject.name='Fight Pandemics'
include ':app'
include ':core'
Expand Down
1 change: 1 addition & 0 deletions socketManagerLib/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
12 changes: 12 additions & 0 deletions socketManagerLib/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
This Library contains.

1. A backend file that handles Realtime Messaging
and Notifications.

2. The backend file is not tested yet. but needs
a frontend that implements business Logic and UI reactions
frontends listens to event from the eventBus
and updates WebSocket.

3. IF YOU ARE NEW, DO NOT WORK ON THIS DIRECTLY, CONTACT ME([email protected]) FIRST!!!
I WILL DIRECT YOU WHERE YOU SHOULD WORK ON, ESPECIALLY THE TEST CASES
43 changes: 43 additions & 0 deletions socketManagerLib/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 30
buildToolsVersion "30.0.2"

defaultConfig {
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles "consumer-rules.pro"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
testImplementation 'junit:junit:4.13.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

// Socket Libs
implementation 'com.github.nkzawa:socket.io-client:0.6.0'
//Gson
implementation 'com.google.code.gson:gson:2.8.6'
//Eventbus
implementation 'org.greenrobot:eventbus:3.2.0'

}
Empty file.
21 changes: 21 additions & 0 deletions socketManagerLib/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.fightpandemics.socketmanagerlib

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.fightpandemics.socketmanagerlib.test", appContext.packageName)
}
}
4 changes: 4 additions & 0 deletions socketManagerLib/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.fightpandemics.socketmanagerlib">
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
Loading

0 comments on commit 685f0b8

Please sign in to comment.