Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
2bfbb72
File external storage
shetyeanuja Oct 6, 2022
002f894
Crashlytics dependency added
shetyeanuja Oct 7, 2022
25f5e7d
Crashlytics dependency added
shetyeanuja Oct 7, 2022
1e2b377
Language settings
shetyeanuja Oct 12, 2022
4194d9a
Language settings
shetyeanuja Oct 12, 2022
65aa9ae
Language settings
shetyeanuja Oct 14, 2022
62ed4ed
Pull request changes
shetyeanuja Oct 14, 2022
f45b5ad
Pull request changes
shetyeanuja Oct 16, 2022
00dd7cc
Showing notification
shetyeanuja Oct 28, 2022
fd5000f
Adds
shetyeanuja Oct 31, 2022
ecb52e8
Adds
shetyeanuja Oct 31, 2022
88fffae
AsyncTask modified, Admob added
shetyeanuja Nov 6, 2022
d6a1e86
AsyncTask modified, Admob added
shetyeanuja Nov 6, 2022
fa80498
AsyncTaskExecutorService added, Admob added, strings.xml translated
shetyeanuja Nov 8, 2022
4d2ba3d
AsyncTaskExecutorService added, Admob added, strings.xml translated
shetyeanuja Nov 9, 2022
8a8b777
Firebase database for practice files
shetyeanuja Nov 14, 2022
4f95111
Removed google sign in
shetyeanuja Nov 14, 2022
83df4b9
Removed google sign in
shetyeanuja Nov 14, 2022
90c996e
deleting files from Firebase
shetyeanuja Nov 16, 2022
243fe39
Exit without saving practice file
shetyeanuja Nov 17, 2022
320c6b2
Create README1.md
shetyeanuja Nov 19, 2022
381d606
Update and rename README1.md to ABOUT_CLASSES.md
shetyeanuja Nov 19, 2022
917ede7
Notifications
shetyeanuja Nov 22, 2022
a2eb9fd
Merge branch 'branch_8_11_2022' of https://github.com/maniksejwal/Mem…
shetyeanuja Nov 22, 2022
79f36ae
Firebase authentication
shetyeanuja Nov 24, 2022
e916931
Google sign in
shetyeanuja Dec 1, 2022
8bf137b
Google sign in
shetyeanuja Dec 1, 2022
0bb2d21
Encryption added
shetyeanuja Dec 4, 2022
288f27b
removed google sign in and firebase code. Branch 8_12_2022_firebase h…
shetyeanuja Dec 22, 2022
62eaa94
Create UML.drawio
shetyeanuja Dec 30, 2022
5c430f2
Add files via upload
shetyeanuja Dec 30, 2022
707e789
Delete UML.drawio
shetyeanuja Dec 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.hprof filter=lfs diff=lfs merge=lfs -text
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
app/build
app/src/main/java/com/memory_athlete/memoryassistant/inAppBilling/Encryption.java
app/src/main/java/com/memory_athlete/memoryassistant/Encryption.java
app/google-services.json
app/mapping.txt
.signing/
Expand All @@ -8,6 +9,7 @@ app/fabric.properties
gradle.properties
resources/


#built application files
*.apk
*.ap_
Expand Down
58 changes: 58 additions & 0 deletions ABOUT_CLASSES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Memory Assistant

## BaseActivity.java
This activity is created once at the time of app installation. The `onCreate` method creates a Spinner with different languages and the selected language is applied throughout the App. It also asks user for signing in through their **Google Account**. `MainActivity` is created after language selection.

