public void onClick(View v) {
   Intent intent = new Intent(mActivity, DetailActivity.class);
   intent.putExtra("ID", mId);
   mActivity.startActivity(intent);
   mActivity.mAppRecreate = true;
 }
Example #2
0
 public void doCall() {
   Intent callIntent = new Intent(Intent.ACTION_CALL);
   callIntent.setPackage("com.android.server.telecom");
   callIntent.setData(Uri.parse("tel:" + number));
   activity.startActivity(callIntent);
 }
Example #3
0
 public void makeDiscoverable() {
   System.out.println("make discoverable");
   Intent discoverableIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE);
   discoverableIntent.putExtra(BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION, 120);
   activity.startActivity(discoverableIntent);
 }