Commit 6203c9f8 by onuma

音声コンテンツ再生時、プッシュメッセージ受信で、関連資料に戻れるように修正した。

parent bc755451
...@@ -35,6 +35,7 @@ import jp.agentec.abook.abv.ui.home.activity.OperationListActivity; ...@@ -35,6 +35,7 @@ import jp.agentec.abook.abv.ui.home.activity.OperationListActivity;
import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity; import jp.agentec.abook.abv.ui.home.activity.OperationRelatedContentActivity;
import jp.agentec.abook.abv.ui.home.activity.SplashScreenActivity; import jp.agentec.abook.abv.ui.home.activity.SplashScreenActivity;
import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper; import jp.agentec.abook.abv.ui.home.helper.ActivityHandlingHelper;
import jp.agentec.abook.abv.ui.viewer.activity.AudioPlayActivity;
import jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.ContentViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.HTMLWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.ImageViewActivity; import jp.agentec.abook.abv.ui.viewer.activity.ImageViewActivity;
...@@ -75,8 +76,6 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -75,8 +76,6 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
String messageBody = messageMap.get(AppDefType.PushMessageKey.message); String messageBody = messageMap.get(AppDefType.PushMessageKey.message);
String roomName = ""; String roomName = "";
Log.d(TAG,"messageBody : "+ messageBody);
if (Objects.requireNonNull(messageBody).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) > 0) { if (Objects.requireNonNull(messageBody).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) > 0) {
PushMessageJSON json = new PushMessageJSON(messageBody); PushMessageJSON json = new PushMessageJSON(messageBody);
roomName = json.getRoomName(); roomName = json.getRoomName();
...@@ -91,7 +90,6 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -91,7 +90,6 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
if (AppUtil.isAppForground(this)) { if (AppUtil.isAppForground(this)) {
if (roomName.length() > 0) { if (roomName.length() > 0) {
//showChatRoomPopupMessage(tempMsg, data, operationID, roomId, roomName, pushSendLoginId, pushSendDate);
showChatRoomPopupMessage(messageMap); showChatRoomPopupMessage(messageMap);
} else { } else {
String data = messageMap.get(AppDefType.PushMessageKey.data); String data = messageMap.get(AppDefType.PushMessageKey.data);
...@@ -137,7 +135,8 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -137,7 +135,8 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
currentActivity.getClass().equals(OperationRelatedContentActivity.class) || currentActivity.getClass().equals(OperationRelatedContentActivity.class) ||
currentActivity.getClass().equals(OperationListActivity.class) || currentActivity.getClass().equals(OperationListActivity.class) ||
currentActivity.getClass().equals(ImageViewActivity.class) || currentActivity.getClass().equals(ImageViewActivity.class) ||
currentActivity.getClass().equals(VideoViewActivity.class) currentActivity.getClass().equals(VideoViewActivity.class) ||
currentActivity.getClass().equals(AudioPlayActivity.class)
){ ){
// 呼び出し元のActivityの名前をmessageMapに追加する // 呼び出し元のActivityの名前をmessageMapに追加する
messageMap.put(AppDefType.ChatPushMessageKey.fromActivityName, fromClassName); messageMap.put(AppDefType.ChatPushMessageKey.fromActivityName, fromClassName);
...@@ -227,21 +226,13 @@ public class ABVFcmListenerService extends FirebaseMessagingService { ...@@ -227,21 +226,13 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
if (StringUtil.isNullOrWhiteSpace(message.get(AppDefType.PushMessageKey.message))) { if (StringUtil.isNullOrWhiteSpace(message.get(AppDefType.PushMessageKey.message))) {
return intent; return intent;
} }
String tempMsg = message.get(AppDefType.PushMessageKey.message); String messageBosy = message.get(AppDefType.PushMessageKey.message);
Log.d(TAG,"tempMsg : "+ tempMsg); if (Objects.requireNonNull(messageBosy).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) <= 0) {
if (Objects.requireNonNull(tempMsg).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) <= 0) {
return intent; return intent;
} }
JSONObject json = new JSONObject(messageBosy);
JSONObject json = new JSONObject(tempMsg);
String textMessage = json.getString(AppDefType.PushMessageKey.message); String textMessage = json.getString(AppDefType.PushMessageKey.message);
if (textMessage.length() > 0){
//tempMsg = textMessage;
}
String roomType = ""; String roomType = "";
String collaborationType = ""; String collaborationType = "";
if (textMessage.contains(ABookCommConstants.INVITE_COLLABORATION)) { if (textMessage.contains(ABookCommConstants.INVITE_COLLABORATION)) {
......
...@@ -128,10 +128,10 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity { ...@@ -128,10 +128,10 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
boolean isNewVersion = extras.getBoolean(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen); boolean isNewVersion = extras.getBoolean(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen);
if (isNewVersion) { if (isNewVersion) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent()); setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent());
finish();
} else { } else {
moveChatRoom(extras); moveChatRoom(extras);
} }
finish();
} }
if (isMeetingRoomConnected || isCollabration) { if (isMeetingRoomConnected || isCollabration) {
showCannotMoveChatRoomDialog(); showCannotMoveChatRoomDialog();
......
...@@ -293,17 +293,6 @@ public class OperationListActivity extends ABVUIActivity { ...@@ -293,17 +293,6 @@ public class OperationListActivity extends ABVUIActivity {
alertDialog.show(); alertDialog.show();
} }
// プッシュメッセージがある場合
else if (!StringUtil.isNullOrEmpty(getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName))
&& getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0') > 0
) {
ActivityHandlingHelper.getInstance().startChatWebViewActivity(
"",
getIntent().getLongExtra(AppDefType.ChatPushMessageKey.roomId, '0'),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomName),
getIntent().getStringExtra(AppDefType.ChatPushMessageKey.roomType)
);
}
} }
private class JsInf { private class JsInf {
......
...@@ -165,7 +165,7 @@ public class FoxitPdfCore { ...@@ -165,7 +165,7 @@ public class FoxitPdfCore {
* @return * @return
*/ */
public Bitmap drawPage(int page, int pageW, int pageH, int patchX, int patchY, int patchW, int patchH) { public Bitmap drawPage(int page, int pageW, int pageH, int patchX, int patchY, int patchW, int patchH) {
Logger.i(TAG, "drawPage start."); Logger.d(TAG, "drawPage start.");
synchronized (mContext) { synchronized (mContext) {
Bitmap bm = Bitmap.createBitmap(patchW, patchH, Bitmap.Config.ARGB_8888); Bitmap bm = Bitmap.createBitmap(patchW, patchH, Bitmap.Config.ARGB_8888);
PDFPage pdfPage = loadPage(mPDFDoc, page, PDFPage.e_ParsePageNormal); PDFPage pdfPage = loadPage(mPDFDoc, page, PDFPage.e_ParsePageNormal);
...@@ -198,7 +198,7 @@ public class FoxitPdfCore { ...@@ -198,7 +198,7 @@ public class FoxitPdfCore {
Logger.e(TAG, "Failed to render the page No.%d! %s", page, e.getMessage()); Logger.e(TAG, "Failed to render the page No.%d! %s", page, e.getMessage());
} }
Logger.i(TAG, "drawPage end."); Logger.d(TAG, "drawPage end.");
return bm; return bm;
} }
} }
......
...@@ -264,7 +264,7 @@ public class PdfImageProvider { ...@@ -264,7 +264,7 @@ public class PdfImageProvider {
Logger.d(TAG, "setPauseTask " + ste.getClassName() + "#" + ste.getMethodName() + " " + pauseTask); Logger.d(TAG, "setPauseTask " + ste.getClassName() + "#" + ste.getMethodName() + " " + pauseTask);
} }
else { else {
Logger.i(TAG, "setPauseTask " + pauseTask); Logger.d(TAG, "setPauseTask " + pauseTask);
} }
if (pauseTask) { if (pauseTask) {
pauseTaskCount++; pauseTaskCount++;
......
...@@ -401,6 +401,10 @@ public class AudioPlayView extends RelativeLayout { ...@@ -401,6 +401,10 @@ public class AudioPlayView extends RelativeLayout {
public void stop() { public void stop() {
if (mMediaPlayer != null) { if (mMediaPlayer != null) {
mVisualizer.release(); mVisualizer.release();
if (mMediaPlayer.isPlaying()){
mMediaPlayer.stop();
}
mMediaPlayer.reset();
mMediaPlayer.release(); mMediaPlayer.release();
mMediaPlayer = null; mMediaPlayer = null;
} }
......
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