YukiGasai / obsidian-todo-widget

Android Widget to display todo list from markdown file
Apache License 2.0
86 stars 5 forks source link

Feature request:add refresh activity option #8

Open HusniMuhammad opened 11 months ago

HusniMuhammad commented 11 months ago

add option to refresh/update the widget by using am option in CLI

Demo command be like

am start de.yukigasai.obsidiantodowidget/.refreshwidget

Thanks 👍

YukiGasai commented 10 months ago

Hi, can you elaborate on this? What command line are you using? How can I allow you to run commands. This looks very weird to me. Could you instead maybe send a Broadcast so the TodoWidgetReceiver can update the widget?

        <receiver
            android:name=".TodoWidgetReceiver"
            android:exported="true">
            <intent-filter>
                <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
                <action android:name="de.yukigasai.obsidiantodowidget.ACTION_UPDATE_CONFIG" />
                <action android:name="de.yukigasai.obsidiantodowidget.ACTION_END_NOTIFICATION_CHECK" />
                <action android:name="de.yukigasai.obsidiantodowidget.ACTION_START_NOTIFICATION" />
            </intent-filter>
            <meta-data
                android:name="android.appwidget.provider"
                android:resource="@xml/todo_widget_info" />
        </receiver>
HusniMuhammad commented 10 months ago

Sorry for late reply .. I don't receive any notfications from email, but I'm manually check them, then I found you response

IMG-20231030-WA0000

I don't have a knowledge about Android app development, but I want to imitate refresh button in CLI Using termux

HusniMuhammad commented 10 months ago

Screenshot_20231030-072045

HusniMuhammad commented 10 months ago

How can i trigger intent?

HusniMuhammad commented 10 months ago
am start de.yukigasai.obsidiantodowidget/.TodoWidgetReceiver

Screenshot_20231030-073659

Screenshot_20231030-073707