I have list of conversations, and messenger UI.. what I want is: When an item of the list of conversations clicked, the messenger UI appear with that specific conversation messages.. my attempt: Until now I haven't code this part, I just look for an idea,is it good Idea to save each message immediately to DB, and when I navigate between the conversations I drop the appropriate messages?
navigate between conversations and see previous messages
145 Views Asked by EsmaeelQash At
2
There are 2 best solutions below
Related Questions in ANDROID
- Creating global Class holder
- Flutter + Dart: Editing name of a tab shows up a black screen
- android-pdf-viewer Received status code 401 from server: Unauthorized
- Sdk 34 WRITE_EXTERNAL_STORAGE not working
- ussd reader in Recket Native module
- Incorrect display of LinearGradientBrush in IOS
- The Binary Version Of its metadata is 1.8.0, expected Version is 1.6.0 build error
- I can't make TextInput to auto expand properly in Android
- Creating multiple instances of a class with different initializing values in Flutter
- How to create a lottie animation
- making android analyze with coverity sast tool
- Flutter plugin development android src not opening after opening example
- I initialize my ViewModel in the Activity with several fragments as tabs, but the fragments(tabs) return null for the updated livedata
- Node.js Server + Socket.IO + Android Mobile Applicatoin XHR Polling Error...?
- How I can use the shared preferences class?
Related Questions in MESSAGE
- Slack webhook returns invalid_payload when message is a url
- How properly and efficient load chats and messages in those chats?
- I am getting this error using Eclipse : An error has occurred. See error log for more details. org/eclipse/egit/core/AdapterUtils
- Whatsapp shared id
- How to send message to recipients individually?
- Delete the number (limit) of records older than 180 days from ESQL (ACE flow)
- What's git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks push -v --tags --set-upstream origin master:master
- How to send messages inside the whatsapp with flutter app, no open whatsApp
- Can i use ws.onmessage in node.js server?
- Telethon, how to get messages from chat, but not don't make requests to get user entites
- MFMessageComposeViewController UI issue for big amount of recipients
- How to change the url of a template when i am sending a whatsapp message?
- Say a message for longer on alexa developer with python
- I want to set a popup message when I close any file in windows, how is it possible?
- Whatsapp messages sender works properly but not with images
Related Questions in INSTANT-MESSAGING
- Calling the http://x.x.x.x:10002/auth/user_token API returns a 404 page not found
- How to Integrate OpenIM in My Web Project for Chat Functionality?
- Retrieve the forum topics of a channel/group in Telegram using WTelegramClient API
- firebase push notification android kotlin appears on the sender device
- Direct Messaging on a "Public" Server in Python
- How do I code app-to-app direct communication on different devices?
- What does the Android (or other mobile) OS expose (if any is needed) to make a functionality like WhatApp's "View Once" possible to implement?
- How do I send & receive messages in pidgin with python 3?
- Load Balancing WebSockets Using a Single-node Load Balancer Without Ephemeral Port Exhaustion
- Database Schema Design for Chat Application using Cassandra (Private and Group Messaging)
- Receiving message from server instantly while android screen is locked/is in a sleep
- Is there a way to use XMPP protocol to make P2P instant messaging using Pidgin client?
- Syncing chat app message history with local cache
- Adding real-time chat messaging to my SwiftUI app: What options are available?
- Application web: message sending
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Recently I've been working in something similar. For achieving this I've used a TabHost, with a FrameLayout associated to each one that might be converted to a TextView, which is what I suppose you want.
This approach has a handicap: You can access just to the currently opened tab's view (in this case, a TextView). If you don't plan to add text to an inactive tab, you don't need to do anything further as TabHost handles each tab's previous messages. But for instance, if you want to add messages to an inactive tab, you have to store them first in a queue and once the tab is activated, process them with an OnTabChangedListener event.
That's my definition for the TabHost structure:
If you need to process events on a tabchange, you should have something like this:
You should also be aware of controlling the buffer of each tab. That is, control that each tab doesn't have more than X messages, as if it grows without control your app may start being irresponsive.
These links might help you as they did to me when I was programming this part:
https://gist.github.com/jerolimov/618086
http://androidituts.com/android-tab-layout-example/
http://learnandroideasily.blogspot.com.es/2013/07/android-tabwidget-example.html