我想实现在连接处理类显示使用Android的敬酒
public class server implements Runnable {
private static final String TAG = "myLogs";
.....
public void run()
{
.....
while (true) {
try {
client = server.accept();
// here i want to show message, when client is connected
Toast.makeText(getApplicationContext(), "msg msg", Toast.LENGTH_SHORT).show();
Log.d(TAG, "client connected....");
烤面包,但我对makeText和getApplicationContext()得到错误信息; 他们强调..
从您的通话活动传递通过构造背景和使用,而不是getApplicationContext – 2013-04-26 13:10:13