Skip to content

Commit

Permalink
Some refactoring made to rename app. Readme updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
unalkalkan committed Feb 15, 2024
1 parent 7d29712 commit e69726a
Show file tree
Hide file tree
Showing 17 changed files with 69 additions and 19 deletions.
Binary file added .github/output.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 52 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,52 @@
# AnkiDroid-Utils
Additional Utilities for AnkiDroid App
# AnkiDroid Companion

AnkiDroid Companion is an extension app designed to enhance the functionality of the AnkiDroid flashcard app. It provides convenient access to AnkiDroid's Card Practicing feature via permanent notifications without the need to open the app itself.

![](.github/output.gif)


## Features

- **Enhanced AnkiDroid Functionality**: AnkiDroid Companion allows users to access AnkiDroid's Deck practising directly from permanent notifications.

- **Seamless Integration**: The app seamlessly integrates with AnkiDroid, leveraging its existing features, this app does not store any information regarding the deck, card and review. Everything happens on your AnkiDroid app.

- **Persistent Notifications**: AnkiDroid Companion keeps the notification persistent as long as there are cards to practice on your deck. When you finish practising the deck, you can close the notification until the next one pops-up!

- **Future Expansion**: In future updates, we plan to extend the app's functionality by adding Android widgets for the home screen and lock screen


## Getting Started

To get started with AnkiDroid Companion, follow these steps:

1. **Install AnkiDroid**: Ensure that AnkiDroid is installed on your device. AnkiDroid Companion relies on AnkiDroid's functionality and requires it to be present on the device.

2. **Install AnkiDroid Companion**: Download AnkiDroid Companion from the [releases](https://github.com/unalkalkan/AnkiDroid-Companion/releases) page

3. **Grant Permissions**: Upon installation, ensure that AnkiDroid Companion has the necessary permissions to access notifications and interact with AnkiDroid, as well as notification permissions to display notifications.

4. **Enable Notifications:** Make sure to enable notifications for AnkiDroid Companion app in your Android System settings

5. **Start Using**: Once installed, AnkiDroid Companion will access to AnkiDroid app and display your decks. Choose a deck and click "Refresh" button. It'll show you a notification right away!

6. **Finishing Decks**: When you get to the end of your deck, you can either change your deck or wait for the AnkiDroid Companion to send you a new notification when it's time for you to study.


## Limitations & Improvements

- **Android API Level**: Only Android 13 and 14 is supported at the moment. Since this was a weekend project for me (who had no prior knowledge about the Android Ecosystem), I didn't had the opportunity to test the app below these API Levels. If you like to try out the lower APIs and see if they work, that means a lot.

- **New Study Interval**: Currently when you finish a deck, it will wait for 8 hours and check again to see if you have new cards to study. I plan to add this as a setting to the app but had no time so far.

- **Embedded Strings:** There are _so many_ embedded string inside the app. I know that one should move them to resouces/string. But had no time either.


## Contributing

Contributions to AnkiDroid Companion are welcome! If you have any ideas, feature requests, or bug reports, please feel free to open an issue or submit a pull request on GitHub.


## License

This project is licensed under the MIT License.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ plugins {
}

android {
namespace = "com.anki.notifications"
namespace = "com.ankidroid.companion"
compileSdk = 34

defaultConfig {
applicationId = "com.anki.notifications"
applicationId = "com.ankidroid.companion"
minSdk = 33
targetSdk = 34
versionCode = 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications
package com.ankidroid.companion

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications;
package com.ankidroid.companion;

import android.annotation.SuppressLint;
import android.app.Activity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications;
package com.ankidroid.companion;

import android.net.Uri;
import org.json.JSONArray;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications
package com.ankidroid.companion

import android.app.NotificationChannel
import android.app.NotificationManager
Expand Down Expand Up @@ -46,7 +46,7 @@ class MainActivity : ComponentActivity() {
Log.i("BackgroundService", "startBackgroundService called from MainActivity")
val periodicWorkRequest = PeriodicWorkRequest.Builder(
PeriodicWorker::class.java,
15, TimeUnit.MINUTES
8, TimeUnit.HOURS
).build()
WorkManager.getInstance(this).enqueueUniquePeriodicWork(
"WORKER_ANKI",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications
package com.ankidroid.companion

import android.content.BroadcastReceiver
import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications
package com.ankidroid.companion

import android.app.Notification
import android.app.NotificationManager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications
package com.ankidroid.companion

import android.content.Context
import android.os.Handler
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications
package com.ankidroid.companion

import androidx.compose.foundation.background
import androidx.compose.foundation.border
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications;
package com.ankidroid.companion;

public class StoredState {
long deckId;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications.ui.theme
package com.ankidroid.companion.ui.theme

import androidx.compose.ui.graphics.Color

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications.ui.theme
package com.ankidroid.companion.ui.theme

import android.app.Activity
import android.os.Build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications.ui.theme
package com.ankidroid.companion.ui.theme

import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<resources>
<string name="app_name">Anki Notifications</string>
<string name="app_name">AnkiDroid Companion</string>
<string name="again">Again</string>
<string name="hard">Hard</string>
<string name="good">Good</string>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.anki.notifications
package com.ankidroid.companion

import org.junit.Test

Expand Down

0 comments on commit e69726a

Please sign in to comment.