Exemple #1
0
  @Override
  protected void onStop() {
    logger.d("message_activity#onStop:%s", this);

    if (null != adapter) {
      adapter.hidePopup();
    }

    AudioPlayerHandler.getInstance().clear();
    super.onStop();
  }
Exemple #2
0
 @Override
 protected void onResume() {
   logger.d("message_activity#onresume:%s", this);
   super.onResume();
   IMApplication.gifRunning = true;
   historyTimes = 0;
   // not the first time
   if (imService != null) {
     // 处理session的未读信息
     handleUnreadMsgs();
   }
 }
Exemple #3
0
 @Override
 protected void onDestroy() {
   logger.d("message_activity#onDestroy:%s", this);
   historyTimes = 0;
   imServiceConnector.disconnect(this);
   EventBus.getDefault().unregister(this);
   adapter.clearItem();
   albumList.clear();
   sensorManager.unregisterListener(this, sensor);
   ImageMessage.clearImageMessageList();
   unregisterReceiver(receiver);
   super.onDestroy();
 }
Exemple #4
0
 @Override
 protected void onActivityResult(int requestCode, int resultCode, Intent data) {
   if (RESULT_OK != resultCode) return;
   switch (requestCode) {
     case SysConstant.CAMERA_WITH_DATA:
       handleTakePhotoData(data);
       break;
     case SysConstant.ALBUM_BACK_DATA:
       logger.d("pic#ALBUM_BACK_DATA");
       setIntent(data);
       break;
   }
   super.onActivityResult(requestCode, resultCode, data);
 }
Exemple #5
0
 @Override
 protected void onCreate(Bundle savedInstanceState) {
   logger.d("message_activity#onCreate:%s", this);
   super.onCreate(savedInstanceState);
   currentSessionKey = getIntent().getStringExtra(IntentConstant.KEY_SESSION_KEY);
   initSoftInputMethod();
   initEmo();
   initAlbumHelper();
   initAudioHandler();
   initAudioSensor();
   initView();
   imServiceConnector.connect(this);
   EventBus.getDefault().register(this, SysConstant.MESSAGE_EVENTBUS_PRIORITY);
   logger.d("message_activity#register im service and eventBus");
 }
Exemple #6
0
 /** 本身位于Message页面,点击通知栏其他session的消息 */
 @Override
 protected void onNewIntent(Intent intent) {
   logger.d("message_activity#onNewIntent:%s", this);
   super.onNewIntent(intent);
   setIntent(intent);
   historyTimes = 0;
   if (intent == null) {
     return;
   }
   String newSessionKey = getIntent().getStringExtra(IntentConstant.KEY_SESSION_KEY);
   if (newSessionKey == null) {
     return;
   }
   logger.d("chat#newSessionInfo:%s", newSessionKey);
   if (!newSessionKey.equals(currentSessionKey)) {
     currentSessionKey = newSessionKey;
     initData();
   }
 }
Exemple #7
0
 @Override
 public void onConfigurationChanged(Configuration config) {
   super.onConfigurationChanged(config);
 }
Exemple #8
0
 @Override
 public void onBackPressed() {
   IMApplication.gifRunning = false;
   cancelToast();
   super.onBackPressed();
 }
Exemple #9
0
 @Override
 protected void onPause() {
   logger.d("message_activity#onPause:%s", this);
   super.onPause();
 }
Exemple #10
0
 @Override
 protected void onStart() {
   logger.d("message_activity#onStart:%s", this);
   super.onStart();
 }