Commit 6203c9f8 by onuma

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

parent bc755451
......@@ -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.SplashScreenActivity;
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.HTMLWebViewActivity;
import jp.agentec.abook.abv.ui.viewer.activity.ImageViewActivity;
......@@ -75,8 +76,6 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
String messageBody = messageMap.get(AppDefType.PushMessageKey.message);
String roomName = "";
Log.d(TAG,"messageBody : "+ messageBody);
if (Objects.requireNonNull(messageBody).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) > 0) {
PushMessageJSON json = new PushMessageJSON(messageBody);
roomName = json.getRoomName();
......@@ -91,7 +90,6 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
if (AppUtil.isAppForground(this)) {
if (roomName.length() > 0) {
//showChatRoomPopupMessage(tempMsg, data, operationID, roomId, roomName, pushSendLoginId, pushSendDate);
showChatRoomPopupMessage(messageMap);
} else {
String data = messageMap.get(AppDefType.PushMessageKey.data);
......@@ -137,7 +135,8 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
currentActivity.getClass().equals(OperationRelatedContentActivity.class) ||
currentActivity.getClass().equals(OperationListActivity.class) ||
currentActivity.getClass().equals(ImageViewActivity.class) ||
currentActivity.getClass().equals(VideoViewActivity.class)
currentActivity.getClass().equals(VideoViewActivity.class) ||
currentActivity.getClass().equals(AudioPlayActivity.class)
){
// 呼び出し元のActivityの名前をmessageMapに追加する
messageMap.put(AppDefType.ChatPushMessageKey.fromActivityName, fromClassName);
......@@ -227,21 +226,13 @@ public class ABVFcmListenerService extends FirebaseMessagingService {
if (StringUtil.isNullOrWhiteSpace(message.get(AppDefType.PushMessageKey.message))) {
return intent;
}
String tempMsg = message.get(AppDefType.PushMessageKey.message);
Log.d(TAG,"tempMsg : "+ tempMsg);
if (Objects.requireNonNull(tempMsg).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) <= 0) {
String messageBosy = message.get(AppDefType.PushMessageKey.message);
if (Objects.requireNonNull(messageBosy).indexOf(AppDefType.ChatPushMessageKey.pushSendLoginId) <= 0) {
return intent;
}
JSONObject json = new JSONObject(tempMsg);
JSONObject json = new JSONObject(messageBosy);
String textMessage = json.getString(AppDefType.PushMessageKey.message);
if (textMessage.length() > 0){
//tempMsg = textMessage;
}
String roomType = "";
String collaborationType = "";
if (textMessage.contains(ABookCommConstants.INVITE_COLLABORATION)) {
......
......@@ -128,10 +128,10 @@ public class ShowPushMessageDailogActivity extends ABVUIActivity {
boolean isNewVersion = extras.getBoolean(AppDefType.ChatPushMessageKey.needsDisplayOperationOrOperationRelatedContentScreen);
if (isNewVersion) {
setResult(ABookCommConstants.PUSH_MESSAGE_DLG_RESULT.OK, getIntent());
finish();
} else {
moveChatRoom(extras);
}
finish();
}
if (isMeetingRoomConnected || isCollabration) {
showCannotMoveChatRoomDialog();
......
......@@ -293,17 +293,6 @@ public class OperationListActivity extends ABVUIActivity {
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 {
......
......@@ -165,7 +165,7 @@ public class FoxitPdfCore {
* @return
*/
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) {
Bitmap bm = Bitmap.createBitmap(patchW, patchH, Bitmap.Config.ARGB_8888);
PDFPage pdfPage = loadPage(mPDFDoc, page, PDFPage.e_ParsePageNormal);
......@@ -198,7 +198,7 @@ public class FoxitPdfCore {
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;
}
}
......
......@@ -264,7 +264,7 @@ public class PdfImageProvider {
Logger.d(TAG, "setPauseTask " + ste.getClassName() + "#" + ste.getMethodName() + " " + pauseTask);
}
else {
Logger.i(TAG, "setPauseTask " + pauseTask);
Logger.d(TAG, "setPauseTask " + pauseTask);
}
if (pauseTask) {
pauseTaskCount++;
......
......@@ -401,6 +401,10 @@ public class AudioPlayView extends RelativeLayout {
public void stop() {
if (mMediaPlayer != null) {
mVisualizer.release();
if (mMediaPlayer.isPlaying()){
mMediaPlayer.stop();
}
mMediaPlayer.reset();
mMediaPlayer.release();
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