Commit 50b97e6a by onuma

バックグラウンド協業が通知された時に、端末のホーム画面にポップアップが表示されてしまうのを修正した。

parent e3352c65
...@@ -98,11 +98,15 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -98,11 +98,15 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
msg.put(AppDefType.PushMessageKey.message, textMessage); msg.put(AppDefType.PushMessageKey.message, textMessage);
} }
String roomType = null;
String[] inviteMessage;
if (textMessage.contains(INVITE_COLLABORATION)) { if (textMessage.contains(INVITE_COLLABORATION)) {
String roomType = Integer.toString(json.getInt(AppDefType.ChatPushMessageKey.roomType)); roomType = Integer.toString(json.getInt(AppDefType.ChatPushMessageKey.roomType));
String[] inviteMessage = textMessage.split(CHAT_MESSAGE_SEPERATOR); inviteMessage = textMessage.split(CHAT_MESSAGE_SEPERATOR);
showCollaborationPopUpMessage(roomId, roomName, roomType, pushSendLoginId, pushSendDate, inviteMessage[1]); //showCollaborationPopUpMessage(roomId, roomName, roomType, pushSendLoginId, pushSendDate, inviteMessage[1]);
return; //return;
Logger.i(TAG,"" + roomType);
Logger.i(TAG,"" + inviteMessage[1]);
  • 重要な情報でないので、Logger.dにしてください。 ログの確認時にはLogger.dを利用してください。

  • この行は、d901cb70 のコミットで消しました。最後のコミットのファイルで確認していただけますか?

Please register or sign in to reply
} }
} }
...@@ -248,22 +252,42 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -248,22 +252,42 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
return intent; return intent;
} }
JSONObject json = new JSONObject(tempMsg); JSONObject json = new JSONObject(tempMsg);
String textMessage = json.getString(AppDefType.PushMessageKey.message);
if (textMessage.length() > 0){
//tempMsg = textMessage;
}
String roomType = "";
String collaborationType = "";
if (textMessage.contains(INVITE_COLLABORATION)) {
roomType = Integer.toString(json.getInt(AppDefType.ChatPushMessageKey.roomType));
String[] inviteMessage = textMessage.split(CHAT_MESSAGE_SEPERATOR);
collaborationType = inviteMessage[1];
//showCollaborationPopUpMessage(roomId, roomName, roomType, pushSendLoginId, pushSendDate, inviteMessage[1]);
//return;
}
String roomName = json.getString(AppDefType.ChatPushMessageKey.roomName); String roomName = json.getString(AppDefType.ChatPushMessageKey.roomName);
String pushMsg = json.getString(AppDefType.PushMessageKey.message); String pushMsg = json.getString(AppDefType.PushMessageKey.message);
message.put(AppDefType.PushMessageKey.message, pushMsg); message.put(AppDefType.PushMessageKey.message, pushMsg);
if (roomName.length() <= 0) { return intent; } if (roomName.length() <= 0) {
return intent;
}
long roomId = json.getLong(AppDefType.ChatPushMessageKey.roomId); long roomId = json.getLong(AppDefType.ChatPushMessageKey.roomId);
long pushSendDate = json.getLong(AppDefType.ChatPushMessageKey.pushSendDate); long pushSendDate = json.getLong(AppDefType.ChatPushMessageKey.pushSendDate);
String pushSendLoginId = json.getString(AppDefType.ChatPushMessageKey.pushSendLoginId); String pushSendLoginId = json.getString(AppDefType.ChatPushMessageKey.pushSendLoginId);
//String roomType = json.getString(AppDefType.ChatPushMessageKey.roomType);
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId); intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName); intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, pushSendLoginId); intent.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, pushSendLoginId);
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, pushSendDate); intent.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, pushSendDate);
intent.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType);
intent.putExtra(AppDefType.ChatPushMessageKey.collaborationType, collaborationType);
return intent; return intent;
} }
......
...@@ -389,8 +389,10 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity { ...@@ -389,8 +389,10 @@ public abstract class ABVNoAuthenticatedActivity extends ABVActivity {
if (extras != null && !StringUtil.isNullOrEmpty(extras.getString(AppDefType.ChatPushMessageKey.roomName))) { if (extras != null && !StringUtil.isNullOrEmpty(extras.getString(AppDefType.ChatPushMessageKey.roomName))) {
intent.putExtra(AppDefType.ChatPushMessageKey.roomId, extras.getLong(AppDefType.ChatPushMessageKey.roomId)); // Room Id intent.putExtra(AppDefType.ChatPushMessageKey.roomId, extras.getLong(AppDefType.ChatPushMessageKey.roomId)); // Room Id
intent.putExtra(AppDefType.ChatPushMessageKey.roomName, extras.getString(AppDefType.ChatPushMessageKey.roomName)); // Room Name intent.putExtra(AppDefType.ChatPushMessageKey.roomName, extras.getString(AppDefType.ChatPushMessageKey.roomName)); // Room Name
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, extras.getString(AppDefType.ChatPushMessageKey.pushSendLoginId)); // sendLoginId intent.putExtra(AppDefType.ChatPushMessageKey.pushSendLoginId, extras.getLong(AppDefType.ChatPushMessageKey.pushSendLoginId)); // sendLoginId
intent.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, extras.getString(AppDefType.ChatPushMessageKey.pushSendDate)); intent.putExtra(AppDefType.ChatPushMessageKey.pushSendDate, extras.getString(AppDefType.ChatPushMessageKey.pushSendDate));
intent.putExtra(AppDefType.ChatPushMessageKey.roomType, extras.getString(AppDefType.ChatPushMessageKey.roomType));
intent.putExtra(AppDefType.ChatPushMessageKey.collaborationType, extras.getString(AppDefType.ChatPushMessageKey.collaborationType));
} }
} }
intent.setClassName(getApplicationContext().getPackageName(), getMainActivityClassName()).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setClassName(getApplicationContext().getPackageName(), getMainActivityClassName()).setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
......
...@@ -145,5 +145,7 @@ public interface AppDefType { ...@@ -145,5 +145,7 @@ public interface AppDefType {
String pushSendDate = "pushSendDate"; String pushSendDate = "pushSendDate";
String collaborationType = "collaborationType"; String collaborationType = "collaborationType";
String roomType = "roomType"; String roomType = "roomType";
String shopName = "shopName";
String loginId = "loginId";
} }
} }
...@@ -357,10 +357,21 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -357,10 +357,21 @@ public class OperationListActivity extends ABVUIActivity {
// プッシュメッセージがある場合 // プッシュメッセージがある場合
else if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName)) && else if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName)) &&
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) { getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0) {
if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomType)) &&
!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.collaborationType))
) {
ActivityHandlingHelper.getInstance().startChatWebViewActivityWithCollaboration(
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.collaborationType),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomType));
} else {
ActivityHandlingHelper.getInstance().startChatWebViewActivity( ActivityHandlingHelper.getInstance().startChatWebViewActivity(
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'), getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName)); getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName));
} }
}
// リスト更新 // リスト更新
setOperationListView(); setOperationListView();
......
...@@ -1640,12 +1640,11 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1640,12 +1640,11 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra("sid", sid); intent.putExtra("sid", sid);
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId; String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath(); String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra("loginId", loginId); intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra("shopName", shopName); intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
if(dto != null) if (dto != null) {
{ intent.putExtra(AppDefType.ChatPushMessageKey.loginId, dto.roomId);
intent.putExtra("roomId",dto.roomId); intent.putExtra(AppDefType.ChatPushMessageKey.roomName, dto.roomName);
intent.putExtra("roomName", dto.roomName);
} }
intent.setClassName(mContext.getPackageName(), className); intent.setClassName(mContext.getPackageName(), className);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
...@@ -1662,8 +1661,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1662,8 +1661,8 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra("sid", sid); intent.putExtra("sid", sid);
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId; String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath(); String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra("loginId", loginId); intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra("shopName", shopName); intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.setClassName(mContext.getPackageName(), className); intent.setClassName(mContext.getPackageName(), className);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent); getCurrentActivity().startActivity(intent);
...@@ -1679,11 +1678,10 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1679,11 +1678,10 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra("sid", sid); intent.putExtra("sid", sid);
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId; String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath(); String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra("loginId", loginId); intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra("shopName", shopName); intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.putExtra("roomId", roomId); intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra("roomName", roomName); intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.setClassName(mContext.getPackageName(), className); intent.setClassName(mContext.getPackageName(), className);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent); getCurrentActivity().startActivity(intent);
...@@ -1923,12 +1921,12 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve ...@@ -1923,12 +1921,12 @@ public class ActivityHandlingHelper extends ABookHelper implements RemoteObserve
intent.putExtra("sid", sid); intent.putExtra("sid", sid);
String loginId = ABVDataCache.getInstance().getMemberInfo().loginId; String loginId = ABVDataCache.getInstance().getMemberInfo().loginId;
String shopName = ABVDataCache.getInstance().getUrlPath(); String shopName = ABVDataCache.getInstance().getUrlPath();
intent.putExtra("loginId", loginId); intent.putExtra(AppDefType.ChatPushMessageKey.loginId, loginId);
intent.putExtra("collaborationType", collaborationType); intent.putExtra(AppDefType.ChatPushMessageKey.collaborationType, collaborationType);
intent.putExtra("shopName", shopName); intent.putExtra(AppDefType.ChatPushMessageKey.shopName, shopName);
intent.putExtra("roomId", roomId); intent.putExtra(AppDefType.ChatPushMessageKey.roomId, roomId);
intent.putExtra("roomName", roomName); intent.putExtra(AppDefType.ChatPushMessageKey.roomName, roomName);
intent.putExtra("roomType", roomType); intent.putExtra(AppDefType.ChatPushMessageKey.roomType, roomType);
intent.setClassName(mContext.getPackageName(), className); intent.setClassName(mContext.getPackageName(), className);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
getCurrentActivity().startActivity(intent); getCurrentActivity().startActivity(intent);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment