whatsapp

How to create a whatsapp like recording button with slide to cancel

岁酱吖の 提交于 2019-11-28 02:52:35
问题 As in whatsapp I need a recoding button and a slide to cancel and fade animation , I have searched for similar code but didn't got one. I am new to android programming any help or link could be helpful. 回答1: I have created a github project.You can take a look at it https://github.com/sarathnk/Audio audioSendButton.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { if (motionEvent.getAction() == MotionEvent.ACTION_DOWN) {

Android Whatsapp/Chat Examples [closed]

懵懂的女人 提交于 2019-11-28 02:33:10
Does anybody have an example or a tutorial for a Android application like WhatsApp ? I want to understand how WhatsApp works and how it is programmed. I want to see an example that uses a message-chat-system with "online"-status and "read the message" -information. I used Google but I found nothing. Maybe someone has a tip. Thanks. If you are looking to create an instant messenger for Android, this code should get you started somewhere. Excerpt from the source : This is a simple IM application runs on Android, application makes http request to a server, implemented in php and mysql, to

Returning an Image to whatsapp

*爱你&永不变心* 提交于 2019-11-28 00:23:43
I've been trying to build an app that shows up as an optional image source when a user tries to share an image using whatsapp. So far I have managed to get my app to show up in the service picker that whatsapp launches using intent filters but I cannot get the image to return correctly to whatsapp. Im posting my code below : public void returnImage(View v){ //Bitmap img; //Bundle selectedImage = new Bundle(); Uri imageURI; Intent shareIntent = new Intent(); switch(v.getId()){ case R.id.eric1 : imageURI = saveToCache(R.drawable.cartman1); shareIntent.putExtra(Intent.EXTRA_STREAM, imageURI);

Send message via whatsapp programmatically

a 夏天 提交于 2019-11-28 00:08:38
问题 I'm trying to send messages via Whatsapp programmatically, the code works except the user needs to click the send button. I need the app to do everything (all user interactions). One way to do to it as follows . Go to Menu Button > Settings > Chats. and check the "Enter is send option" Here's the code I'm using: protected void sendwts(){ String smsNumber = "2126123456789"; // E164 format without '+' sign Intent sendIntent = new Intent(Intent.ACTION_SEND); // Intent sendIntent = new Intent

Open whatsapp on iOS with new phone number pre-filled

我怕爱的太早我们不能终老 提交于 2019-11-27 21:53:50
问题 I know there is scheme to communicate with whatsapp like: NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://send?text=Hello%2C%20World!"]; if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) { [[UIApplication sharedApplication] openURL: whatsappURL]; } But i can't find how to open whatsapp with a phone number that don't exist before. It's for a "contatc us" page and if i can only open whatsapp and can't pre fill a phone number, it's useless. I need to be contacted with

android-make whatsapp call

白昼怎懂夜的黑 提交于 2019-11-27 20:18:41
I want to make a WhatsApp call to a specific user. I tried this and it doesn't work: Uri uri = Uri.parse("callto:" + phoneNUmber); Intent i = new Intent(Intent.ACTION_CALL, uri); i.setPackage("com.whatsapp"); startActivity(i); I know how to create a WhatsApp message, the code is similar and it works: Uri uri = Uri.parse("smsto:" + phoneNUmber); Intent i = new Intent(Intent.ACTION_SENDTO, uri); i.setPackage("com.whatsapp"); startActivity(i); Adnan Khan Simple solution is, Query ContactContract.Data for the _id and MIME type. ContentResolver resolver = context.getContentResolver(); cursor =

How to share text to WhatsApp from my app?

北城余情 提交于 2019-11-27 17:36:23
I develop an app with a functionality for sharing text. This is working fine except for WhatsApp. What should I do? Is there any specific API for that? There is no public official api for whats app....So it is not possible now. Sonny Ng You can use intent to do so. No need to use Whatsapp API. Hope that I have not misunderstood your question. Hope that helps, thanks. Intent whatsappIntent = new Intent(Intent.ACTION_SEND); whatsappIntent.setType("text/plain"); whatsappIntent.setPackage("com.whatsapp"); whatsappIntent.putExtra(Intent.EXTRA_TEXT, "The text you wanted to share"); try { activity

Share raw resource via WhatsApp

我是研究僧i 提交于 2019-11-27 14:14:19
问题 Intent share = new Intent(Intent.ACTION_SEND); share.putExtra(Intent.EXTRA_STREAM, Uri.parse("android.resource://" + ContextID.getPackageName() + "/" + ResourceID)); share.setType("audio/*"); ContextID.startActivity(Intent.createChooser(share, "Condividi il suono")); The above code works fine with Gmail, while Whatsapp gives a toast message like "Share a file failed, please try it again" Maybe i've the same problem of this guy: Intent.ACTION_SEND Whatsapp But how can i temporarily copy my

Sending message through WhatsApp By intent

一曲冷凌霜 提交于 2019-11-27 13:21:53
How I can send massage from my app to Special number in whatsapp , I know this code to share massage to group or contact on whatsapp Intent waIntent = new Intent(Intent.ACTION_SEND); waIntent.setType("text/plain"); String text = "Sorry For Interruption,I'm Just Trying Something"; waIntent.setPackage("com.whatsapp"); if (waIntent != null) { waIntent.putExtra(Intent.EXTRA_TEXT, text);// startActivity(Intent.createChooser(waIntent,"Share with")); but I want send massage to Special number like "966xxxxxxx" how I can do that ? Abdullah AlHazmy this is a Solution : private void openWhatsApp(String

Get Path from another app (WhatsApp)

拥有回忆 提交于 2019-11-27 12:36:33
问题 I'm not getting Path from image or video from uri that I receive from whatsApp. Uri comes like this: content://com.whatsapp.provider.media/item/16695 Media coming from Gallery, Downloads ands others are fine. Anyone know how to get Path? This is the code I'm using: public String getMediaPath(Context context, Uri uri) { if (DEBUG) Log.d(TAG + " File -", "Authority: " + uri.getAuthority() + ", Fragment: " + uri.getFragment() + ", Port: " + uri.getPort() + ", Query: " + uri.getQuery() + ",