/** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setupWebView(); Button refreshButton = (Button) findViewById(R.id.Button01); refreshButton.setOnClickListener( new View.OnClickListener() { public void onClick(View v) { startWifiScan(); } }); communicator = TaginCommunicator.getInstance(); wifiScanner = WifiScanner.getInstance(getApplicationContext(), webPage); }
@Override public void onDestroy() { wifiScanner.stopWifiScanner(); communicator.stopCommunicatorServices(); super.onDestroy(); }