## MainActivity.java
The `onCreateOptionsMenu` method creates a Menu bar and the `onOptionsItemSelected` method selects the option from the menu bar, if **Privacy Policy** is selected, it creates `PrivacyPolicy` activity which renders the WebView for displaying the policy information.
`onRequestPermissionsResult()` asks permission from user for accessing storage.
`onResume()` resumes the activity.
`onBackPressed()` closes the activity.
The `onCreate` method calls following methods -
`setAdapter()` - It sets the list of features the app has to provide.
`firstStart()` - It checks if the app is opened for the first time.
`verifyInstallerId()` - It checks where the app is installed from.
[Google AdMob](https://developers.google.com/admob) is used for displaying the Banner Ad.

## Learn.java
The `onCreate` method calls `setAdapter()` which displays the list of all the learning techniques used for improving the memory.

## Practice.java
The `onCreate` method calls `setAdapter()` which lists the different disciplines for practicing.

## MySpace.java
The `onStart`method calls `setAdapter` which lists the different sections for creating our own practice files.
The `add()` method creates `WriteFile` activity for creating a new file

## WriteFile.java
The `onCreateOptionsMenu` method creates a Menu bar and the `onOptionsItemSelected` method selects the option from the menu bar, if 'Delete' is selected, it creates deletes the selected file and 'Exit without Saving' discards the file changes.
The `save()` method creates a new file and saves on the device and if signed in, stores on the **Firebase**. The saved file can also be edited.
The `search()` method searches the keyword inside the file.
The `deleteFromFirebase()` method deletes the file stored on Firebase.


## Preferences.java
The `onCcreatePreferences()` method calls -
`bindPreferenceSummaryToValue()` and `bindPreferenceToast()`- for showing the current value of the preference.
The `onPreferenceChange()` method is called when a preference has been changed by the user. This is called before the state of the Preference is about to be updated and before the state is persisted. Depending on the preference, the settings can be changed by the user.
The `onDisplayPreferenceDialog()` method creates a time picker dialog for setting the time.
The `myAlarm()` method is used for notifying the user everyday at selected time.
The `onStop()` method is called when the preference is changed and asks user to restart the app so that the changes are reflected.

## Contribute.java
The `onCreate` method calls `setAdapter()` which lists the different ways of contributing to the app.

## ReminderUtils.java
It uses WorkManager to schedule and execute deferrable background work.
The `scheduleReminder()` method creates a one time WorkRequest with certain constraints and builds `MyWorkerForReminder` class which is the entry point of executing the work for reminder notifications.
The `mySpaceReminder()` method creates a one time WorkRequest with certain constraints and builds `MyWorkerForSpace` class which is the entry point of executing the work for myspace notifications.

## MyWorkerForReminder.java
It calls`NotificationUtils.createNotification()` which notifies the user when certain conditions are met.

## MyWorkerForSpace.java
It calls `NotificationUtils.createMySpaceNotification()` which notifies the user when a practice file is edited.

## NotificationUtils.java
The `createNotification()` method calls `text()` which provides the text to be displayed for notification.
The `createMySpaceNotification()` method calls `mySpcaetext()` which provides the text to be displayed for myspace files notification.
Binary file added Activity Diagram.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Use Case.drawio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
79 changes: 51 additions & 28 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,55 @@ buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}

