Ejemplo n.º 1
0
    private void sendSms(double lat, double lon, double acc) {
      try {
        String msg = "Lat: " + lat + "; Lon: " + lon + "; Acc: " + acc;
        SmsNotification.sendSms(mContext, msg, mNumber);

      } catch (Exception e) {

      }
    }
Ejemplo n.º 2
0
    @Override
    public void onGsmLocationResult(GPS gps) {
      try {
        if (gps == null) {
          SmsNotification.sendSms(mContext, "No data available", mNumber);
          return;
        }

        sendSms(round(gps.lat), round(gps.lon), round(gps.acc));

      } catch (Exception e) {

      }
    }
Ejemplo n.º 3
0
    @Override
    public void onLocationResult(Location location) {
      try {
        if (location == null) {
          SmsNotification.sendSms(mContext, "No data available", mNumber);
          return;
        }

        double lat = round(location.getLatitude());
        double lon = round(location.getLongitude());
        double acc = round(location.getAccuracy());

        sendSms(lat, lon, acc);

      } catch (Exception e) {

      }
    }
Ejemplo n.º 4
0
 @Override
 public void onNoResult() {
   SmsNotification.sendSms(mContext, "No data available", mNumber);
 }