LightBlog

vendredi 17 février 2017

Hangouts v17 Prepares for Better Integration of Chat Messages During Voice Calls

While it’s fun to rag on Hangouts, the Google application is still a powerful instant messaging app for casual users.

Due to its wide installation base (from being pre-installed on millions of Android devices), Google Hangouts makes it easy to chat or voice call with a large number of people. Version 17 of the Android application just start rolling out today, and we’ve taken a look within the APK file to see if there is anything interesting. Within the APK, there are hints that Hangouts may soon better integrate chat messages while you are in the middle of a voice call. While you are able to press the back arrow while in a voice call to view your entire chat history, it appears that Hangouts will interacting with messages without leaving the voice call interface.

Although a teardown can provide valuable information regarding upcoming features, it is entirely possible that these features may not make their way into the final product. Do not take these teardowns as proof that a feature will be added, but rather as a hint of what could be coming.


View Chat Messages During Calls

While this feature isn’t yet live in the latest Hangouts application, it appears to already be mostly implemented within the APK as there are several layout files and new assets that are tied to this feature. Looking at the new strings that are within the APK, we can get a good idea of what to expect:


<string name="in_call_message_content_description_from" formatted="false">%s said, %s</string>
<string name="in_call_chat_menu_title">Message options</string>
<string name="in_call_chat_menu_copy_text">Copy text</string>
<string name="in_call_message_copied_text_label">Message text</string>
<string name="show_in_call_message_button_content_description">Show chat messages</string>
<string name="hide_in_call_message_button_content_description">Hide chat messages</string>

For starters, it appears that whenever you receive a new chat message while in a voice call, there will be a dialog showing a description of the message rather than the standard notification. Furthermore, there will be a new button to open up a list view of your chat conversation, as indicated by the “show_in_call_message_button_content_description” which will show a description of what the new button does when it is long-pressed. While viewing the chat in a call, long-pressing one of the messages will open up the standard “Message options” menu where you can copy a text.

The above icon is what will probably appear while you are in the middle of a voice call. When pressed, it will bring up your conversation history with that user. Below I’ve reproduced the layout files that are new to this version of Hangouts, and these appear to implement this new feature. The first layout file handles the text view while the second layout file shows where the icons will be displayed while in-call.

in_call_message_list_item_view.xml

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/in_call_message_list_item_top_padding"
xmlns:android="http://ift.tt/nIICcg">
<LinearLayout android:gravity="center_vertical" android:orientation="vertical" android:id="@id/message_item_view" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/in_call_message_bubble_incoming_margin_inside" android:layout_marginRight="@dimen/in_call_message_bubble_margin_incoming_outside" android:baselineAligned="false">
<TextView android:layout_gravity="start" android:id="@id/sender_name_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxWidth="@dimen/in_call_message_bubble_content_max_width" android:lineSpacingExtra="@dimen/in_call_message_bubble_text_line_spacing_extra" android:importantForAccessibility="no" style="@style/InCallMessage.Name" />
<com.google.android.apps.hangouts.views.WrapWidthTextView android:layout_gravity="start" android:id="@id/message_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:maxWidth="@dimen/in_call_message_bubble_content_max_width" android:singleLine="false" android:lineSpacingExtra="@dimen/in_call_message_bubble_text_line_spacing_extra" android:importantForAccessibility="no" style="@style/InCallMessage.Text" />
</LinearLayout>
</FrameLayout>

in_call_message_list_view.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://ift.tt/nIICcg">
<android.support.v7.widget.RecyclerView android:id="@id/message_list" android:background="@android:color/transparent" android:paddingLeft="@dimen/in_call_message_list_padding" android:paddingRight="@dimen/in_call_message_list_padding" android:paddingBottom="@dimen/in_call_message_list_padding_bottom" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/in_call_message_list_margin_end" android:cacheColorHint="@android:color/transparent" android:layout_above="@id/message_button_group" android:overScrollMode="never" android:requiresFadingEdge="vertical" />
<RelativeLayout android:id="@id/message_button_group" android:background="@color/in_call_message_button_background" android:layout_width="@dimen/in_call_message_button_group_width" android:layout_height="@dimen/in_call_message_button_group_height" android:layout_alignParentBottom="true">
<FrameLayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_centerHorizontal="true" android:layout_centerVertical="true">
<ImageButton android:id="@id/show_message_list_button" android:background="@color/in_call_message_button_background" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/quantum_ic_chat_white_24" android:contentDescription="@string/show_in_call_message_button_content_description" />
<ImageButton android:id="@id/hide_message_list_button" android:background="@color/in_call_message_button_background" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/quantum_ic_chevron_left_white_24" android:contentDescription="@string/hide_in_call_message_button_content_description" />
</FrameLayout>
<ImageView android:id="@id/message_indicator" android:visibility="gone" android:layout_width="@dimen/in_call_message_indicator_width" android:layout_height="@dimen/in_call_message_indicator_height" android:layout_marginTop="@dimen/in_call_message_indicator_margin_top" android:layout_marginRight="@dimen/in_call_message_indicator_margin_end" android:src="@drawable/in_call_message_indicator" android:layout_alignParentTop="true" android:layout_alignParentRight="true" android:importantForAccessibility="no" />
</RelativeLayout>
</RelativeLayout>

This is by no means a revolutionary feature, and doesn’t really add all that much to Hangouts itself since you already have the ability to back out of a call to view your conversation history. However, it is nice to see incremental changes that offer some quality of life improvements to the Hangouts experience. With Hangouts shifting to a more enterprise focus, these kinds of features are especially useful if you are messaging a lot of people and want to quickly catch up on your recent conversation to jog your memory.



from xda-developers http://ift.tt/2l49FHr
via IFTTT

Aucun commentaire:

Enregistrer un commentaire