don't require title in FCM notification

And turn off the raised-tile thing for now
This commit is contained in:
Eric House 2020-12-08 14:52:31 -08:00
parent 17ea06067d
commit 17bda01d16
3 changed files with 22 additions and 12 deletions

View file

@ -2638,6 +2638,11 @@
the persons name is listed, just select it and an invitation will
be sent immediately.
</string>
<!-- Default title of notification sent via FCM from
relay. Currently I use this only for testing. -->
<string name="remote_msg_title">Remote message</string>
<!-- MQTT stuff. May not see the light of day -->
<string name="invite_choice_mqtt">Internet/MQTT</string>
<string name="mqtt_invite_title">MQTT Invitation</string>

View file

@ -33,6 +33,8 @@ import org.json.JSONArray;
import java.util.Map;
import org.eehouse.android.xw4.loc.LocUtils;
public class FBMService extends FirebaseMessagingService {
private static final String TAG = FBMService.class.getSimpleName();
@ -111,18 +113,19 @@ public class FBMService extends FirebaseMessagingService {
value = data.get( "msg" );
if ( null != value ) {
String title = data.get( "title" );
if ( null != title ) {
String teaser = data.get( "teaser" );
if ( null == teaser ) {
teaser = value;
}
Intent alertIntent = GamesListDelegate
.makeAlertIntent( this, value );
int code = value.hashCode() ^ title.hashCode();
Utils.postNotification( this, alertIntent, title,
teaser, code );
String title = data.get( "titlexx" );
if ( null == title ) {
title = LocUtils.getString( this, R.string.remote_msg_title );
}
String teaser = data.get( "teaser" );
if ( null == teaser ) {
teaser = value;
}
Intent alertIntent = GamesListDelegate
.makeAlertIntent( this, value );
int code = value.hashCode() ^ title.hashCode();
Utils.postNotification( this, alertIntent, title,
teaser, code );
}
}
}

View file

@ -39,7 +39,6 @@ LOCAL_DEFINES += \
-DHASH_STREAM \
-DXWFEATURE_DEVID \
-DXWFEATURE_CHAT \
-DXWFEATURE_RAISETILE \
-DCOMMON_LAYOUT \
-DXWFEATURE_WIDER_COLS \
-DNATIVE_NLI \
@ -50,6 +49,9 @@ LOCAL_DEFINES += \
-DRELAY_ROOM_DEFAULT=\"\" \
-D__LITTLE_ENDIAN \
# XWFEATURE_RAISETILE: first, fix to not use timer
# -DXWFEATURE_RAISETILE \
# -DNO_ADD_MQTT_TO_ALL \
# -DXWFEATURE_SCOREONEPASS \