Android Open Source - GeoCarDroid Geo Car Alert






From Project

Back to project page GeoCarDroid.

License

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.

Java Source Code

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();      
    }
  }
}




Java Source Code List

com.geocar.bluetooth.AlertType.java
com.geocar.bluetooth.BthDeviceManager.java
com.geocar.bluetooth.ConnectThread.java
com.geocar.bluetooth.ConnectedThread.java
com.geocar.bluetooth.ConnectionHandler.java
com.geocar.bluetooth.GeoSendDataThread.java
com.geocar.bluetooth.SocketHandler.java
com.geocar.geocarconnect.FileInfo.java
com.geocar.geocarconnect.FileManager.java
com.geocar.geocarconnect.GeoCarAlert.java
com.geocar.geocarconnect.MainActivity.java
com.geocar.geocarconnect.PrefActivity.java
com.geocar.geocarconnect.Settings.java
com.geocar.geocarconnect.StartMenu.java
com.geocar.sms.SmsListener.java