Consider my code:
public static Socket sock=new Socket();
public static Socket recvsock;
public static SocketInfo ipinfo;
public static void setSocket(Socket socket)
{
sock=socket;
Log.d(handsOn.Tag, ""+sock.getInetAddress());
}
public static Socket getSocket()
{
Log.d(handsOn.Tag, "sock"+sock.getInetAddress());
return sock;
}
I m trying to make get n set function to a static variable... I m able to set .. but not get it getting a null value ... ??