Home
last modified time | relevance | path

Searched refs:chat (Results 1 – 25 of 32) sorted by relevance

12

/developers/samples/android/notification/Bubbles/app/src/main/java/com/example/android/bubbles/data/
DChatRepository.kt82 val chat = chats.getValue(id) in findMessages() constant
90 value = chat.messages in findMessages()
91 chat.addListener(listener) in findMessages()
95 chat.removeListener(listener) in findMessages()
102 val chat = chats.getValue(id) in sendMessage() constant
103 chat.addMessage(Message.Builder().apply { in sendMessage()
112 chat.addMessage(chat.contact.reply(text)) in sendMessage()
114 if (chat.contact.id != currentChat) { in sendMessage()
115 notificationHelper.showNotification(chat, false) in sendMessage()
132 val chat = chats.getValue(id) in showAsBubble() constant
[all …]
DNotificationHelper.kt66 fun showNotification(chat: Chat, fromUser: Boolean) { in <lambda>()
70 chat.contact.icon in <lambda>()
74 .setName(chat.contact.name) in <lambda>()
113 .setContentTitle(chat.contact.name) in <lambda>()
133 builder.setContentText(context.getString(R.string.chat_with_contact, chat.contact.name)) in <lambda>()
136 val lastOutgoingId = chat.messages.last { !it.isIncoming }.id in <lambda>()
137 val newMessages = chat.messages.filter { message -> in <lambda>()
162 notificationManager.notify(chat.contact.id.toInt(), builder.build()) in <lambda>()
/developers/samples/android/notification/Bubbles/app/src/test/java/com/example/android/bubbles/data/
DTestChatRepository.kt45 val chat = chats.getValue(id) in <lambda>() constant
53 value = chat.messages in <lambda>()
54 chat.addListener(listener) in <lambda>()
58 chat.removeListener(listener) in <lambda>()
64 val chat = chats.getValue(id) in <lambda>() constant
65 chat.addMessage(Message.Builder().apply { in <lambda>()
70 chat.addMessage(chat.contact.reply(text)) in <lambda>()
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/mock/
DMockDatabase.java67 Chat chat = new Chat(); in createChat() local
72 chat.setLastMessage(message); in createChat()
78 chat.setParticipantsAndAlias(participantMap); in createChat()
81 chat.setId(concat(participantMap.keySet())); in createChat()
85 Chat exists = findChat(allChats, chat.getId()); in createChat()
87 chat = exists; in createChat()
89 allChats.add(chat); in createChat()
94 return chat; in createChat()
144 private static void updateLastMessage(Context context, Chat chat, Message lastMessage) { in updateLastMessage() argument
147 chat = findChat(chats, chat.getId()); in updateLastMessage()
[all …]
/developers/build/prebuilts/gradle/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/mock/
DMockDatabase.java67 Chat chat = new Chat(); in createChat() local
72 chat.setLastMessage(message); in createChat()
78 chat.setParticipantsAndAlias(participantMap); in createChat()
81 chat.setId(concat(participantMap.keySet())); in createChat()
85 Chat exists = findChat(allChats, chat.getId()); in createChat()
87 chat = exists; in createChat()
89 allChats.add(chat); in createChat()
94 return chat; in createChat()
144 private static void updateLastMessage(Context context, Chat chat, Message lastMessage) { in updateLastMessage() argument
147 chat = findChat(chats, chat.getId()); in updateLastMessage()
[all …]
/developers/build/prebuilts/gradle/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/chat/
DMockIncomingMessageReceiver.java16 package com.example.android.wearable.wear.messaging.chat;
60 Chat chat = MockDatabase.findChatById(context, chatId); in onReceive() local
61 if (chat == null) { in onReceive()
72 mockReply(context, chat, message); in onReceive()
75 private void mockReply(Context context, Chat chat, Message message) { in mockReply() argument
77 String replierId = chat.getParticipants().keySet().iterator().next(); in mockReply()
91 MockDatabase.saveMessage(context, chat, replyMessage); in mockReply()
93 generateMessagingStyleNotification(context, chat, replyMessage); in mockReply()
103 private void generateMessagingStyleNotification(Context context, Chat chat, Message message) { in generateMessagingStyleNotification() argument
109 .setConversationTitle(chat.getAlias()); in generateMessagingStyleNotification()
[all …]
DReplyToMessageIntentService.java16 package com.example.android.wearable.wear.messaging.chat;
72 private void handleReply(CharSequence reply, Chat chat) { in handleReply() argument
82 MockDatabase.saveMessage(this, chat, message); in handleReply()
DChatActivity.java16 package com.example.android.wearable.wear.messaging.chat;
254 FindChatsAsyncTask(Context context, Chat chat) { in FindChatsAsyncTask() argument
256 this.mChat = chat; in FindChatsAsyncTask()
284 SendMessageAsyncTask(Context context, Chat chat) { in SendMessageAsyncTask() argument
286 this.mChat = chat; in SendMessageAsyncTask()
DChatAdapter.java16 package com.example.android.wearable.wear.messaging.chat;
61 ChatAdapter(Context context, Chat chat, Profile user) { in ChatAdapter() argument
63 this.mChat = chat; in ChatAdapter()
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/chat/
DMockIncomingMessageReceiver.java16 package com.example.android.wearable.wear.messaging.chat;
60 Chat chat = MockDatabase.findChatById(context, chatId); in onReceive() local
61 if (chat == null) { in onReceive()
72 mockReply(context, chat, message); in onReceive()
75 private void mockReply(Context context, Chat chat, Message message) { in mockReply() argument
77 String replierId = chat.getParticipants().keySet().iterator().next(); in mockReply()
91 MockDatabase.saveMessage(context, chat, replyMessage); in mockReply()
93 generateMessagingStyleNotification(context, chat, replyMessage); in mockReply()
103 private void generateMessagingStyleNotification(Context context, Chat chat, Message message) { in generateMessagingStyleNotification() argument
109 .setConversationTitle(chat.getAlias()); in generateMessagingStyleNotification()
[all …]
DReplyToMessageIntentService.java16 package com.example.android.wearable.wear.messaging.chat;
72 private void handleReply(CharSequence reply, Chat chat) { in handleReply() argument
82 MockDatabase.saveMessage(this, chat, message); in handleReply()
DChatActivity.java16 package com.example.android.wearable.wear.messaging.chat;
254 FindChatsAsyncTask(Context context, Chat chat) { in FindChatsAsyncTask() argument
256 this.mChat = chat; in FindChatsAsyncTask()
284 SendMessageAsyncTask(Context context, Chat chat) { in SendMessageAsyncTask() argument
286 this.mChat = chat; in SendMessageAsyncTask()
DChatAdapter.java16 package com.example.android.wearable.wear.messaging.chat;
61 ChatAdapter(Context context, Chat chat, Profile user) { in ChatAdapter() argument
63 this.mChat = chat; in ChatAdapter()
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/util/
DSchedulerHelper.java24 import com.example.android.wearable.wear.messaging.chat.MockIncomingMessageReceiver;
39 public static void scheduleMockNotification(Context context, Chat chat, Message message) { in scheduleMockNotification() argument
41 PendingIntent alarmIntent = createPendingIntentToNotifyMessage(context, chat, message); in scheduleMockNotification()
51 Context context, Chat chat, Message message) { in createPendingIntentToNotifyMessage() argument
54 intent.putExtra(Constants.EXTRA_CHAT, chat.getId()); in createPendingIntentToNotifyMessage()
/developers/build/prebuilts/gradle/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/util/
DSchedulerHelper.java24 import com.example.android.wearable.wear.messaging.chat.MockIncomingMessageReceiver;
39 public static void scheduleMockNotification(Context context, Chat chat, Message message) { in scheduleMockNotification() argument
41 PendingIntent alarmIntent = createPendingIntentToNotifyMessage(context, chat, message); in scheduleMockNotification()
51 Context context, Chat chat, Message message) { in createPendingIntentToNotifyMessage() argument
54 intent.putExtra(Constants.EXTRA_CHAT, chat.getId()); in createPendingIntentToNotifyMessage()
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/model/
DChat.java200 Chat chat = (Chat) other; in equals() local
202 if (!id.equals(chat.id)) { in equals()
205 if (alias != null ? !alias.equals(chat.alias) : chat.alias != null) { in equals()
208 if (!participants.equals(chat.participants)) { in equals()
212 ? !lastReadMessages.equals(chat.lastReadMessages) in equals()
213 : chat.lastReadMessages != null) { in equals()
217 ? lastMessage.equals(chat.lastMessage) in equals()
218 : chat.lastMessage == null; in equals()
/developers/build/prebuilts/gradle/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/model/
DChat.java200 Chat chat = (Chat) other; in equals() local
202 if (!id.equals(chat.id)) { in equals()
205 if (alias != null ? !alias.equals(chat.alias) : chat.alias != null) { in equals()
208 if (!participants.equals(chat.participants)) { in equals()
212 ? !lastReadMessages.equals(chat.lastReadMessages) in equals()
213 : chat.lastReadMessages != null) { in equals()
217 ? lastMessage.equals(chat.lastMessage) in equals()
218 : chat.lastMessage == null; in equals()
/developers/build/prebuilts/gradle/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/chatlist/
DChatListAdapter.java122 void openChat(Chat chat); in openChat() argument
163 final Chat chat = mChats.get(position - INDEX_OFFSET); in onBindViewHolder() local
169 mListener.openChat(chat); in onBindViewHolder()
173 chatItemViewHolder.alias.setText(chat.getAlias()); in onBindViewHolder()
175 Message lastMessage = chat.getLastMessage(); in onBindViewHolder()
178 if (chat.getParticipants().size() == 1) { in onBindViewHolder()
179 lastMessageSender = chat.getParticipants().values().iterator().next(); in onBindViewHolder()
181 lastMessageSender = chat.getParticipants().get(lastMessage.getSenderId()); in onBindViewHolder()
216 int numParticipants = chat.getParticipants().size(); in onBindViewHolder()
234 for (Chat chat : chats) { in setChats()
[all …]
DChatListActivity.java28 import com.example.android.wearable.wear.messaging.chat.ChatActivity;
113 public void openChat(Chat chat) { in openChat() argument
115 startChat.putExtra(Constants.EXTRA_CHAT, chat); in openChat()
172 protected void onPostExecute(Chat chat) { in onPostExecute() argument
173 super.onPostExecute(chat); in onPostExecute()
177 "Starting chat with %d partcipants(s)", chat.getParticipants().size())); in onPostExecute()
181 startChat.putExtra(Constants.EXTRA_CHAT, chat); in onPostExecute()
/developers/samples/android/deprecated/wearable/wear/WearMessagingApp/Wearable/src/main/java/com/example/android/wearable/wear/messaging/chatlist/
DChatListAdapter.java122 void openChat(Chat chat); in openChat() argument
163 final Chat chat = mChats.get(position - INDEX_OFFSET); in onBindViewHolder() local
169 mListener.openChat(chat); in onBindViewHolder()
173 chatItemViewHolder.alias.setText(chat.getAlias()); in onBindViewHolder()
175 Message lastMessage = chat.getLastMessage(); in onBindViewHolder()
178 if (chat.getParticipants().size() == 1) { in onBindViewHolder()
179 lastMessageSender = chat.getParticipants().values().iterator().next(); in onBindViewHolder()
181 lastMessageSender = chat.getParticipants().get(lastMessage.getSenderId()); in onBindViewHolder()
216 int numParticipants = chat.getParticipants().size(); in onBindViewHolder()
234 for (Chat chat : chats) { in setChats()
[all …]
DChatListActivity.java28 import com.example.android.wearable.wear.messaging.chat.ChatActivity;
113 public void openChat(Chat chat) { in openChat() argument
115 startChat.putExtra(Constants.EXTRA_CHAT, chat); in openChat()
172 protected void onPostExecute(Chat chat) { in onPostExecute() argument
173 super.onPostExecute(chat); in onPostExecute()
177 "Starting chat with %d partcipants(s)", chat.getParticipants().size())); in onPostExecute()
181 startChat.putExtra(Constants.EXTRA_CHAT, chat); in onPostExecute()
/developers/samples/android/notification/Bubbles/app/src/main/java/com/example/android/bubbles/ui/chat/
DChatFragment.kt16 package com.example.android.bubbles.ui.chat in <lambda>()
127 viewModel.contact.observe(viewLifecycleOwner, Observer { chat -> in <lambda>() method
128 if (chat == null) { in <lambda>()
133 name.text = chat.name in <lambda>()
135 .load(chat.icon) in <lambda>()
194 inflater?.inflate(R.menu.chat, menu) in <lambda>()
/developers/build/prebuilts/gradle/WearMessagingApp/
DREADME.md6 chat list, send messages, message style notification, and sign-in with Google.
32 - Sending a chat message
33 - Receiving a chat message
71 <img src="screenshots/chat_list.png" height="400" alt="Screenshot"/> <img src="screenshots/chat.png…
/developers/build/prebuilts/gradle/BluetoothChat/
DREADME.md5 This sample shows how to implement two-way text chat over Bluetooth between two Android devices, us…
11 This sample should be run on two Android devices at the same time, to establish a two-way chat over
42 …ts/2-devices.png" height="400" alt="Screenshot"/> <img src="screenshots/3-chat.png" height="400" a…
/developers/samples/android/notification/Bubbles/app/src/main/java/com/example/android/bubbles/
DBubbleActivity.kt23 import com.example.android.bubbles.ui.chat.ChatFragment

12