mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2025-01-10 09:01:55 +01:00
parent
3961e32c2b
commit
dfa85745e8
@ -1,6 +1,7 @@
|
||||
###Changelog
|
||||
|
||||
####Next Version
|
||||
* Pebble: Support replying to SMS form the watch (canned replies)
|
||||
* Pebble: Allow installing apps compiled with SDK 2.x also on the basalt platform (Time, Time Steel)
|
||||
* Pebble: Fix decoding strings in appmessages from the pebble (fixes sending SMS from "Dialer for Pebble")
|
||||
* Some new and updated icons
|
||||
|
@ -2,16 +2,17 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="nodomain.freeyourgadget.gadgetbridge">
|
||||
|
||||
<!--
|
||||
Comment in for testing Pebble Emulator
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
-->
|
||||
<!--
|
||||
Comment in for testing Pebble Emulator
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
-->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
|
||||
<uses-permission android:name="android.permission.CALL_PHONE" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_SMS" />
|
||||
<uses-permission android:name="android.permission.SEND_SMS" />
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="com.fsck.k9.permission.READ_MESSAGES" />
|
||||
@ -46,23 +47,19 @@
|
||||
<activity
|
||||
android:name=".activities.SettingsActivity"
|
||||
android:label="@string/title_activity_settings"
|
||||
android:parentActivityName=".activities.ControlCenter">
|
||||
</activity>
|
||||
android:parentActivityName=".activities.ControlCenter"></activity>
|
||||
<activity
|
||||
android:name=".devices.miband.MiBandPreferencesActivity"
|
||||
android:label="@string/preferences_miband_settings"
|
||||
android:parentActivityName=".activities.SettingsActivity">
|
||||
</activity>
|
||||
android:parentActivityName=".activities.SettingsActivity"></activity>
|
||||
<activity
|
||||
android:name=".activities.AppManagerActivity"
|
||||
android:label="@string/title_activity_appmanager"
|
||||
android:parentActivityName=".activities.ControlCenter">
|
||||
</activity>
|
||||
android:parentActivityName=".activities.ControlCenter"></activity>
|
||||
<activity
|
||||
android:name=".activities.AppBlacklistActivity"
|
||||
android:label="@string/title_activity_appblacklist"
|
||||
android:parentActivityName=".activities.SettingsActivity">
|
||||
</activity>
|
||||
android:parentActivityName=".activities.SettingsActivity"></activity>
|
||||
<activity
|
||||
android:name=".activities.FwAppInstallerActivity"
|
||||
android:label="@string/title_activity_fw_app_insaller"
|
||||
@ -197,7 +194,8 @@
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service android:name=".service.DeviceCommunicationService" />
|
||||
<receiver
|
||||
|
||||
<receiver
|
||||
android:name=".externalevents.BluetoothStateChangeReceiver"
|
||||
android:exported="false">
|
||||
<intent-filter>
|
||||
@ -223,13 +221,11 @@
|
||||
android:name=".activities.DebugActivity"
|
||||
android:label="@string/title_activity_debug"
|
||||
android:parentActivityName=".activities.ControlCenter"
|
||||
android:windowSoftInputMode="stateHidden">
|
||||
</activity>
|
||||
android:windowSoftInputMode="stateHidden"></activity>
|
||||
<activity
|
||||
android:name=".activities.DiscoveryActivity"
|
||||
android:label="@string/title_activity_discovery"
|
||||
android:parentActivityName=".activities.ControlCenter">
|
||||
</activity>
|
||||
android:parentActivityName=".activities.ControlCenter"></activity>
|
||||
<activity
|
||||
android:name=".activities.AndroidPairingActivity"
|
||||
android:label="@string/title_activity_android_pairing" />
|
||||
@ -239,18 +235,15 @@
|
||||
<activity
|
||||
android:name=".activities.charts.ChartsActivity"
|
||||
android:label="@string/title_activity_charts"
|
||||
android:parentActivityName=".activities.ControlCenter">
|
||||
</activity>
|
||||
android:parentActivityName=".activities.ControlCenter"></activity>
|
||||
<activity
|
||||
android:name=".activities.ConfigureAlarms"
|
||||
android:label="@string/title_activity_set_alarm"
|
||||
android:parentActivityName=".activities.SettingsActivity">
|
||||
</activity>
|
||||
android:parentActivityName=".activities.SettingsActivity"></activity>
|
||||
<activity
|
||||
android:name=".activities.AlarmDetails"
|
||||
android:label="@string/title_activity_alarm_details"
|
||||
android:parentActivityName=".activities.ConfigureAlarms">
|
||||
</activity>
|
||||
android:parentActivityName=".activities.ConfigureAlarms"></activity>
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
@ -10,6 +10,7 @@ import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.net.Uri;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.telephony.SmsManager;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@ -230,7 +231,8 @@ public abstract class AbstractDeviceSupport implements DeviceSupport {
|
||||
case REPLY:
|
||||
String phoneNumber = GBApplication.getIDSenderLookup().lookup(deviceEvent.handle);
|
||||
if (phoneNumber != null) {
|
||||
GB.toast(context, "got notfication reply for " + phoneNumber + " : " + deviceEvent.reply, 2, GB.INFO);
|
||||
LOG.info("got notfication reply for " + phoneNumber + " : " + deviceEvent.reply);
|
||||
SmsManager.getDefault().sendTextMessage(phoneNumber, null, deviceEvent.reply, null, null);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1512,6 +1512,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
||||
sendBytesAck.encodedBytes = encodeActionResponse2x(id, action, 6, "Muted");
|
||||
break;
|
||||
case 0x05:
|
||||
String caption = "";
|
||||
byte attribute_count = buf.get();
|
||||
if (attribute_count > 0) {
|
||||
byte attribute = buf.get();
|
||||
@ -1522,14 +1523,17 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
||||
buf.get(reply);
|
||||
devEvtNotificationControl.event = GBDeviceEventNotificationControl.Event.REPLY;
|
||||
devEvtNotificationControl.reply = new String(reply);
|
||||
caption = "Sent";
|
||||
} else {
|
||||
caption = "FAILED";
|
||||
devEvtNotificationControl = null; // error
|
||||
}
|
||||
} else {
|
||||
caption = "FAILED";
|
||||
devEvtNotificationControl = null; // error
|
||||
}
|
||||
sendBytesAck = new GBDeviceEventSendBytes();
|
||||
sendBytesAck.encodedBytes = encodeActionResponse2x(id, action, 6, "NOT IMPLEMENTED");
|
||||
sendBytesAck.encodedBytes = encodeActionResponse2x(id, action, 6, caption);
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
@ -1589,14 +1593,18 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
||||
buf.get(reply);
|
||||
devEvtNotificationControl.event = GBDeviceEventNotificationControl.Event.REPLY;
|
||||
devEvtNotificationControl.reply = new String(reply);
|
||||
caption = "SENT";
|
||||
icon_id = PebbleIconID.RESULT_SENT;
|
||||
} else {
|
||||
devEvtNotificationControl = null; // error
|
||||
caption = "FAILED";
|
||||
icon_id = PebbleIconID.RESULT_FAILED;
|
||||
}
|
||||
} else {
|
||||
caption = "FAILED";
|
||||
icon_id = PebbleIconID.RESULT_FAILED;
|
||||
devEvtNotificationControl = null; // error
|
||||
}
|
||||
caption = "NOT IMPLEMENTED";
|
||||
icon_id = PebbleIconID.GENERIC_WARNING;
|
||||
break;
|
||||
}
|
||||
GBDeviceEventSendBytes sendBytesAck = new GBDeviceEventSendBytes();
|
||||
|
Loading…
Reference in New Issue
Block a user