Back to project page BtDemo.
The source code is released under:
Apache License
If you think the Android project BtDemo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package cn.edu.hust.cm.bt.demo; //from www .j a va2 s. co m import cn.edu.hust.cm.bt.demo.client.ClientMainActivity; import cn.edu.hust.cm.bt.demo.server.ServerMainActivity; import android.app.Activity; import android.os.Bundle; import android.view.Menu; import android.view.View; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } public void onClick(View view) { int id = view.getId(); switch (id) { case R.id.btn_client: startBtClient(view); break; case R.id.btn_server: startBtServer(view); break; default: break; } } private void startBtClient(View view) { ClientMainActivity.startMe(this); } private void startBtServer(View view) { ServerMainActivity.startMe(this); } }