Skip to content

Commit

Permalink
V1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
a1anwang committed Jul 17, 2018
1 parent 4f8f09d commit 0e53ff5
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions app/src/main/java/com/a1anwang/okble_demo/views/MyDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,7 @@ protected void onCreate(Bundle savedInstanceState) {
btn_right.setVisibility(View.GONE);
line_vertical.setVisibility(View.GONE);
}

}


this.setContentView(view);
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/layout_hexinput.xml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,6 @@
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/bg_hex_button"
android:text="返回"
android:text="@string/back"
android:textSize="18sp" />
</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/layout_service_data_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
android:layout_weight="1"
android:layout_height="40dp"
android:background="@drawable/bg_hex_button"
android:text="返回"
android:text="@string/back"
android:textSize="18sp" />
</LinearLayout>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/layout_service_uuid_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
android:layout_weight="1"
android:layout_height="40dp"
android:background="@drawable/bg_hex_button"
android:text="返回"
android:text="@string/back"
android:textSize="18sp" />
</LinearLayout>

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-zh/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@
<string name="yes">是</string>

<string name="no">否</string>

<string name="back">返回</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@
<string name="yes">Yes</string>

<string name="no">No</string>

<string name="back">Back</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public enum DeviceStatus{
*/
String getDeviceTAG();

BluetoothDevice getBluetoothDevice();

void addDeviceListener(OKBLEDeviceListener OKBLEDeviceListener);
void removeDeviceListener(OKBLEDeviceListener OKBLEDeviceListener);
void clearDeviceListener();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ public String getDeviceTAG() {
return deviceTAG;
}

@Override
public BluetoothDevice getBluetoothDevice() {
return this.bluetoothDevice;
}


public OKBLEDeviceImp(Context context) {
this.context = context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

public interface OKBLEDeviceListener {

public void onConnected(String deviceTAG);
void onConnected(String deviceTAG);

public void onDisconnected(String deviceTAG);
public void onReadBattery(String deviceTAG, int battery);
void onDisconnected(String deviceTAG);
void onReadBattery(String deviceTAG, int battery);

public void onReceivedValue(String deviceTAG,String uuid,byte[] value);
void onReceivedValue(String deviceTAG,String uuid,byte[] value);

public void onWriteValue(String deviceTAG,String uuid,byte[] value,boolean success);
void onWriteValue(String deviceTAG,String uuid,byte[] value,boolean success);

public void onReadValue(String deviceTAG,String uuid,byte[] value,boolean success);
void onReadValue(String deviceTAG,String uuid,byte[] value,boolean success);

public void onNotifyOrIndicateComplete(String deviceTAG,String uuid,boolean enable,boolean success);
void onNotifyOrIndicateComplete(String deviceTAG,String uuid,boolean enable,boolean success);
}

0 comments on commit 0e53ff5

Please sign in to comment.