Skip to content

Commit 46acf81

Browse files
committed
Update uno
Base app
0 parents  commit 46acf81

Some content is hidden

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

41 files changed

+963
-0
lines changed

.gitignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild

.idea/encodings.xml

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

.idea/gradle.xml

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

.idea/misc.xml

+9
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/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

app/build.gradle

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 28
5+
defaultConfig {
6+
applicationId "com.beachhacks.patientnest"
7+
minSdkVersion 15
8+
targetSdkVersion 28
9+
versionCode 1
10+
versionName "1.0"
11+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12+
multiDexEnabled true //TAG fix
13+
}
14+
buildTypes {
15+
release {
16+
minifyEnabled false
17+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
18+
}
19+
}
20+
}
21+
22+
dependencies {
23+
implementation fileTree(dir: 'libs', include: ['*.jar'])
24+
implementation 'com.android.support:appcompat-v7:28.0.0'
25+
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
26+
testImplementation 'junit:junit:4.12'
27+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
28+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
29+
implementation 'com.google.firebase:firebase-core:16.0.8' //Firebase
30+
implementation 'com.google.firebase:firebase-auth:16.2.1' //Firebase Authentication
31+
implementation 'com.google.firebase:firebase-firestore:18.2.0' //Firebase Database
32+
implementation 'com.android.support:multidex:1.0.3'
33+
}
34+
35+
apply plugin: 'com.google.gms.google-services' //Firebase
36+

app/google-services.json

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"project_info": {
3+
"project_number": "44207626886",
4+
"firebase_url": "https://patient-nest-d01de.firebaseio.com",
5+
"project_id": "patient-nest-d01de",
6+
"storage_bucket": "patient-nest-d01de.appspot.com"
7+
},
8+
"client": [
9+
{
10+
"client_info": {
11+
"mobilesdk_app_id": "1:44207626886:android:66d7069e153c5ba7",
12+
"android_client_info": {
13+
"package_name": "com.beachhacks.patientnest"
14+
}
15+
},
16+
"oauth_client": [
17+
{
18+
"client_id": "44207626886-k0h7764m9u2rssus1vn8l710v9th6ft6.apps.googleusercontent.com",
19+
"client_type": 1,
20+
"android_info": {
21+
"package_name": "com.beachhacks.patientnest",
22+
"certificate_hash": "31dab2592dbde14d572eb79f35f56e0d301e63aa"
23+
}
24+
},
25+
{
26+
"client_id": "44207626886-uibdgof730cd928k5c5uil7h9a19g22u.apps.googleusercontent.com",
27+
"client_type": 3
28+
}
29+
],
30+
"api_key": [
31+
{
32+
"current_key": "AIzaSyCYPWeGffplHkr3--AJChm_gOmwoeAxnFU"
33+
}
34+
],
35+
"services": {
36+
"appinvite_service": {
37+
"other_platform_oauth_client": [
38+
{
39+
"client_id": "44207626886-uibdgof730cd928k5c5uil7h9a19g22u.apps.googleusercontent.com",
40+
"client_type": 3
41+
}
42+
]
43+
}
44+
}
45+
}
46+
],
47+
"configuration_version": "1"
48+
}

app/proguard-rules.pro

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.beachhacks.patientnest;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumented test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("com.beachhacks.patientnest", appContext.getPackageName());
25+
}
26+
}

