Skip to content

Commit d5bedbe

Browse files
committed
add android app
1 parent 71e5e20 commit d5bedbe

File tree

89 files changed

+2873
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+2873
-0
lines changed

.idea/codeStyles/Project.xml

+116
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

+58
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations.xml

+12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/build.gradle

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'kotlin-android'
3+
4+
android {
5+
compileSdkVersion 29
6+
defaultConfig {
7+
applicationId 'com.digital.hospital'
8+
minSdkVersion 21
9+
targetSdkVersion 29
10+
versionCode 1
11+
versionName "1.0"
12+
multiDexEnabled = true
13+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
14+
}
15+
16+
buildTypes {
17+
release {
18+
minifyEnabled false
19+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20+
}
21+
debug {
22+
minifyEnabled false
23+
testCoverageEnabled false
24+
}
25+
}
26+
27+
viewBinding {
28+
enabled = true
29+
}
30+
31+
productFlavors {
32+
}
33+
34+
lintOptions {
35+
abortOnError false
36+
}
37+
38+
kotlinOptions {
39+
jvmTarget = JavaVersion.VERSION_1_8
40+
}
41+
42+
// solve duplicate classes
43+
applicationVariants.all { variant ->
44+
variant.getRuntimeConfiguration().exclude group: 'com.google.code.findbugs', module: 'jsr305'
45+
variant.getRuntimeConfiguration().exclude group: 'com.google.code.findbugs', module: 'annotations'
46+
}
47+
}
48+
49+
dependencies {
50+
51+
// Kotlin
52+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$rootProject.kotlinVersion"
53+
54+
implementation "com.google.android.material:material:$rootProject.materialVersion"
55+
implementation "androidx.appcompat:appcompat:$rootProject.appCompatVersion"
56+
implementation "androidx.recyclerview:recyclerview:$rootProject.recyclerVersion"
57+
58+
implementation "androidx.constraintlayout:constraintlayout:$rootProject.constraintLayoutVersion"
59+
60+
//Navigation
61+
implementation "androidx.navigation:navigation-fragment-ktx:$rootProject.navigationVersion"
62+
implementation "androidx.navigation:navigation-ui-ktx:$rootProject.navigationVersion"
63+
64+
implementation "com.ibm.watson:assistant:$rootProject.watsonAssistentVersion"
65+
implementation "com.ibm.watson.developer_cloud:android-sdk:$rootProject.watsonSDKVersion"
66+
67+
68+
69+
implementation ("com.github.bumptech.glide:glide:$rootProject.glideVersion") {
70+
exclude group: "com.android.support"
71+
}
72+
annotationProcessor "com.github.bumptech.glide:compiler:$rootProject.glideVersion"
73+
74+
}

app/proguard-rules.pro

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Add any project specific keep options here:
2+
3+
# If your project uses WebView with JS, uncomment the following
4+
# and specify the fully qualified class name to the JavaScript interface
5+
# class:
6+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
7+
# public *;
8+
#}

app/src/main/AndroidManifest.xml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="com.digital.hospital">
5+
6+
<uses-permission android:name="android.permission.INTERNET" />
7+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
8+
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
9+
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
10+
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
11+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
12+
<uses-permission android:name="android.permission.RECORD_AUDIO" />
13+
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
14+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
15+
16+
<application
17+
android:allowBackup="false"
18+
android:icon="@mipmap/ic_launcher"
19+
android:label="@string/app_name"
20+
android:supportsRtl="true"
21+
android:theme="@style/AppTheme"
22+
tools:ignore="GoogleAppIndexingWarning">
23+
<activity
24+
android:name="com.digital.hospital.MainActivity"
25+
android:screenOrientation="portrait"
26+
>
27+
<intent-filter>
28+
<action android:name="android.intent.action.MAIN" />
29+
30+
<category android:name="android.intent.category.DEFAULT" />
31+
<category android:name="android.intent.category.LAUNCHER" />
32+
</intent-filter>
33+
34+
</activity>
35+
<activity android:name=".chat.ChatActivity" />
36+
37+
<meta-data
38+
android:name="preloaded_fonts"
39+
android:resource="@array/preloaded_fonts" />
40+
41+
</application>
42+
43+
</manifest>
60.2 KB
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
package com.digital.hospital
2+
3+
import android.os.Bundle
4+
import androidx.appcompat.app.AppCompatActivity
5+
import androidx.navigation.NavController
6+
import androidx.navigation.fragment.NavHostFragment
7+
import androidx.navigation.ui.setupWithNavController
8+
import com.digital.hospital.databinding.HomeActivityBinding
9+
10+
/**
11+
* @CreatedBy Ali Ahsan
12+
*
13+
* Author Email: [email protected]
14+
* Created on: 24/04/20
15+
*/
16+
17+
class MainActivity : AppCompatActivity() {
18+
19+
private lateinit var binding: HomeActivityBinding
20+
21+
override fun onCreate(savedInstanceState: Bundle?) {
22+
super.onCreate(savedInstanceState)
23+
24+
binding = HomeActivityBinding.inflate(layoutInflater)
25+
setContentView(binding.root)
26+
27+
val host: NavHostFragment = supportFragmentManager
28+
.findFragmentById(R.id.nav_host_fragment) as NavHostFragment? ?: return
29+
30+
// Set up Bottom navigation bar
31+
setupBottomNavMenu(host.navController)
32+
}
33+
34+
private fun setupBottomNavMenu(navController: NavController) {
35+
binding.bottomNav.setupWithNavController(navController)
36+
}
37+
}

0 commit comments

Comments
 (0)