Sunday 27 September 2015

Send MSG and Image Whatspp

 if (String.IsNullOrEmpty(txtMessage.Text))
                return;
            if (WhatSocket.Instance != null)
            {
                if (WhatSocket.Instance.ConnectionStatus == ApiBase.CONNECTION_STATUS.LOGGEDIN)
                {
                  
                 
                    if (txtMessage.Text == "Image")
                    {
                        byte[] img = File.ReadAllBytes(fileName);
                        WhatSocket.Instance.SendMessageImage(txtto.Text + "@s.whatsapp.net", img, ApiBase.ImageType.JPEG);
                    }
                    else {
                        WhatSocket.Instance.SendMessage(txtto.Text, txtMessage.Text);
                    }
                    txtstatus.Text += string.Format("\r\n {0}:{1}", user.Nickname, txtMessage.Text);
                    txtMessage.Clear();
                    txtMessage.Focus();
                }
            }

1 comment:

  1. i got error yar not authrised
    please give me suggestion

    ReplyDelete

SqlDataBaseLibrary

using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using AOS.Repository.Infrastructure; using S...