Beispiel #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) {

      }
    }
Beispiel #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) {

      }
    }
Beispiel #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) {

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