Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 20 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
*.iml
.gradle
/local.properties
/.idea/caches/build_file_checksums.ser
/.idea/caches/resolve.gradle.properties
/.idea/workspace.xml
/.idea/libraries
/.idea/modules.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx
local.properties
*.apk
.env
*.keystore
app/src/main/java/com/example/phonemate/network/NetworkConfig.kt
Binary file added .gradle/9.5.0/checksums/checksums.lock
Binary file not shown.
Binary file added .gradle/9.5.0/checksums/md5-checksums.bin
Binary file not shown.
Binary file added .gradle/9.5.0/checksums/sha1-checksums.bin
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added .gradle/9.5.0/fileChanges/last-build.bin
Binary file not shown.
Binary file added .gradle/9.5.0/fileHashes/fileHashes.bin
Binary file not shown.
Binary file added .gradle/9.5.0/fileHashes/fileHashes.lock
Binary file not shown.
Binary file not shown.
Empty file added .gradle/9.5.0/gc.properties
Empty file.
Binary file not shown.
Binary file added .gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/buildOutputCleanup/cache.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Sat Aug 08 15:35:10 IST 2026
gradle.version=9.5.0
Binary file added .gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
2 changes: 2 additions & 0 deletions .gradle/config.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#Sat Aug 08 15:26:19 IST 2026
java.home=C\:\\Program Files\\Android\\Android Studio1\\jbr
Binary file added .gradle/file-system.probe
Binary file not shown.
Empty file added .gradle/vcs-1/gc.properties
Empty file.
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/AndroidProjectSystem.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2,289 changes: 2,289 additions & 0 deletions .idea/caches/deviceStreaming.xml

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/deviceManager.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/migrations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 27 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,50 @@
# 🚀 TechQuest — Team Submission

> **Fork this repo → build your app on your fork → open a Pull Request back to `Reskilll/TechQuest`.**
> Your Pull Request is your official submission. Fill in this README as you go.

---

## 👥 Team

| | |
|---|---|
| **Team name** | _e.g. Team Nova_ |
| **Members** | _Name 1, Name 2, Name 3_ |
| **City / Venue** | _Pune / Hyderabad / Bengaluru / Chennai_ |
| **Team name** | Agent X |
| **Members** | Soha, Kaif, Harshitha |
| **City / Venue** | Hyderabad |

---

## 🎯 App

| | |
|---|---|
| **App name** | _Your app name_ |
| **Theme** | _Pick one:_ Simple game · Utility app · Productivity · Fun & social · Learning tool · Creative tool |
| **One-liner** | _What your app does, in one sentence._ |
| **App name** | PhoneMate |
| **Theme** | Utility app |
| **One-liner** | A context-aware AI assistant that uses real-time battery, storage, and app usage data to accurately troubleshoot your Android device. |

### What we built
_A short paragraph: what the app does and who it's for._
PhoneMate is an intelligent device health assistant that stops AI hallucination in its tracks. Instead of offering generic support advice, it hooks directly into Android's native hardware APIs (`UsageStatsManager`, `BatteryManager`, and `StatFs`). When you ask why your phone is draining battery or running out of space, PhoneMate cross-references your **real-time system metrics** with a built-in device manual. It then delivers an honest, data-backed answer alongside dynamic, inline charts—strictly refusing to guess or invent numbers it doesn't have.

### How the AI is used
- **Model:** _e.g. `openai/gpt-4o-mini` (via OpenRouter)_
- **What the AI does:** _e.g. generates quiz questions from a topic the user types._
- **AI pattern:** _Chat · Summarise · Classify · Generate · Extract · Vision_
- **Model:** `meta-llama/llama-3.1-8b-instruct` (via OpenRouter)
- **What the AI does:** Interprets user troubleshooting queries, analyzes injected real-time hardware telemetry (battery %, charging state, storage limits, and precise app foreground times), and provides grounded, highly-specific support advice.
- **AI pattern:** Chat · Extract · Summarise (Strict Grounding Pattern)

---

## ▶️ How to run it

