It's possible to have a button in my web page, for sending pre-filled messages to specific number?
i'm trying with
intent://send/+391234567890#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end;whatsapp://send?text=
nothing result.
have a solution? Thanks
Firstly, write the country code without +
Message me in WhatsApp
Sadly this does not work unless the number is already in your contacts list! Making it useless.
Here's what happens for me: I get a modal dialog saying the user is not on WhatsApp and I can either Invite or SMS. This is a mistake - they're DEFINITELY on WhatsApp, but not in my contacts because I've deleted them for testing.
Workaround idea
Offer vCard to save to Contacts
Since the phone number has to be in the Contacts list first, let's get it there. Track the site visitor to see if it's the first time she tapped on Contact me on WhatsApp (a cookie?). If it's the first time she tapped, make the link download your vCard
href="johnsmith.vcf"
The user now has to open the downloaded vCard with the People app, and add you to her Contacts.
Android intents URI FTW
When she returns, assuming she added you, make the button work with the intent:// URI scheme.
href="intent://send/391234567890#Intent;scheme=smsto;package=com.whatsapp;action=android.intent.action.SENDTO;end"
She taps on it and is magically transported to a WhatsApp chat with you.
Keep track of which href to present
Hopefully you can use the cookie you set to track her so you don't have the button offer the vCard AGAIN. There's no other way to know if your number is in her Contacts list unless you ask. But then it's not a button anymore, it's a form.
Same goes for Telegram. Security implications are probably the ones keeping Instant Messaging not so instant.
Related
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"
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.
I have a requirement like, I can be able to find the people who are using a particular app from my contacts. It is much similar like Whatsapp contacts syncing.
Whatsapp contacts is so fast & very accurate. What is the logic for it?
I'm not sure of their exact logic, but a way that I have seen it done before is as follows...
Access the phone's contacts (duh)
Get the contact that you want to add as a "friend" in your app.
Cross reference that contact's phone number with the user information that you have stored in your application's database
If that phone number exists in your database of users, then you've got a match and you can process things however you'd like from there.
That's one way of doing it, but I don't know if that's exactly how WhatsApp does it. Hope this helps!
I'm developing an app and one thing I would like to do it allow users to send/share data from the app with others vi MMS or by email. I have been searching but haven't found anywhere to get started on solving the problem.
Basically, I am going to programatically draw the data from an SQLite DB and put it into a delimited file (similar to a .csv) then I want to allow the user to 'export' or send it via MMS or Email. Does anyone have any tips on how I can get my program to open the messaging application and add the attachment at the users direction? Really just need some beginning info so I have a place to start.
Here is what you are looking for. This should be a good start
launch sms application with an intent
I want to let my app scan the users contactlist , and display the name of the contacts who also installed the app.
I have no idea where to begin with this . so if someone could help me getting started , that would be apreciated.
grtz
You will need to research ContentResolver because you will have to query the database containing the contacts. To do these queries, you will need the URI and column/header names for contacts db which can be found in the Contacts class.
You will also need users to register that they have your app on your own servers and the registration will need a piece of information about the user that other users would have in their contacts (the users phone number, email address, etc).
You will then need to query a few users at a time from the users contacts for this piece of information (using the ContentResolver and Contacts class), pass it to your server (as text) where it will check if they are registered, then send a message back to initial user (and possibly the match) that you found a match.
That's where you should start, and end :)
Note, you will need these permissions in the Manifest file:
android.permission.INTERNET
android.permission.READ_CONTACTS
First of all, welcome to StackOverflow. StackOverflow is for programming questions. As is such, a post asking for help should always provide a description of what you have already tried. If you haven't tried anything yet, I highly encourage you to try something, and post when you encounter a problem.
As your question stands now, we don't know what the problem is. Are you having problems scanning a contact list? Or are you having problems trying to figure out if another user has installed the app?
That being said, you will have to maintain a database for your app containing a list of people who have installed your app. When your app is launched on one device, do whatever you need to do to register the user in your database. Due to the nature of a "contact," one person's phone may only have their phone number, email address, or even just a name. This is of course something you will have to deal with in your implementation.