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.