This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package oil.newtpms; | |
import android.bluetooth.BluetoothDevice; | |
import android.bluetooth.BluetoothGatt; | |
import android.bluetooth.BluetoothGattCallback; | |
import android.bluetooth.BluetoothGattCharacteristic; | |
import android.bluetooth.BluetoothGattDescriptor; | |
import android.bluetooth.BluetoothGattService; | |
import android.content.Context; | |
import android.os.Handler; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int Calculate_CRC16(byte[] buff, int len) | |
{ | |
int u16CRC; | |
u16CRC = 0xFFFF; | |
for(int i=0; i<len; i++) | |
{ | |
u16CRC = ((u16CRC>>8) | (u16CRC<<8))&0xFFFF; | |
u16CRC ^= (buff[i]&0xFF); | |
u16CRC ^= ((u16CRC&0xFF)>>4); | |
u16CRC ^= (u16CRC<<12)&0xFFFF; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte[] cmdbuf = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; int SendCRC; | |
cmdbuf[0] = (byte)0xFF; | |
cmdbuf[1] = (byte)0xB1; | |
cmdbuf[2] = (byte)0x00; | |
cmdbuf[3] = (byte)0x00; | |
SendCRC = Calculate_CRC16(cmdbuf, 4); cmdbuf[4] = (byte)(SendCRC>>8); | |
cmdbuf[5] = (byte)(SendCRC&0xFF); commandChar.setValue(cmdbuf); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class utility { | |
private contentToFragment content; | |
public void parseData(String data,final Activity act) | |
{ | |
String[] parsedData=new String[5]; | |
if (data.length() > 15) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class carFragment extends Fragment implements contentToFragment{ | |
..... | |
..... | |
..... | |
.... | |
uti.setcalloutListener(new contentToFragment() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class carFragment extends Fragment{ | |
..... | |
..... | |
..... | |
.... | |
uti.setcalloutListener(new contentToFragment() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tw.com.acme_soft.mibandscanner; | |
import android.app.Activity; | |
import android.bluetooth.BluetoothDevice; | |
import android.util.Log; | |
import android.widget.Toast; | |
import com.zhaoxiaodan.miband.ActionCallback; | |
import com.zhaoxiaodan.miband.MiBand; | |
import com.zhaoxiaodan.miband.listeners.NotifyListener; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package tw.com.acme_soft.mibandscanner.frafment; | |
import android.bluetooth.BluetoothDevice; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.os.HandlerThread; | |
import android.support.annotation.Nullable; | |
import android.support.v4.app.Fragment; | |
import android.util.Log; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
String Url = "http://192.168.38.136:80/WS_HG/HgXmlRequestHandler"; | |
paybackModel=paybackImpl.paybackData(Url, ARPT, sessionID, luType, applicationId, ID_NO, COUNT, LAST_KEY, ASSET_TYPE); | |
} catch (Exception e) { | |
// TODO Auto-generated catch block | |
e.printStackTrace(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fundModel=fundImpl.fundationData(Url, ARPT,sessionID, luType, applicationId | |
, PROD_SEQ, PROD_ITEM, INQR_CLOSE_SW, COUNT, ASSET_TYPE, LAST_KEY, DATA_TYPE | |
, PLAN_SEQ, INQR_BORDER_SW, PROD_CORP, ID_NO, INQR_TYPE); |
OlderNewer