dependencies {
classpath 'io.fabric.tools:gradle:1.30.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
//apply plugin: 'com.jakewharton.hugo'

def keystorePropertiesFile = rootProject.file("other/.keystore.properties")
def keystorePropertiesFile = rootProject.file("C:\\Users\\Memory - new key\\keystore.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))

android {
bundle {
language {
enableSplit = false
}
}
signingConfigs {
config {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storeFile file('C:\\Users\\Memory - new key\\android.jks')
storePassword keystoreProperties['storePassword']
}
}
compileSdkVersion 29
buildToolsVersion '28.0.3'
compileSdkVersion 32
// buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.memory_athelte.memoryassistant"
minSdkVersion 21
targetSdkVersion 29
versionCode 153
versionName "1.8.2"
targetSdkVersion 32
versionCode 170
versionCode 176

versionName "2.0.0"
versionName "2.1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
debug{
//minifyEnabled true
minifyEnabled true
}
release {
//minifyEnabled true
minifyEnabled true
//shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
//signingConfig signingConfigs.release
}
}
productFlavors {
Expand All @@ -57,42 +62,60 @@ android {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
}
}

dependencies {
implementation 'com.google.firebase:firebase-database:20.1.0'
def work_version = "2.7.1"
implementation fileTree(include: ['*.jar'], dir: 'libs')

implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.multidex:multidex:2.0.1'

implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.preference:preference:1.1.0'
implementation 'androidx.browser:browser:1.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.vectordrawable:vectordrawable:1.1.0'

implementation 'com.google.firebase:firebase-appindexing:19.1.0'
implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
implementation 'com.google.firebase:firebase-core:17.2.3'
implementation 'com.google.firebase:firebase-perf:19.0.5'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'

implementation 'com.google.firebase:firebase-appindexing:20.0.0'
// implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
implementation 'com.google.firebase:firebase-core:21.1.1'
implementation 'com.google.firebase:firebase-perf:20.2.0'
implementation 'org.solovyev.android:checkout:1.2.2'
implementation 'com.squareup.picasso:picasso:2.71828'

implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'com.jakewharton:butterknife:' + butterknifeVersion
annotationProcessor 'com.jakewharton:butterknife-compiler:' + butterknifeVersion

implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "androidx.work:work-runtime:$work_version"
implementation "androidx.concurrent:concurrent-futures:1.1.0"
implementation 'com.google.firebase:firebase-storage:20.1.0'
implementation 'com.google.android.gms:play-services-auth:20.3.0'

implementation 'com.android.billingclient:billing:5.0.0'
implementation 'com.google.guava:guava:24.1-jre'
implementation 'com.google.guava:guava:27.0.1-android'

implementation 'com.google.android.gms:play-services-ads:21.3.0'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
annotationProcessor 'com.jakewharton:butterknife-compiler:' + butterknifeVersion
implementation platform('com.google.firebase:firebase-bom:28.0.1')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-crashlytics'
// implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
implementation 'com.google.android.gms:play-services-safetynet'
implementation 'com.google.firebase:firebase-auth:19.4.0'
implementation 'com.github.bumptech.glide:glide:4.11.0'
//noinspection GradleCompatible.
androidTestImplementation 'androidx.test:rules:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-intents:' + espressoVersion
androidTestImplementation 'androidx.test.espresso:espresso-core:' + espressoVersion
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
//maven { url 'https://maven.fabric.io/public' }
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

3 changes: 2 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
-printmapping mapping.txt
-printmapping mapping.txt

Binary file added app/release/app-release.aab
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package com.memory_athlete.memoryassistant;

import static com.memory_athlete.memoryassistant.TestHelper.waitForExecution;

import android.content.Intent;

import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;

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

import static com.memory_athlete.memoryassistant.TestHelper.waitForExecution;

@RunWith(AndroidJUnit4ClassRunner.class)
public class ExampleInstrumentedUnitTests {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package com.memory_athlete.memoryassistant;

import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static com.memory_athlete.memoryassistant.TestHelper.waitForExecution;
import static org.junit.Assert.assertEquals;

import android.content.SharedPreferences;
import android.widget.ListView;

Expand All @@ -19,11 +24,6 @@
import java.util.Random;
import java.util.Scanner;

import static androidx.test.espresso.Espresso.onView;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static com.memory_athlete.memoryassistant.TestHelper.waitForExecution;
import static org.junit.Assert.assertEquals;

@RunWith(AndroidJUnit4ClassRunner.class)
public class MainActivityInstrumentedUnitTests {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
package com.memory_athlete.memoryassistant;

import static com.memory_athlete.memoryassistant.TestHelper.waitForExecution;
import static org.junit.Assert.assertEquals;

import android.content.Context;

import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.internal.runner.junit4.AndroidJUnit4ClassRunner;
import androidx.test.platform.app.InstrumentationRegistry;

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

import static com.memory_athlete.memoryassistant.TestHelper.waitForExecution;
import static org.junit.Assert.assertEquals;

/**
* Instrumentation test, which will execute on an Android device.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package com.memory_athlete.memoryassistant;

import static android.Manifest.permission.READ_EXTERNAL_STORAGE;
import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
import static androidx.core.content.PermissionChecker.checkSelfPermission;
import static com.memory_athlete.memoryassistant.Helper.APP_FOLDER;
import static com.memory_athlete.memoryassistant.TestHelper.waitForExecution;

import android.content.pm.PackageManager;
import android.os.Build;

Expand All @@ -17,12 +23,6 @@
import java.io.IOException;
import java.nio.file.Files;

import static android.Manifest.permission.READ_EXTERNAL_STORAGE;
import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
import static androidx.core.content.PermissionChecker.checkSelfPermission;
import static com.memory_athlete.memoryassistant.Helper.APP_FOLDER;
import static com.memory_athlete.memoryassistant.TestHelper.waitForExecution;

@RunWith(AndroidJUnit4ClassRunner.class)
public class WithStoragePermissionInstrumentedUnitTests {
@Rule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
package com.memory_athlete.memoryassistant;

import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
import static androidx.core.content.ContextCompat.checkSelfPermission;
import static com.memory_athlete.memoryassistant.Helper.APP_FOLDER;
import static com.memory_athlete.memoryassistant.TestHelper.waitForExecution;

import android.content.pm.PackageManager;
import android.os.Build;

Expand All @@ -17,11 +22,6 @@
import java.nio.file.AccessDeniedException;
import java.nio.file.Files;

import static android.Manifest.permission.WRITE_EXTERNAL_STORAGE;
import static androidx.core.content.ContextCompat.checkSelfPermission;
import static com.memory_athlete.memoryassistant.Helper.APP_FOLDER;
import static com.memory_athlete.memoryassistant.TestHelper.waitForExecution;

@RunWith(AndroidJUnit4ClassRunner.class)
public class WithoutStoragePermissionInstrumentedUnitTests {
@Rule
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
package com.memory_athlete.memoryassistant.main;


import static androidx.test.espresso.Espresso.onData;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static com.memory_athlete.memoryassistant.TestHelper.waitForExecution;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.anything;

import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
Expand All @@ -20,13 +27,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;

import static androidx.test.espresso.Espresso.onData;
import static androidx.test.espresso.action.ViewActions.click;
import static androidx.test.espresso.matcher.ViewMatchers.withId;
import static com.memory_athlete.memoryassistant.TestHelper.waitForExecution;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.anything;

@LargeTest
@RunWith(AndroidJUnit4ClassRunner.class)
public class PreferenceActivityInstrumentedUnitTests {
Expand Down
Loading