Back to project page GeoCarDroid.
The source code is released under:
GNU General Public License
If you think the Android project GeoCarDroid 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 com.geocar.geocarconnect; // w w w .j a v a 2s. c o m import android.bluetooth.BluetoothDevice; import android.content.Context; import com.geocar.bluetooth.AlertType; import com.geocar.bluetooth.BthDeviceManager; import com.geocar.bluetooth.GeoSendDataThread; public class GeoCarAlert { private Context mAppContext; public GeoCarAlert(Context context){ mAppContext = context; } GeoSendDataThread mconn; public void onMessageReceived(String from, AlertType alert ){ BthDeviceManager manager = new BthDeviceManager(); BluetoothDevice device = manager.getGeoCar(); //BluetoothDevice device = getDevice(BTH_DEVICE_NAME); if( device != null ){ mconn = new GeoSendDataThread(device, BthDeviceManager.SPP_UUID, alert.getMsg() ); mconn.start(); } } }