Search in sources :

Example 1 with ApplozicAudioRecordManager

use of com.applozic.mobicomkit.uiwidgets.attachmentview.ApplozicAudioRecordManager in project Applozic-Android-SDK by AppLozic.

the class MobiComConversationFragment method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    String jsonString = FileUtils.loadSettingsJsonFile(getActivity().getApplicationContext());
    if (!TextUtils.isEmpty(jsonString)) {
        alCustomizationSettings = (AlCustomizationSettings) GsonUtils.getObjectFromJson(jsonString, AlCustomizationSettings.class);
    } else {
        alCustomizationSettings = new AlCustomizationSettings();
    }
    applozicDocumentView = new ApplozicDocumentView(getContext());
    restrictedWords = FileUtils.loadRestrictedWordsFile(getContext());
    conversationUIService = new ConversationUIService(getActivity());
    syncCallService = SyncCallService.getInstance(getActivity());
    appContactService = new AppContactService(getActivity());
    messageDatabaseService = new MessageDatabaseService(getActivity());
    fileClientService = new FileClientService(getActivity());
    setHasOptionsMenu(true);
    imageThumbnailLoader = new ImageLoader(getContext(), ImageUtils.getLargestScreenDimension((Activity) getContext())) {

        @Override
        protected Bitmap processBitmap(Object data) {
            return fileClientService.loadThumbnailImage(getContext(), (Message) data, getImageLayoutParam(false).width, getImageLayoutParam(false).height);
        }
    };
    imageCache = ImageCache.getInstance((getActivity()).getSupportFragmentManager(), 0.1f);
    imageThumbnailLoader.setImageFadeIn(false);
    imageThumbnailLoader.addImageCache((getActivity()).getSupportFragmentManager(), 0.1f);
    messageImageLoader = new ImageLoader(getContext(), ImageUtils.getLargestScreenDimension((Activity) getContext())) {

        @Override
        protected Bitmap processBitmap(Object data) {
            return fileClientService.loadMessageImage(getContext(), (String) data);
        }
    };
    messageImageLoader.setImageFadeIn(false);
    messageImageLoader.addImageCache((getActivity()).getSupportFragmentManager(), 0.1f);
    applozicAudioRecordManager = new ApplozicAudioRecordManager(getActivity());
    mDetector = new GestureDetectorCompat(getContext(), this);
}
Also used : AlCustomizationSettings(com.applozic.mobicomkit.uiwidgets.AlCustomizationSettings) ConversationUIService(com.applozic.mobicomkit.uiwidgets.conversation.ConversationUIService) AppContactService(com.applozic.mobicomkit.contact.AppContactService) Message(com.applozic.mobicomkit.api.conversation.Message) FileClientService(com.applozic.mobicomkit.api.attachment.FileClientService) GestureDetectorCompat(android.support.v4.view.GestureDetectorCompat) Bitmap(android.graphics.Bitmap) ImageLoader(com.applozic.mobicommons.commons.image.ImageLoader) ApplozicDocumentView(com.applozic.mobicomkit.uiwidgets.attachmentview.ApplozicDocumentView) MessageDatabaseService(com.applozic.mobicomkit.api.conversation.database.MessageDatabaseService) ApplozicAudioRecordManager(com.applozic.mobicomkit.uiwidgets.attachmentview.ApplozicAudioRecordManager)

Aggregations

Bitmap (android.graphics.Bitmap)1 GestureDetectorCompat (android.support.v4.view.GestureDetectorCompat)1 FileClientService (com.applozic.mobicomkit.api.attachment.FileClientService)1 Message (com.applozic.mobicomkit.api.conversation.Message)1 MessageDatabaseService (com.applozic.mobicomkit.api.conversation.database.MessageDatabaseService)1 AppContactService (com.applozic.mobicomkit.contact.AppContactService)1 AlCustomizationSettings (com.applozic.mobicomkit.uiwidgets.AlCustomizationSettings)1 ApplozicAudioRecordManager (com.applozic.mobicomkit.uiwidgets.attachmentview.ApplozicAudioRecordManager)1 ApplozicDocumentView (com.applozic.mobicomkit.uiwidgets.attachmentview.ApplozicDocumentView)1 ConversationUIService (com.applozic.mobicomkit.uiwidgets.conversation.ConversationUIService)1 ImageLoader (com.applozic.mobicommons.commons.image.ImageLoader)1