app/src/main/AndroidManifest.xml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.beachhacks.patientnest">
4+
5+
<application
6+
android:name=".MyApplication"
7+
android:allowBackup="true"
8+
android:icon="@mipmap/ic_launcher"
9+
android:label="@string/app_name"
10+
android:roundIcon="@mipmap/ic_launcher_round"
11+
android:supportsRtl="true"
12+
android:theme="@style/AppTheme">
13+
<activity android:name=".MainActivity"></activity>
14+
<activity android:name=".LoginActivity">
15+
<intent-filter>
16+
<action android:name="android.intent.action.MAIN" />
17+
18+
<category android:name="android.intent.category.LAUNCHER" />
19+
</intent-filter>
20+
</activity>
21+
</application>
22+
23+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
package com.beachhacks.patientnest;
2+
3+
import android.content.Intent;
4+
import android.support.annotation.NonNull;
5+
import android.support.v7.app.AppCompatActivity;
6+
import android.os.Bundle;
7+
8+
import android.view.View;
9+
import android.widget.Toast;
10+
import android.widget.EditText;
11+
import android.widget.Button;
12+
13+
import com.google.android.gms.tasks.OnCompleteListener;
14+
import com.google.android.gms.tasks.Task;
15+
import com.google.firebase.auth.AuthResult;
16+
import com.google.firebase.auth.FirebaseAuth;
17+
18+
public class LoginActivity extends AppCompatActivity {
19+
private EditText email;
20+
private EditText password;
21+
private Button login;
22+
23+
private FirebaseAuth firebaseAuth;
24+
25+
@Override
26+
protected void onCreate(Bundle savedInstanceState) {
27+
super.onCreate(savedInstanceState);
28+
setContentView(R.layout.activity_login);
29+
30+
email = findViewById(R.id.etEmail);
31+
password = findViewById(R.id.etPassword);
32+
login = findViewById(R.id.btnLogin);
33+
firebaseAuth = FirebaseAuth.getInstance();
34+
35+
/*
36+
User login button action
37+
*/
38+
login.setOnClickListener(new View.OnClickListener() {
39+
@Override
40+
public void onClick(View v) {
41+
if (email.getText().toString().isEmpty() && password.getText().toString().isEmpty()) { //Check for empty fields
42+
Toast.makeText(LoginActivity.this, "Please fill out the fields with valid input",
43+
Toast.LENGTH_LONG).show();
44+
}
45+
else {
46+
firebaseAuth.signInWithEmailAndPassword(email.getText().toString(),
47+
password.getText().toString())
48+
.addOnCompleteListener(new OnCompleteListener<AuthResult>() {
49+
@Override
50+
public void onComplete(@NonNull Task<AuthResult> task) {
51+
startActivity(new Intent(LoginActivity.this, MainActivity.class));
52+
}
53+
});
54+
}
55+
}
56+
});
57+
58+
}
59+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package com.beachhacks.patientnest;
2+
3+
import android.support.annotation.NonNull;
4+
import android.support.v7.app.AppCompatActivity;
5+
import android.os.Bundle;
6+
import android.util.Log;
7+
8+
import com.google.android.gms.tasks.OnCompleteListener;
9+
import com.google.android.gms.tasks.Task;
10+
import com.google.firebase.firestore.FirebaseFirestore;
11+
import com.google.firebase.firestore.QueryDocumentSnapshot;
12+
import com.google.firebase.firestore.QuerySnapshot;
13+
14+
import java.util.HashMap;
15+
import java.util.Map;
16+
17+
public class MainActivity extends AppCompatActivity {
18+
private static final String TAG = "users";
19+
private FirebaseFirestore db;
20+
21+
@Override
22+
protected void onCreate(Bundle savedInstanceState) {
23+
super.onCreate(savedInstanceState);
24+
setContentView(R.layout.activity_main);
25+
26+
db = FirebaseFirestore.getInstance();
27+
db.collection("users").get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() {
28+
@Override
29+
public void onComplete(@NonNull Task<QuerySnapshot> task) {
30+
if (task.isSuccessful()) {
31+
for (QueryDocumentSnapshot document : task.getResult()) {
32+
Log.d(TAG, document.getId() + " => " + document.getData());
33+
}
34+
}
35+
else {
36+
Log.w(TAG, "Error getting documents.", task.getException());
37+
}
38+
}
39+
});
40+
}
41+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
xmlns:aapt="http://schemas.android.com/aapt"
3+
android:width="108dp"
4+
android:height="108dp"
5+
android:viewportWidth="108"
6+
android:viewportHeight="108">
7+
<path
8+
android:fillType="evenOdd"
9+
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
10+
android:strokeWidth="1"
11+
android:strokeColor="#00000000">
12+
<aapt:attr name="android:fillColor">
13+
<gradient
14+
android:endX="78.5885"
15+
android:endY="90.9159"
16+
android:startX="48.7653"
17+
android:startY="61.0927"
18+
android:type="linear">
19+
<item
20+
android:color="#44000000"
21+
android:offset="0.0" />
22+
<item
23+
android:color="#00000000"
24+
android:offset="1.0" />
25+
</gradient>
26+
</aapt:attr>
27+
</path>
28+
<path
29+
android:fillColor="#FFFFFF"
30+
android:fillType="nonZero"
31+
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
32+
android:strokeWidth="1"
33+
android:strokeColor="#00000000" />
34+
</vector>

0 commit comments

Comments
 (0)