Skip to content

Commit f8a11b6

Browse files
committed
- updated channel to default to the channel needed for SOS-T comms
- reduced min API level to 21
1 parent 045fbb9 commit f8a11b6

File tree

10 files changed

+8
-8
lines changed

10 files changed

+8
-8
lines changed
-8.01 KB
Binary file not shown.
0 Bytes
Binary file not shown.
-141 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#Fri Mar 08 16:57:24 PST 2019
1+
#Sun Mar 10 11:59:02 PDT 2019
22
gradle.version=4.6
-2.04 KB
Binary file not shown.

SweLib/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ android {
77
compileSdkVersion 28
88
buildToolsVersion '28.0.3'
99
defaultConfig {
10-
minSdkVersion 23
10+
minSdkVersion 21
1111
targetSdkVersion 28
12-
versionCode 2
13-
versionName '1.0.1'
12+
versionCode 3
13+
versionName '1.0.2'
1414
}
1515
buildTypes {
1616
release {

SweLib/src/main/java/org/sofwerx/ogc/sos/SosIpcTransceiver.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public class SosIpcTransceiver extends BroadcastReceiver {
4545
private final static String SQAN_PACKET_BYTES = "bytes";
4646
private final static String SQAN_PACKET_CHANNEL = "channel";
4747
private static boolean enableSqAN = true;
48-
private static String channel = null;
48+
private static String channel = SosService.DEFAULT_SWE_CHANNEL;
4949
private SosMessageListener listener;
5050

5151
public SosIpcTransceiver(SosMessageListener listener) {
@@ -67,12 +67,12 @@ public void onReceive(Context context, Intent intent) {
6767
String origin = intent.getStringExtra(EXTRA_ORIGIN);
6868
if (!BuildConfig.APPLICATION_ID.equalsIgnoreCase(origin)) {
6969
String channel = intent.getStringExtra(SQAN_PACKET_CHANNEL);
70-
if ((SosIpcTransceiver.channel != null) && SosIpcTransceiver.channel.equalsIgnoreCase(channel)) { //only handle TORGI channel broadcasts
70+
if ((SosIpcTransceiver.channel != null) && SosIpcTransceiver.channel.equalsIgnoreCase(channel)) { //only handle SOS-T channel broadcasts
7171
try {
7272
byte[] bytes = intent.getByteArrayExtra(SQAN_PACKET_BYTES);
7373
if (bytes != null) {
7474
String payload = new String(bytes,"UTF-8");
75-
onMessageReceived(context,"sqan.torgi",payload);
75+
onMessageReceived(context,"sqan."+SQAN_PACKET_CHANNEL,payload);
7676
}
7777
} catch (UnsupportedEncodingException ignore) {
7878
}

SweLib/src/main/java/org/sofwerx/ogc/sos/SosService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* data over IPC, HTTP, or both
1818
*/
1919
public class SosService implements SosMessageListener {
20-
private final static String DEFAULT_SWE_CHANNEL = "sost";
20+
public final static String DEFAULT_SWE_CHANNEL = "sost";
2121
private HandlerThread sosThread; //the MANET itself runs on this thread where possible
2222
private Handler handler;
2323
private SosMessageListener listener;

0 commit comments

Comments
 (0)