-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBluetooth.java
More file actions
49 lines (32 loc) · 1.24 KB
/
Bluetooth.java
File metadata and controls
49 lines (32 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.example.mohamed.blue11;
import android.bluetooth.BluetoothAdapter;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.widget.Toast;
/**
* Created by Mohamed on 2015-02-15.
*/
public class Bluetooth extends ActionBarActivity {
private static final int REQUEST_CONNECT_DEVICE_SECURE = 1;
private static final int REQUEST_CONNECT_DEVICE_INSECURE = 2;
private static final int REQUEST_ENABLE_BT = 3;
private BluetoothAdapter mBluetoothAdapter = null;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.bluetooth_layout);
if(savedInstanceState == null){
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
BluetoothChatFragment fragment = new BluetoothChatFragment();
transaction.replace(R.id.sample_content_fragment,fragment);
transaction.commit();
// print();
}
}
}