DeepSeek Harness Remote
DeepSeek Harness Remote 可將手機或另一台電腦與你運行 DeepSeek Harness 的電腦安全連接,隨時隨地繼續你的工作,方便隨時查看進度並繼續工作。
AI 翻譯
尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
Battery snap sample widget : an examplary add-on widget for battery snap
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗A minimal, open source Android home screen widget that shows how a third-party app can read the battery data computed by BatterySnap.
BatterySnap watches how your battery charges and discharges and estimates the time remaining until it is full or empty. It shares those values with other apps through a public content provider. This project is the reference client: copy it to build your own widget, watch face, launcher integration, and so on.
Tap the widget to refresh it. If BatterySnap is not installed, the widget says so.
The app also has a small launcher screen with a button that opens BatterySnap, or its Google Play page when it is not installed.
ContentProvider with authority com.xhelas.batterysnap.widgetdata. Its columns, units and state constants are described in WidgetProviderContract.java. That file is the whole API: copy it into your app unchanged.com.xhelas.batterysnap.WIDGET_DATA_UPDATE to every app that declares a receiver for it.BatterySnapWidgetProvider receives that broadcast, queries the provider and redraws the widget.Your app needs three things in its manifest, all shown in AndroidManifest.xml:
<queries> entry for the provider authority. Since Android 11, this is required to see BatterySnap's provider.com.xhelas.batterysnap.WIDGET_DATA_UPDATE.android:exported="true" on that receiver, since the broadcast comes from another app.| Column | Type | Meaning |
|---|---|---|
level | int | Battery level, 0–100 |
remaining_duration | long | Milliseconds until empty (discharging) or full (charging). 0 or negative when there is no estimate yet. |
state | int | 0 full, 1 discharging, 2 USB charging, 3 AC charging, 4 wireless charging |
temperature | int | Tenths of a degree Celsius (200 = 20 °C) |
voltage | int | Millivolts |
power | int | Milliwatts (current × voltage), signed as the device reports the current: usually positive while charging, negative while discharging. NULL when the device reports no usable current. Absent (getColumnIndex returns -1) with older BatterySnap versions. |
Requires JDK 17 or newer and the Android SDK (compile SDK 37).
./gradlew assembleDebug # build the APK
./gradlew installDebug # install on a connected device
./gradlew lint
Then install BatterySnap from Google Play, and add the "BatterySnap sample widget" to your home screen.