List showing messages - android

I am creating a messaging app like WhatsApp in Android. What is the name of the control that is used to display the messages? For example, if I open my chat history in WhatsApp, it'll display all my chat history with a particular user. Is it just a ListView or something else?

It's called RecyclerView, I would suggest to take a look on this useful lib:
https://github.com/madhur/android-chat-starter

Related

How to show push notification in the app just like instagram show in notification activity

I am developing an android app that receives push notification from Firebase console, but my problem is how to show this notifications in the application just like Instagram and Facebook both shows notification in the app.
I want to show just like happen app show notification in the app.
When using FCM, notifications will never show "in the application". They only show when the app is in the background. Instagram and Facebook are able to do this because they probably don't use FCM.
Based on your comment you don't want something related to push, you need an user story.
Since i don't program JAVA i can't help you with the programming part and codes, but i can help on the logic and the rest you can figure out. And since i don't know the segment of your app i'll do everything thinking on Instagram.
THE 'PEOPLE WHO LIKED/FOLLOWED YOU' PART:
You'll need an UserStories node where you'll save an userID node and, inside that node, you'll push data of the person who liked/followed your picture.
Lets imagine i'm a user, my name is Gabriel and my id is 1234, le'ts say i also have a picture whose link is https://firebasestorage.etc. If i like your post you save something like this on Firebase
DataBase
|_ UserStories
|_ YourUserID
|_ -TheKeyFirebasePushMethodGenerated
|_ name: "Gabriel"
|_ id: 1234
|_ pic: "https://firebasestorage.etc"
So everytime you enter your people who liked page you'll get your recent user stories under your id, iterate through it and build your page. You can get like only the last 30, or suit yourself with the number you like, or a infinite scroll.
THE PUSH NOTIFICATION
You can do a push with number of people who liked your post, if you have something in your back-end with an observable/watcher who keeps an eye in every UserStories with once child_added method, you can use it to get the user key, the number of times it was fired and send a push to that user incrementing every time someone likes and, when the user opens the app/click the push, you set that number to 0.
And you can do better, take all child_added and the last one you'll use as the push icon and title.
TOO MANY STORIES
You can also use this idea of child_added to keep your database clean, ok i know the user story is like a log and it's good to have all entries, but you can make something like if it has more than 1000 entries, delete the first entry.
So i don't know if this can give you ideas to solve your problem, other user commentaries based on what i said are also a good ideia, but i hope this helps.

Sending simple data with notification to another app

I'm working on two seperate apps that need at some point to exchange messages, both apps share a MYSQL database, I want the first app to be able to send some data to one of the other app's users (specified by his id, email or phone number ), and this last to be able to reply to the request by accepting or rejecting with a button click.
Now, I don't know what is the best:
Something similar to chat ?Is it possible to extract the necessary data from the rest of the chat message ?
A broadcast.
A push notification.
Or something else ?
Help me please I'm a total newbie, I would use an expert opinion.
What you are describing is basically every other Chat App that exists.
I can only suggest you to read this code example to get an idea how to approach this:
Android Chat Example code

In Android how to show a popup when post share is complete

I have ShareActionProvider in my Application. it shares a photo I uploaded with a text I insert. When share is done, I want to show a popup message/dialog with a button OK, clicking on which I should return to my application. The question is: in my application how can I know if share is complete or no ? For example, if I share the photo and text in instagram, how can I know that post is already done.
in my application how can I know if share is complete or no ? For example, if I share the photo and text in instagram, how can I know that post is already done.
That is not possible for ACTION_SEND. What the user does with the shared content in the other app is between the user and the developers of the other app. The user might do something immediately, later, or never. The app might do something immediately or later (e.g., upload the content as part of a periodic sync operation with a server). There is no protocol for the receiving app to tell you that sharing is "done".
Specific apps may offer specific APIs, beyond ACTION_SEND, that offer capabilities in this area, but those will be unique to those apps.
Use a Toast like this: Toast.make(context "Uploaded", Toast.LENGTH_SHORT).show();
Toast is just tiny little "popup"

Android: How to add custom field/action to contact detail

I would add custom action into system contact detail of Android like Viber (see attached screenshot) and other messaging apps do.
When user clicks on such custom action, my app will handle. Any help?
I doubt it is as easy as it sounds. From what I see you need to create a new Account on the device to achieve something like this.

How to create message and save it in Android?

i am trying to develop a simple application. i want to create a simple message and want to save it. now, i want to select message from list of messages which i have created and stored.
can any one please suggest me or give an idea for developing the same.
Thanks in Advance
If you substitute the word "message" for "note", you are describing something really similar to the notepad example.
It runs you step by step trough the code you need to make an application that has notes (messages) you can add, and open.
If you are new to Android development you should go trough all the excersises, because it's a really good help, but if you're not you can just download the sollution and use that.
I feel you should go like this:
Have your application store Contacts in a database (I guess you're already doing this)
Have your application store messages in another database (I guess you're already doing this too)
In the UI, display all the messages inside a ListView, by querying them from your message database.
When user clicks on any message, have another screen that loads this message in full, and lets the user select the recipients
Send the text message to the selected recipients now
I just wanted to point out the flow of the app, since the storage and retrieval process os pretty straight forward. I am not sure if this was what you were looking for.
Do let me know.
If you will store little amount of data you can use sharedpreferences
http://developer.android.com/reference/android/content/SharedPreferences.html
If you want a real solution that is sqlite database that comes with android.
http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html

Categories

Resources