Facebook share to one friend only - android

I am trying to build a functionality where a notification can be send by the user from my application to one other friend from his friend list. I tried to implement this with a request, but the picker allows the selection of multiple friends.
I know I can get a list of all the friends of the user, but I do not know hot to send a notification to a single friend the user selects.
So I was wondering if there is a way to either limit the requestdialog to select a single friend or to send a notification to a specific friend.

I'm not sure if this is an acceptable way to share your content, but you may want to try just sending a message. The latest API has support for Message Dialogs
I hope this is helpful in answering your question, but I understand that it may not be.
Happy coding! I hope this helps, leave a comment if there's anything I can help you with.

Related

WhatsApp Clone in android for message identifier

I'm working on a chat app message like whatsapp clone in android using firebase.
Right now the application can chat user to user.
My problem right now is the messages was no identifier that the other user see the messages of one another.
In order to make a solution I concat the userId and currentUserId so that it will be the unique message identifier since I'm using firebase-auth.
So my question right now is if this solution is somewhat ok? or any suggestions for message identifier for app chat?
This is some of my code in my ChatActivity for retrieving chat messages
mFirebaseDatabaseRef!!.child("messages").child(mFirebaseUser!!.uid+userId))
Here is saving the messages for every message I push both for user devices
mFirebaseDatabaseRef!!.child("messages")
.child(mCurrentUserId+userId)
.push()
.setValue(friendlyMessage)
mFirebaseDatabaseRef!!.child("messages")
.child(userId+mCurrentUserId)
.push()
.setValue(friendlyMessage)
Here is the sample generated format in firebase (It will both generate two unique coming from two userId's want to chat)
Thanks
So my question right now is if this solution is somewhat ok?
Yes it is. Since this solution works and help you get your job done, it ia a very good solution. You may wonder, is there a better one?
There is no better or perfect solution for how to identify the messages in your app. The best solution, is the solution that fits your needs and makes your job easier. And I personally don't think that can be a better solution than the one that you are comfortable with.
or any suggestions for message identifier for app chat?
Since it is a one to one chat application, the way you identify a "chat room" that contain messages it right, since it is very easy to query. You can simply attach a listener on fromUidtoUid or toUidfromUid reference, and that's it, you got all the messages of a conversation between two users.

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

How to integrate friend list feature in an Android App?

I would like to have a friend list feature in my App. The idea is to select any contact from your contact list and then that contact would be sent an SMS from the App(via Server), requesting him to click on the link to accept the friend request, if he is already on the App. If he is not on the App, the SMS would send him a download link. How can I achieve this? Any help would be highly appreciated.
EDIT:
So far, when I select the contact, it gets added in my friend list, with an "!" mark that the request has not been approved at the other end. The other guy gets an SMS as well from the App(via Server) to accept the request by clicking on the link. Now when the other guy, clicks on the link(just a demo link as of now), how do I make him accept the request? Any suggestions would be highly appreciated.
You have nearly completed the job at hand.
Here is what you can do to finish it.You will need to maintain a mapping of which number sent which other number a link on the server. I have not understood how a single link for all requests is going to suffice what you need to do(else you will need a way to generate unique links and handle what happens when each is clicked on!). I dont think that is possible. The user onclick on the link could be redirected to new activity which will pull friend-requests from the server from the mapping availabe. The user could accept or reject the requests here. You see a single link will fail to provide functionality of multiple requests the user gets. Once the second user has one this, you can notify the first user of the same(maybe via GCM or by polling from the device(not efficient!)). I hope my interpretation of the task at hand was right.

Create multiple contact groups in Android

Can anyone help me in creating multiple contact groups like business, personal etc programatically. I need these groups and their contacts to be maintainable through an app.
This would be a large task to ask someone to do for you. I can push you in a good direction though with a list of great video tutorials. I followed these tutorials when I first started Android development and I know for sure that your question would be covered in these tutorials.
Click here to begin Android Development!
Just very simple, collect the mail ID s of groups you want to post in one click. Go to your regular mail box, gmail or yahoo mail etc, prepare your post in a mail, copy paste all the IDs you have collected, provide a coma or semicolan between each as required by the mail client to separate each mail ID. Attach the files or Photos, send, over. You will find your post in all groups. If the groups dont have a mail ID, ask them to create one, its just 1 minut work and very simple.

Send contact (phone number ) via SMS or Email

i have been developing an app. It allow call, sms, etc ... from information about contact. Now i want to attach contact via sms,or email. How to do this?? Thank in advance
I guess these can get you started:
SMS
Bluetooth
Email
You should not think that way in Android. It's much more Android's way to "share" things. Look at this link, you will get it : http://sudarmuthu.com/blog/sharing-content-in-android-using-action_send-intent
And when an answer fits your need, feel free to accept it, that's the only way people get rewarded here.

Categories

Resources