Skip to content

Commit 96e85f4

Browse files
Merge pull request #10 from alrescha79-cmd/dev
feat: add Android home screen widget
2 parents 051ad40 + 182e18f commit 96e85f4

14 files changed

Lines changed: 1397 additions & 82 deletions

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"java.configuration.updateBuildConfiguration": "interactive"
3+
}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232
> **📡 Tested on Huawei B312-929 (Orbit Star 2)**
3333
3434
> **📲 Download on [Github Release](https://github.com/alrescha79-cmd/huawei-manager-mobile/releases)** Tersedia 3 versi untuk Android
35-
- arm64-v8a: Untuk Android 64-bit [Link Download](https://github.com/alrescha79-cmd/huawei-manager-mobile/releases/download/v1.0.1/huawei-manager-v1.0.1-arm64-v8a.apk)
36-
- armeabi-v7a: Untuk Android 32-bit [Link Download](https://github.com/alrescha79-cmd/huawei-manager-mobile/releases/download/v1.0.1/huawei-manager-v1.0.1-armeabi-v7a.apk)
37-
- universal: Untuk semua perangkat [Link Download](https://github.com/alrescha79-cmd/huawei-manager-mobile/releases/download/v1.0.1/huawei-manager-v1.0.1-universal.apk)
35+
- arm64-v8a: Untuk Android 64-bit [Link Download](https://github.com/alrescha79-cmd/huawei-manager-mobile/releases/download/v1.0.25/huawei-manager-v1.0.25-arm64-v8a.apk)
36+
- armeabi-v7a: Untuk Android 32-bit [Link Download](https://github.com/alrescha79-cmd/huawei-manager-mobile/releases/download/v1.0.25/huawei-manager-v1.0.25-armeabi-v7a.apk)
37+
- universal: Untuk semua perangkat [Link Download](https://github.com/alrescha79-cmd/huawei-manager-mobile/releases/download/v1.0.25/huawei-manager-v1.0.25-universal.apk)
3838

3939
---
4040

@@ -49,6 +49,7 @@
4949
| 👨‍👩‍👧‍👦 **Parental Control** | Batasi penggunaan perangkat |
5050
| 📱 **Profile APN** | Kelola APN settings |
5151
| 🖧 **Ethernet** | Kelola Ethernet settings |
52+
| 📟 **Widget** | Widget untuk monitoring signal, traffic, dan status koneksi |
5253
| 🌙 **Dark Mode** | Support light dan dark theme |
5354
| 🔤 **Language** | Pilih bahasa (Bahasa Indonesia dan Bahasa Inggris) |
5455

@@ -76,7 +77,6 @@
7677
|:---------:|:----:|:---:|:--------:|
7778
| ![home](https://github.com/user-attachments/assets/eff4fd91-d750-4aac-9c37-9e7af39f34ef) | ![wifi](https://github.com/user-attachments/assets/40b126bc-aa33-4813-af4a-8e17fa4687c3) | ![sms](https://github.com/user-attachments/assets/6b8c2297-8369-452e-9fa9-cd77a1fa4d3c) | ![settings](https://github.com/user-attachments/assets/60eb10a8-19ae-4cac-a06f-f07ce9eabbbb) |
7879

79-
8080
---
8181

8282
## 🚀 Quick Start

app.config.ts

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
import type { ConfigContext, ExpoConfig } from 'expo/config';
2+
import type { WithAndroidWidgetsParams } from 'react-native-android-widget';
3+
4+
// Widget configuration
5+
const widgetConfig: WithAndroidWidgetsParams = {
6+
widgets: [
7+
{
8+
name: 'ModemStatus',
9+
label: 'Modem Status',
10+
description: 'Display modem speed and usage statistics',
11+
minWidth: '180dp',
12+
minHeight: '110dp',
13+
// Default size: 3x2 cells
14+
targetCellWidth: 3,
15+
targetCellHeight: 2,
16+
// Max resize: 5x4 cells
17+
maxResizeWidth: '320dp',
18+
maxResizeHeight: '280dp',
19+
// Widget preview image
20+
previewImage: './assets/widget-preview/modem_status.png',
21+
// Update every 30 minutes (minimum allowed)
22+
updatePeriodMillis: 1800000,
23+
// Allow widget to be resized
24+
resizeMode: 'horizontal|vertical',
25+
},
26+
],
27+
};
28+
29+
export default ({ config }: ConfigContext): ExpoConfig => ({
30+
...config,
31+
name: 'Huawei Manager',
32+
slug: 'hm-mobile',
33+
version: '1.0.25',
34+
orientation: 'portrait',
35+
icon: './assets/logo.png',
36+
userInterfaceStyle: 'automatic',
37+
scheme: 'hm-mobile',
38+
plugins: [
39+
'expo-router',
40+
[
41+
'expo-build-properties',
42+
{
43+
android: {
44+
usesCleartextTraffic: true,
45+
},
46+
},
47+
],
48+
'expo-localization',
49+
['react-native-android-widget', widgetConfig],
50+
],
51+
splash: {
52+
image: './assets/logo.png',
53+
resizeMode: 'contain',
54+
backgroundColor: '#ffffff',
55+
},
56+
ios: {
57+
supportsTablet: true,
58+
},
59+
android: {
60+
adaptiveIcon: {
61+
foregroundImage: './assets/logo.png',
62+
backgroundColor: '#ffffff',
63+
},
64+
edgeToEdgeEnabled: true,
65+
predictiveBackGestureEnabled: false,
66+
package: 'com.alrescha79.hmmobile',
67+
},
68+
web: {
69+
favicon: './assets/logo.png',
70+
},
71+
extra: {
72+
eas: {
73+
projectId: '930db156-f012-4b37-809c-d023a044d3b3',
74+
},
75+
},
76+
});

app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"expo": {
33
"name": "Huawei Manager",
44
"slug": "hm-mobile",
5-
"version": "1.0.1",
5+
"version": "1.0.25",
66
"orientation": "portrait",
77
"icon": "./assets/logo.png",
88
"userInterfaceStyle": "automatic",
482 KB
Loading

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1+
// Register widget task handler FIRST - before any other imports
2+
import { registerWidgetTaskHandler } from 'react-native-android-widget';
3+
import { widgetTaskHandler } from './src/widget/WidgetTaskHandler';
4+
5+
// Register the widget task handler immediately
6+
registerWidgetTaskHandler(widgetTaskHandler);
7+
8+
// Then import and execute expo-router entry
19
import 'expo-router/entry';

0 commit comments

Comments
 (0)