Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
38aec64
Initial commit
ayush27prasad Jul 7, 2024
908e0d1
Initial Commit
ayush27prasad Jul 7, 2024
7d02f40
Added Dashboard Fragment
ayush27prasad Jul 20, 2024
d3bb775
mascot added
ayush27prasad Jul 20, 2024
6914971
Revert "mascot added"
ayush27prasad Jul 20, 2024
f38d3aa
Screen layouts, Helper classes and Fragment classes completed
ayush27prasad Aug 12, 2024
55b4246
Merge branch 'main' of https://github.com/ayush27prasad/MathMantra
ayush27prasad Aug 12, 2024
78884f5
resolved conflicts
ayush27prasad Aug 12, 2024
a1d82f7
Final enhancement before lessons
ayush27prasad Aug 26, 2024
7ef4593
Permissions and speech recognition config
ayush27prasad Aug 30, 2024
22c5bdd
counting games check
ayush27prasad Aug 30, 2024
7b4c4f6
so far so good
ayush27prasad Aug 30, 2024
04bd0a3
counting works fine
ayush27prasad Aug 30, 2024
da5dc2c
cleanup
ayush27prasad Aug 30, 2024
02e7302
bugged numberLine
ayush27prasad Aug 30, 2024
74b704d
number line done in a defined range
ayush27prasad Aug 31, 2024
3e4e286
Number line changes
ayush27prasad Aug 31, 2024
ff23da0
narrator todos
ayush27prasad Aug 31, 2024
25a2b26
Number Line : so far so good
ayush27prasad Aug 31, 2024
1d2f7cb
Merge branch 'feature/numberLine'
ayush27prasad Aug 31, 2024
2447333
Narrator Fragment Topic choice fragment added
ayush27prasad Aug 31, 2024
909cb89
Number line completed
ayush27prasad Aug 31, 2024
68eab14
ui color changes in lesson choice screen
ayush27prasad Aug 31, 2024
12930ef
Create funding-manifest-urls
Nalin-x-Linux Oct 22, 2024
df872f4
created back to main activity
harshgupta1064 Mar 25, 2025
adbbea9
Back button enabled to dashboard
harshgupta1064 Mar 25, 2025
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
66 changes: 66 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
# Gradle caches
.gradle/

# Ignore Android Studio specific files
.idea/

# Ignore build output directories
build/
app/build/

# Ignore generated files
gen/
out/
generated/

# Log files
*.log

# Bytecode files
*.class

# Keystore files
*.keystore

# Apk files
*.apk
*.ap_

# IntelliJ IDEA specific files
*.iws
*.ipr
*.iws

# Windows specific files
Thumbs.db
ehthumbs.db
Desktop.ini

# macOS specific files
.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Temporary files created by editors
*.swp
*.swo
*~

1 change: 1 addition & 0 deletions .well-known/funding-manifest-urls
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://zendalona.com/funding.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# zen-maths-tutor
# MathMantra
Maths-Tutor for smart devices
1 change: 1 addition & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
51 changes: 51 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
plugins {
id("com.android.application")
}

android {
namespace = "com.zendalona.mathmantra"
compileSdk = 34

defaultConfig {
applicationId = "com.zendalona.mathmantra"
minSdk = 30
targetSdk = 34
versionCode = 1
versionName = "1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

viewBinding {
enable = true
}
}

dependencies {

implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.11.0")
implementation("com.airbnb.android:lottie:4.2.2")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.fragment:fragment:1.8.2")
implementation("androidx.activity:activity:1.7.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
implementation("com.github.bumptech.glide:glide:4.15.1")
annotationProcessor("com.github.bumptech.glide:compiler:4.15.1")
}
21 changes: 21 additions & 0 deletions app/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
33 changes: 33 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.BODY_SENSORS"/>

<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:name=".MathMantra"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.MathMantra"
tools:targetApi="31">
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="preloaded_fonts"
android:resource="@array/preloaded_fonts" />
</application>

</manifest>
80 changes: 80 additions & 0 deletions app/src/main/java/com/zendalona/mathmantra/MainActivity.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
package com.zendalona.mathmantra;

import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.WindowInsetsCompat;
import androidx.core.view.WindowInsetsControllerCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;

import android.os.Bundle;
import android.util.Log;

import com.zendalona.mathmantra.databinding.ActivityMainBinding;
import com.zendalona.mathmantra.ui.DashboardFragment;
import com.zendalona.mathmantra.utils.FragmentNavigation;
import com.zendalona.mathmantra.utils.PermissionManager;

import java.util.Optional;

public class MainActivity extends AppCompatActivity implements FragmentNavigation {
private ActivityMainBinding binding;
private PermissionManager permissionManager;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityMainBinding.inflate(getLayoutInflater());
setContentView(binding.getRoot());

// Set immersive full-screen mode
WindowInsetsControllerCompat controller = new WindowInsetsControllerCompat(getWindow(), getWindow().getDecorView());
controller.hide(WindowInsetsCompat.Type.statusBars() | WindowInsetsCompat.Type.navigationBars());
controller.setSystemBarsBehavior(WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE);

if (savedInstanceState == null) loadFragment(new DashboardFragment(), FragmentTransaction.TRANSIT_FRAGMENT_OPEN);

setSupportActionBar(binding.toolbar);
ActionBar actionBar = getSupportActionBar();
if (actionBar != null) actionBar.setDisplayHomeAsUpEnabled(true);


//Permissions management
permissionManager = new PermissionManager(this, new PermissionManager.PermissionCallback() {
@Override
public void onPermissionGranted() {
Log.d("PermissionManager.PermissionCallback", "Granted!");
}
@Override
public void onPermissionDenied() {
Log.w("PermissionManager.PermissionCallback", "Denied!");
}
});
// TODO : ask for the sensor permissions
permissionManager.requestMicrophonePermission();
// permissionManager.requestAccelerometerPermission();
}

@Override
public boolean onSupportNavigateUp() {
loadFragment(new DashboardFragment(), FragmentTransaction.TRANSIT_FRAGMENT_CLOSE);
return true;
}

@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
permissionManager.handlePermissionsResult(requestCode, permissions, grantResults);
}

public void loadFragment(Fragment fragment, int transition) {
FragmentManager fragmentManager = getSupportFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();
fragmentTransaction.setTransition(transition);
fragmentTransaction.replace(binding.fragmentContainer.getId(), fragment);
// TODO : binding.toolbar.setTitle();
fragmentTransaction.commit();
}

}
13 changes: 13 additions & 0 deletions app/src/main/java/com/zendalona/mathmantra/MathMantra.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.zendalona.mathmantra;

import android.app.Application;
import androidx.appcompat.app.AppCompatDelegate;

public class MathMantra extends Application {
@Override
public void onCreate() {
super.onCreate();
// Enforce Light Mode
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.zendalona.mathmantra.enums;

public enum Difficulty {
EASY,
MEDIUM,
HARD
}
8 changes: 8 additions & 0 deletions app/src/main/java/com/zendalona/mathmantra/enums/Topic.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.zendalona.mathmantra.enums;

public enum Topic {
ADDITION,
SUBTRACTION,
MULTIPLICATION,
DIVISION
}
Loading