public void showDownloadInProgress() { Utils.printLog(context, TAG, "showDownloadInProgress :: "); mainLayout.setVisibility(View.VISIBLE); downloadInProgressLayout.setVisibility(View.VISIBLE); previewLayout.setVisibility(GONE); downloadedLayout.setVisibility(GONE); retryLayout.setVisibility(GONE); }
private void updateServerCallDoneStatus(Contact contact, Channel channel, Integer conversationId) { if (contact == null && channel == null) { return; } Utils.printLog(context, TAG, "updating server call to true"); sharedPreferences.edit().putBoolean(getServerSyncCallKey(contact, channel, conversationId), true).commit(); }
public static void sendUpdate(Context context, boolean isMetadataUpdate, String action) { Utils.printLog(context, TAG, action); Intent intent = new Intent(); intent.setAction(action); intent.putExtra("isMetadataUpdate", isMetadataUpdate); intent.addCategory(Intent.CATEGORY_DEFAULT); sendBroadcast(context, intent); }
public void cancelAudio() { if (isRecordring) { ApplozicAudioRecordManager.this.stopRecording(); } if(outputFile != null){ File file = new File(outputFile); if (file != null && file.exists()) { Utils.printLog(context, "AudioFRG:", "File deleted..."); file.delete(); } } }
@RequiresApi(api = Build.VERSION_CODES.O) private synchronized void deleteSilentNotificationChannel() { if (mNotificationManager != null) { mNotificationManager.deleteNotificationChannel(MobiComKitConstants.AL_SILENT_NOTIFICATION); Utils.printLog(context, TAG, "Deleted silent notification channel"); } }
@RequiresApi(api = Build.VERSION_CODES.O) private synchronized void deleteAppNotificationChannel() { if (mNotificationManager != null) { mNotificationManager.deleteNotificationChannel(MobiComKitConstants.AL_APP_NOTIFICATION); Utils.printLog(context, TAG, "Deleted app notification channel"); } }
public static void sendMessageDeleteBroadcast(Context context, String action, String keyString, String contactNumbers) { Utils.printLog(context, TAG, "Sending message delete broadcast for " + action); Intent intentDelete = new Intent(); intentDelete.setAction(action); intentDelete.putExtra("keyString", keyString); intentDelete.putExtra("contactNumbers", contactNumbers); intentDelete.addCategory(Intent.CATEGORY_DEFAULT); sendBroadcast(context, intentDelete); }
public static void sendUpdateLastSeenAtTimeBroadcast(Context context, String action, String contactId) { Utils.printLog(context, TAG, "Sending lastSeenAt broadcast...."); Intent intent = new Intent(); intent.setAction(action); intent.putExtra("contactId", contactId); intent.addCategory(Intent.CATEGORY_DEFAULT); sendBroadcast(context, intent); }
public static void updateMessageMetadata(Context context, String messageKey, String action) { Utils.printLog(context, TAG, "Sending Message Metadata Update Broadcast for message key : " + messageKey); Intent intent = new Intent(); intent.setAction(action); intent.putExtra("keyString", messageKey); intent.addCategory(Intent.CATEGORY_DEFAULT); sendBroadcast(context, intent); }
public synchronized void syncPendingMessages(boolean broadcast) { List<Message> pendingMessages = messageDatabaseService.getPendingMessages(); Utils.printLog(context, TAG, "Found " + pendingMessages.size() + " pending messages to sync."); for (Message message : pendingMessages) { Utils.printLog(context, TAG, "Syncing pending message: " + message); sendPendingMessageToServer(message, broadcast); } }
public void setAudioIcons() { int state = ApplozicAudioManager.getInstance(context).getAudioState(message.getKeyString()); Utils.printLog(context, "state:", String.valueOf(state)); docIcon.setVisibility(View.VISIBLE); if (state == 1) { docIcon.setImageResource(R.drawable.ic_pause_circle_outline); } else { docIcon.setImageResource(R.drawable.ic_play_circle_outline); } }
@Override public void run() { try { if (recyclerAdapter != null) { recyclerAdapter.notifyDataSetChanged(); } } catch (Exception ex) { Utils.printLog(getActivity(), "AL", "Exception while updating online status."); } } });
@Override public void onSuccess(IMqttToken asyncActionToken) { Utils.printLog(context, TAG, "Mqtt Connection successfull"); BroadcastService.sendUpdate(context, BroadcastService.INTENT_ACTIONS.MQTT_CONNECTED.toString()); }
@Override public void onFailure(IMqttToken asyncActionToken, Throwable exception) { Utils.printLog(context, TAG, "Mqtt Connection failed"); BroadcastService.sendUpdate(context, BroadcastService.INTENT_ACTIONS.MQTT_DISCONNECTED.toString()); } });
@Override public void onClick(View v) { Utils.printLog(MobicomLocationActivity.this,TAG, "On click of send location button"); if (myLocationMarker != null) { Intent intent = new Intent(); intent.putExtra("latitude", myLocationMarker.getPosition().latitude); intent.putExtra("longitude", myLocationMarker.getPosition().longitude); setResult(RESULT_OK, intent); finish(); } } });
public String sendMessage(Message message) { try { String jsonFromObject = GsonUtils.getJsonFromObject(message, message.getClass()); Utils.printLog(context, TAG, "Sending message to server: " + jsonFromObject); return httpRequestUtils.postData(getSendMessageUrl(), "application/json;charset=utf-8", null, jsonFromObject); } catch (Exception e) { return null; } }
public ChannelFeedApiResponse createChannelWithReponse(ChannelInfo channelInfo) throws Exception { String jsonFromObject = GsonUtils.getJsonFromObject(channelInfo, channelInfo.getClass()); String createChannelResponse = httpRequestUtils.postData(getCreateChannelUrl(), "application/json", "application/json", jsonFromObject); Utils.printLog(context, TAG, "Create channel Response :" + createChannelResponse); return (ChannelFeedApiResponse) GsonUtils.getObjectFromJson(createChannelResponse, ChannelFeedApiResponse.class); }
@Override public void run() { Utils.printLog(context, "TimeChange", "This thread has been called on date change"); long diff = DateUtils.getTimeDiffFromUtc(); MobiComUserPreference.getInstance(context).setDeviceTimeOffset(diff); } });
public void sendAudioMessage(String selectedFilePath) { Utils.printLog(fragmentActivity, "ConversationUIService:", "Send audio message ..."); if (getConversationFragment() != null) { getConversationFragment().sendMessage(Message.ContentType.AUDIO_MSG.getValue(), selectedFilePath); } }
public synchronized void updateDeliveryStatusForContact(String contactId, boolean markRead) { int rows = messageDatabaseService.updateMessageDeliveryReportForContact(contactId, markRead); Utils.printLog(context, TAG, "Updated delivery report of " + rows + " messages for contactId: " + contactId); if (rows > 0) { String action = markRead ? BroadcastService.INTENT_ACTIONS.MESSAGE_READ_AND_DELIVERED_FOR_CONTECT.toString() : BroadcastService.INTENT_ACTIONS.MESSAGE_DELIVERY_FOR_CONTACT.toString(); BroadcastService.sendDeliveryReportForContactBroadcast(context, action, contactId); } }