我想實現在連接處理類顯示使用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