Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ea44b0d15d | |||
| ed0047778d | |||
| f289bf210c | |||
| 407dc2f819 | |||
| 2417c6f576 |
@@ -12,8 +12,8 @@ android {
|
|||||||
applicationId "pt.whatsms.gateway"
|
applicationId "pt.whatsms.gateway"
|
||||||
minSdk 21
|
minSdk 21
|
||||||
targetSdk 33
|
targetSdk 33
|
||||||
versionCode 1
|
versionCode 11
|
||||||
versionName "1.0.0"
|
versionName "3.1.0-hardcode"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,13 @@
|
|||||||
|
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.hardware.telephony"
|
android:name="android.hardware.telephony"
|
||||||
android:required="true" />
|
android:required="false" />
|
||||||
|
|
||||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||||
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />
|
||||||
|
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CONNECTED_DEVICE" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.MANAGE_SUBSCRIPTION_USER_ASSOCIATION" />
|
|
||||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||||
<uses-permission android:name="android.permission.READ_SMS" />
|
<uses-permission android:name="android.permission.READ_SMS" />
|
||||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||||
|
|||||||
@@ -33,10 +33,14 @@ class GatewaySettings(
|
|||||||
val password: String?
|
val password: String?
|
||||||
get() = registrationInfo?.password
|
get() = registrationInfo?.password
|
||||||
|
|
||||||
|
// WhatSMS fork: hardcoded server. Campo de URL removido do UI.
|
||||||
val serverUrl: String
|
val serverUrl: String
|
||||||
get() = storage.get<String?>(CLOUD_URL) ?: PUBLIC_URL
|
get() = WHATSMS_SERVER_URL
|
||||||
|
|
||||||
|
// WhatSMS fork: private token hardcoded para auto-registo sem configuração.
|
||||||
|
// Token rotado periodicamente via rebuild do APK.
|
||||||
val privateToken: String?
|
val privateToken: String?
|
||||||
get() = storage.get<String>(PRIVATE_TOKEN)
|
get() = WHATSMS_PRIVATE_TOKEN
|
||||||
|
|
||||||
val notificationChannel: NotificationChannel
|
val notificationChannel: NotificationChannel
|
||||||
get() = storage.get<NotificationChannel>(NOTIFICATION_CHANNEL) ?: NotificationChannel.AUTO
|
get() = storage.get<NotificationChannel>(NOTIFICATION_CHANNEL) ?: NotificationChannel.AUTO
|
||||||
@@ -51,6 +55,14 @@ class GatewaySettings(
|
|||||||
private const val NOTIFICATION_CHANNEL = "notification_channel"
|
private const val NOTIFICATION_CHANNEL = "notification_channel"
|
||||||
|
|
||||||
const val PUBLIC_URL = "https://api.sms-gate.app/mobile/v1"
|
const val PUBLIC_URL = "https://api.sms-gate.app/mobile/v1"
|
||||||
|
|
||||||
|
// WhatSMS fork: server capcom6 privado da Descomplicar.
|
||||||
|
const val WHATSMS_SERVER_URL = "https://smsgw.whatsms.pt/api/mobile/v1"
|
||||||
|
|
||||||
|
// WhatSMS fork: private_token do GATEWAY_TOKEN config do server.
|
||||||
|
// Permite auto-registo silencioso de novos devices.
|
||||||
|
const val WHATSMS_PRIVATE_TOKEN =
|
||||||
|
"a6c877b0369bd68d77c1760a88ec1996c6b672353f4b6344"
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun export(): Map<String, *> {
|
override fun export(): Map<String, *> {
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="108dp"
|
|
||||||
android:height="108dp"
|
|
||||||
android:viewportWidth="108"
|
|
||||||
android:viewportHeight="108">
|
|
||||||
|
|
||||||
<!-- Background circle -->
|
|
||||||
<path
|
|
||||||
android:fillColor="#25D366"
|
|
||||||
android:pathData="M54,54m-46,0a46,46 0,1 1,92 0a46,46 0,1 1,-92 0" />
|
|
||||||
|
|
||||||
<!-- WhatsApp-style speech bubble (W) -->
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFFFFF"
|
|
||||||
android:pathData="M54,22 C36.3,22 22,36.3 22,54 C22,59.8 23.6,65.3 26.4,70 L22.5,83.5 L36.5,79.7 C41.1,82.2 46.4,83.6 52,83.8 L54,84 C71.7,84 86,69.7 86,52 L86,54 C86,36.3 71.7,22 54,22 Z" />
|
|
||||||
|
|
||||||
<!-- Letter W in green -->
|
|
||||||
<path
|
|
||||||
android:fillColor="#25D366"
|
|
||||||
android:pathData="M38,44 L43,62 L49,50 L55,62 L61,44 L66,44 L58,68 L52,68 L49,58 L46,68 L40,68 L32,44 Z" />
|
|
||||||
</vector>
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@color/primary" />
|
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
|
||||||
</adaptive-icon>
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<background android:drawable="@color/primary" />
|
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
|
||||||
</adaptive-icon>
|
|
||||||
|
After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 7.2 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 17 KiB |