Skip to content
Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

# Getting Started

You can setup taskserver to sync your tasks across clients.
You can find the steps to setup one [here](https://github.com/CCExtractor/taskwarrior-flutter?tab=readme-ov-file#taskserver-setup)
In order to use the mobile app, you would need the flood backend running on your local machine. There are several ways
you can do that and all these approaches can be found at [Taskwarrior-Flutter](https://github.com/CCExtractor/taskwarrior-flutter/wiki)


## Steps
Expand Down
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,9 @@ flutter doctor
5. Run the app:

```bash
flutter run --flavor production
flutter run
```
OR

```bash
flutter run --flavor nightly
```
## Contributing

Help is always appreciated, whether it comes in the form of feature requests or suggestions, code improvements, refactoring, or performance enhancements. The more is done, the better it gets. If you find any bug(s), consider opening an [issue](https://github.com/NishantSinghal19/taskwarrior-gsoc/issues/new).
Expand Down
66 changes: 39 additions & 27 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,59 +1,69 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ccextractor.taskwarriorflutter">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
<uses-permission android:name="android.permission.VIBRATE" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.USE_EXACT_ALARM" />
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:label="Taskwarrior"
android:name="${applicationName}"
android:icon="@mipmap/launcher_icon"
android:enableOnBackInvokedCallback="true">

<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTask"
android:launchMode="singleTop"
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">

<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>

<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>

<intent-filter>
<action android:name="es.antonborri.home_widget.action.LAUNCH" />
</intent-filter>
</activity>

<receiver android:name=".TaskWarriorWidgetProvider"
android:exported="true">
<intent-filter>
<action android:name="es.antonborri.home_widget.action.LAUNCH" />
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>

<meta-data android:name="android.appwidget.provider"
android:resource="@xml/taskwarriorconfig" />
</receiver>

<receiver android:name=".WidgetUpdateReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="taskwarrior" />
<action android:name="UPDATE_WIDGET" />
</intent-filter>
</activity>
<receiver android:name=".TaskWarriorWidgetProvider"
</receiver>

<receiver android:name=".BurndownChartProvider"
android:exported="true">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="@xml/taskwarriorconfig" />
android:resource="@xml/burndownchartconfig" />
</receiver>

<!-- Used for Background Work -->
<receiver android:name="es.antonborri.home_widget.HomeWidgetBackgroundReceiver"
android:exported="true">
<intent-filter>
Expand All @@ -62,15 +72,17 @@
</receiver>
<service android:name="es.antonborri.home_widget.HomeWidgetBackgroundService"
android:permission="android.permission.BIND_JOB_SERVICE" android:exported="true"/>
<service
<service
android:name=".ListViewRemoteViewsService"
android:permission="android.permission.BIND_REMOTEVIEWS" />

<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />

<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />


<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" />
<receiver android:exported="false" android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
Expand All @@ -80,4 +92,4 @@
</intent-filter>
</receiver>
</application>
</manifest>
</manifest>
Binary file not shown.
Binary file not shown.
Binary file modified android/app/src/main/jniLibs/arm64-v8a/libtc_helper.so
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,13 @@
package com.ccextractor.taskwarriorflutter

import android.appwidget.AppWidgetManager
import android.content.Context
import android.content.SharedPreferences
import es.antonborri.home_widget.HomeWidgetProvider

class BurndownChartProvider : HomeWidgetProvider() {
override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray, widgetData: SharedPreferences) {
// This method is intentionally left blank.
// Widget updates are handled by WidgetUpdateReceiver.
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,36 @@
package com.ccextractor.taskwarriorflutter

import android.content.Intent
import android.os.Bundle
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugin.common.MethodChannel
import android.content.Context
import android.content.IntentFilter
import android.appwidget.AppWidgetManager
import android.content.ComponentName

class MainActivity: FlutterActivity() {
// No custom code needed! The home_widget plugin attaches automatically.
private val channel = "com.example.taskwarrior/widget"

override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
super.configureFlutterEngine(flutterEngine)

MethodChannel(flutterEngine.dartExecutor.binaryMessenger, channel).setMethodCallHandler {
call, result ->
if (call.method == "updateWidget") {
updateWidget()
result.success("Widget updated")
} else {
result.notImplemented()
}
}
}

private fun updateWidget() {
val intent = Intent(this, WidgetUpdateReceiver::class.java).apply {
action = "UPDATE_WIDGET"
}
sendBroadcast(intent)
}
}
Loading