```bash
# 1. Clone (your fork)
git clone https://github.com/<your-username>/TechQuest.git
# 1. Clone the repository
git clone https://github.com/sohakousar/TechQuest.git
cd TechQuest

# 2. Add your OpenRouter key as described below, then open in Android Studio
# (let Gradle finish syncing before you Run)
# 2. Open the project in Android Studio
# (Let Gradle finish syncing before you attempt to Run)
```

**OpenRouter setup**
- Base URL: `https://openrouter.ai/api/v1`
- Model: `_your model_`
- API key: stored as _e.g. a `local.properties` value / environment variable_ — **never committed** (see below).
- Model: `meta-llama/llama-3.1-8b-instruct`
- API key: Create a `local.properties` file in the root directory (if it doesn't exist) and add your key as an environment variable to keep it secure.

**For the NetworkConfig:** Copy `app/src/main/java/com/example/phonemate/network/NetworkConfig.kt.template` to `NetworkConfig.kt` and paste your API key inside. Do NOT commit your real key!

**Build the APK**
- Android Studio → `Build → Build Bundle(s)/APK(s) → Build APK(s)`
Expand All @@ -57,23 +54,23 @@ cd TechQuest

## 📱 Demo

- **APK:** _link or `app-debug.apk` in the repo_
- **Screen recording:** _link to a short video of the app running on the iQOO_
- **Screenshots:** _optional_
- **APK:** [phonemate.apk](phonemate.apk)

---

## 🧰 Tech stack
- Android (Kotlin / Java) · Android Studio
- OpenRouter API (LLM)
- _anything else you used_
- **Android UI:** Jetpack Compose (Kotlin)
- **Architecture:** MVVM (Model-View-ViewModel)
- **LLM Integration:** Retrofit & OkHttp (Network Layer)
- **AI API:** OpenRouter API (Llama 3.1 8B)
- **Native Android APIs:** `UsageStatsManager`, `AppOpsManager`, `BatteryManager`, `StatFs`

---

## ✅ Submission checklist
- [ ] This README is filled in (team, theme, how to run)
- [ ] The API key is **NOT** in the repo (see `.gitignore` below)
- [ ] Final code pushed to **your fork**
- [x] This README is filled in (team, theme, how to run)
- [x] The API key is **NOT** in the repo (see `.gitignore` below)
- [x] Final code pushed to **your fork**
- [ ] APK and/or a screen recording added or linked
- [ ] **Pull Request opened** from your fork → `Reskilll/TechQuest` **before the deadline**
- [ ] PR title = your **team name**
Expand Down
77 changes: 77 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
id("org.jetbrains.kotlin.plugin.compose")
}

android {
namespace = "com.example.phonemate"
compileSdk = 35

defaultConfig {
applicationId = "com.example.phonemate"
minSdk = 35
targetSdk = 35
versionCode = 1
versionName = "1.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose = true
}
// composeOptions { kotlinCompilerExtensionVersion = ... } is intentionally removed for Kotlin 2.0+
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}

dependencies {
implementation("androidx.core:core-ktx:1.15.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
implementation("androidx.activity:activity-compose:1.10.0")

// Compose BOM
implementation(platform("androidx.compose:compose-bom:2025.01.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7")

// Retrofit & OkHttp & Gson
implementation("com.squareup.retrofit2:retrofit:2.11.0")
implementation("com.squareup.retrofit2:converter-gson:2.11.0")
implementation("com.squareup.okhttp3:okhttp:4.12.0")
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")

testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
androidTestImplementation(platform("androidx.compose:compose-bom:2025.01.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Binary file added app/build/intermediates/apk/debug/app-debug.apk
Binary file not shown.
21 changes: 21 additions & 0 deletions app/build/intermediates/apk/debug/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "com.example.phonemate",
"variantName": "debug",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 1,
"versionName": "1.0",
"outputFile": "app-debug.apk"
}
],
"elementType": "File",
"minSdkVersionForDexing": 35
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#- File Locator -
listingFile=../../../apk/debug/output-metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
appMetadataVersion=1.1
androidGradlePluginVersion=8.8.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version": 3,
"artifactType": {
"type": "COMPATIBLE_SCREEN_MANIFEST",
"kind": "Directory"
},
"applicationId": "com.example.phonemate",
"variantName": "debug",
"elements": []
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#Sat Aug 08 21:12:42 IST 2026
Loading