@Override protected void onDestroy() { super.onDestroy(); BaiduService.getInstance().StopLocation(); baiduLBSListener = null; handler = null; }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_publish); initUI(); BaiduService.getInstance().StartLocation(baiduLBSListener); handler = new MyHandler(PublishActivity.this); }
@Override public void onClick(View v) { switch (v.getId()) { case R.id.et_text: break; case R.id.iv_img: pickImgClick(); break; case R.id.tv_location: if (bIsLocateFailed) { bIsLocateFailed = false; BaiduService.getInstance().StartLocation(baiduLBSListener); } break; case R.id.layout_background: hiddenKeyBoard(v); break; } }