Code example for Location

Methods: getAccuracygetAltitudegetBearinggetLatitudegetLongitudegetSpeed

0
    } 
 
    public boolean add(Location point, long timeMillis) {
        ContentValues values = new ContentValues();
 
        values.put(DATABASE_COLUMN.LATITUDE, point.getLatitude());
        values.put(DATABASE_COLUMN.LONGITUDE, point.getLongitude());
        values.put(DATABASE_COLUMN.SPEED, point.getSpeed());
        values.put(DATABASE_COLUMN.BEARING, point.getBearing());
        values.put(DATABASE_COLUMN.ALTITUDE, point.getAltitude());
        values.put(DATABASE_COLUMN.ACCURACY, point.getAccuracy());
        values.put(DATABASE_COLUMN.TIME, timeMillis);
 
        try { 
            return database.insert(TABLE_NAME, null, values) > 0 ? true : false;
        } catch (SQLException e) {
            Helper.Logger.e(e.getMessage());
        } 
 
        return false; 
Contextual code suggestions in your IDE  Get Codota for Java