我已经创建了一个异步任务来显示进度对话框,同时搜索用户位置。我想运行此异步任务30秒,如果在这30秒内我没有找到用户位置,我只想终止任务并显示错误消息。到目前为止我的代码是这样的:userLocation=newAsyncTask(){privateProgressDialoglocationDialog=newProgressDialog(MainActivity.this);@OverrideprotectedvoidonPreExecute(){super.onPreExecute();locationDialog.setMessage(getResources().getStr