use of com.waz.zclient.core.controllers.tracking.events.media.StartedRecordingAudioMessageEvent in project wire-android by wireapp.
the class ConversationFragment method onAudioMessageRecordingStarted.
@Override
public void onAudioMessageRecordingStarted() {
getControllerFactory().getGlobalLayoutController().keepScreenAwake();
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new StartedRecordingAudioMessageEvent(getConversationTypeString(), false));
}
use of com.waz.zclient.core.controllers.tracking.events.media.StartedRecordingAudioMessageEvent in project wire-android by wireapp.
the class ConversationFragment method onCursorButtonLongPressed.
@Override
public void onCursorButtonLongPressed(CursorMenuItem cursorMenuItem) {
switch(cursorMenuItem) {
case AUDIO_MESSAGE:
if (PermissionUtils.hasSelfPermissions(getActivity(), AUDIO_PERMISSION)) {
extendedCursorContainer.close(true);
if (audioMessageRecordingView.getVisibility() == View.VISIBLE) {
break;
}
SoundController ctrl = inject(SoundController.class);
if (ctrl != null) {
ctrl.shortVibrate();
}
audioMessageRecordingView.prepareForRecording();
audioMessageRecordingView.setVisibility(View.VISIBLE);
final IConversation conversation = getStoreFactory().getConversationStore().getCurrentConversation();
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(OpenedMediaActionEvent.cursorAction(OpenedMediaAction.AUDIO_MESSAGE, conversation));
((BaseScalaActivity) getActivity()).injectJava(GlobalTrackingController.class).tagEvent(new StartedRecordingAudioMessageEvent(getConversationTypeString(), true));
} else {
ActivityCompat.requestPermissions(getActivity(), AUDIO_PERMISSION, AUDIO_PERMISSION_REQUEST_ID);
}
break;
}
}
Aggregations