@Override protected Bitmap processBitmap(Object data) { return fileClientService.loadMessageImage(getContext(), (String) data); } };
public void makePaymentForBooking(ALRichMessageModel model) { Intent intent = new Intent(getActivity(), PaymentActivity.class); intent.putExtra("formData", model.getFormData()); intent.putExtra("formAction", model.getFormAction()); getContext().startActivity(intent); } }
public void unMuteUserChat() { Date date = Calendar.getInstance(TimeZone.getTimeZone("UTC")).getTime(); millisecond = date.getTime(); final MuteUserNotificationAsync.TaskListener taskListener = new MuteUserNotificationAsync.TaskListener() { @Override public void onSuccess(String status, Context context) { if (menu != null) { menu.findItem(R.id.unmuteGroup).setVisible(false); menu.findItem(R.id.muteGroup).setVisible(true); } } @Override public void onFailure(String error, Context context) { } }; new MuteUserNotificationAsync(taskListener, millisecond, contact.getUserId(), getContext()).execute(); }
@Override public void onClick(DialogInterface dialog, final int selectedItem) { if (selectedItem == 0) { millisecond = millisecond + 28800000; } else if (selectedItem == 1) { millisecond = millisecond + 604800000; } else if (selectedItem == 2) { millisecond = millisecond + 31558000000L; } new MuteUserNotificationAsync(listener, millisecond, contact.getUserId(), getContext()).execute(); dialog.dismiss(); } });
public void umuteGroupChat() { Date date = Calendar.getInstance(TimeZone.getTimeZone("UTC")).getTime(); millisecond = date.getTime(); final MuteNotificationAsync.TaskListener taskListener = new MuteNotificationAsync.TaskListener() { @Override public void onSuccess(ApiResponse apiResponse) { if (menu != null) { menu.findItem(R.id.unmuteGroup).setVisible(false); menu.findItem(R.id.muteGroup).setVisible(true); } } @Override public void onFailure(ApiResponse apiResponse, Exception exception) { } @Override public void onCompletion() { } }; muteNotificationRequest = new MuteNotificationRequest(channel.getKey(), millisecond); MuteNotificationAsync muteNotificationAsync = new MuteNotificationAsync(getContext(), taskListener, muteNotificationRequest); muteNotificationAsync.execute((Void) null); }
@Override protected Bitmap processBitmap(Object data) { return fileClientService.loadThumbnailImage(getContext(), (Message) data, getImageLayoutParam(false).width, getImageLayoutParam(false).height); } };
public void afterTextChanged(Editable s) { try { if (!TextUtils.isEmpty(s.toString()) && s.toString().trim().length() > 0 && !typingStarted) { typingStarted = true; handleSendAndRecordButtonView(true); if (contact != null || channel != null && !Channel.GroupType.OPEN.getValue().equals(channel.getType()) || contact != null) { Applozic.publishTypingStatus(getContext(), channel, contact, typingStarted); } } else if (s.toString().trim().length() == 0 && typingStarted) { typingStarted = false; handleSendAndRecordButtonView(false); if (contact != null || channel != null && !Channel.GroupType.OPEN.getValue().equals(channel.getType()) || contact != null) { Applozic.publishTypingStatus(getContext(), channel, contact, typingStarted); } } } catch (Exception e) { } //sendButton.setVisibility((s == null || s.toString().trim().length() == 0) && TextUtils.isEmpty(filePath) ? View.GONE : View.VISIBLE); //attachButton.setVisibility(s == null || s.toString().trim().length() == 0 ? View.VISIBLE : View.GONE); } });
@Override public void onClick(DialogInterface dialog, final int selectedItem) { if (selectedItem == 0) { millisecond = millisecond + 28800000; } else if (selectedItem == 1) { millisecond = millisecond + 604800000; } else if (selectedItem == 2) { millisecond = millisecond + 31558000000L; } muteNotificationRequest = new MuteNotificationRequest(channel.getKey(), millisecond); MuteNotificationAsync muteNotificationAsync = new MuteNotificationAsync(getContext(), taskListener, muteNotificationRequest); muteNotificationAsync.execute((Void) null); dialog.dismiss(); } });
AlertDialog.Builder builder = new AlertDialog.Builder(getContext()) .setTitle(getResources().getString(R.string.mute_user_for)) .setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() {
protected void setChannel(Channel channel) { this.channel = channel; if (channel != null && !ChannelService.getInstance(getContext()).isUserAlreadyPresentInChannel(channel.getKey(), MobiComUserPreference.getInstance(getContext()).getUserId()) && messageTemplate != null && messageTemplate.isEnabled() && templateAdapter != null) { templateAdapter.removeTemplates(); } }
@Override public void onDestroyView() { super.onDestroyView(); count = 0; t.cancel(); ((ConversationActivity) getActivity()).setChildFragmentLayoutBG(); ApplozicAudioManager.getInstance(getContext()).audiostop(); }
AlertDialog.Builder builder = new AlertDialog.Builder(getContext()) .setTitle(getResources().getString(R.string.mute_group_for)) .setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() {
audioRecordIconImageView.setImageResource(R.drawable.applozic_audio_record); ApplozicAudioManager.getInstance(getContext()).audiostop(); timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); audioFileName = "AUD_" + timeStamp + "_" + ".m4a"; outputFile = FileClientService.getFilePath(audioFileName, getContext().getApplicationContext(), "audio/m4a").getAbsolutePath(); applozicAudioRecordManager.setTimeStamp(timeStamp); applozicAudioRecordManager.setAudioFileName(audioFileName); applozicAudioRecordManager.setOutputFile(outputFile); vibrate(); if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.RECORD_AUDIO) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions(getActivity(), new String[]{Manifest.permission.RECORD_AUDIO},
Utils.printLog(getContext(), TAG, "Exception while updating delivery status in UI.");
Utils.printLog(getContext(), TAG, "Exception while updating delivery status in UI.");
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); geoApiKey = Utils.getMetaDataValue(getContext().getApplicationContext(), ConversationActivity.GOOGLE_API_KEY_META_DATA); String jsonString = FileUtils.loadSettingsJsonFile(getActivity().getApplicationContext()); if (!TextUtils.isEmpty(jsonString)) { restrictedWords = FileUtils.loadRestrictedWordsFile(getContext()); conversationUIService = new ConversationUIService(getActivity()); syncCallService = SyncCallService.getInstance(getActivity()); fileClientService = new FileClientService(getActivity()); setHasOptionsMenu(true); imageThumbnailLoader = new ImageLoader(getContext(), ImageUtils.getLargestScreenDimension((Activity) getContext())) { @Override protected Bitmap processBitmap(Object data) { imageThumbnailLoader.setImageFadeIn(false); imageThumbnailLoader.addImageCache((getActivity()).getSupportFragmentManager(), 0.1f); messageImageLoader = new ImageLoader(getContext(), ImageUtils.getLargestScreenDimension((Activity) getContext())) { @Override protected Bitmap processBitmap(Object data) { messageImageLoader.addImageCache((getActivity()).getSupportFragmentManager(), 0.1f); applozicAudioRecordManager = new ApplozicAudioRecordManager(getActivity()); mDetector = new GestureDetectorCompat(getContext(), this);
private void setToolbarSubtitle(String subtitle){ if ((alCustomizationSettings.isGroupSubtitleHidden() || ApplozicSetting.getInstance(getContext()).isGroupSubtitleHidden()) && channel != null && !subtitle.contains(getActivity().getString(R.string.is_typing))) { ((CustomToolbarListener)getActivity()).setToolbarSubtitle(""); return; } ((CustomToolbarListener) getActivity()).setToolbarSubtitle(subtitle); }
metadata.put("isDoneWithClicking", "true"); lastMessage.setMetadata(metadata); new AlMessageMetadataUpdateTask(getContext(), lastMessage.getKeyString(), lastMessage.getMetadata(), listener1).execute();
setToolbarSubtitle(getActivity().getString(R.string.subtitle_last_seen_at_time) + " " + DateUtils.getDateAndTimeForLastSeen(getContext(), withUserContact.getLastSeenAt(), R.string.JUST_NOW, R.plurals.MINUTES_AGO, R.plurals.HOURS_AGO, R.string.YESTERDAY)); setToolbarImage(withUserContact, null);
userNotAbleToChatLayout.setVisibility(VISIBLE); userNotAbleToChatTextView.setText(R.string.group_has_been_deleted_text); if (channel != null && !ChannelService.getInstance(getContext()).isUserAlreadyPresentInChannel(channel.getKey(), MobiComUserPreference.getInstance(getContext()).getUserId()) && messageTemplate != null && messageTemplate.isEnabled() && templateAdapter != null) { templateAdapter.removeTemplates();