Code example for Location

Methods: getLatitudegetLongitude

        return uri;
    // newImage() and updateImage() together do the same work as 
    // addImage. newImage() is the first step, and it inserts the DATE_TAKEN and 
    // DATA fields into the database. 
    // We also insert hint values for the WIDTH and HEIGHT fields to give 
    // correct aspect ratio before the real values are updated in updateImage(). 
    public static Uri newImage(ContentResolver resolver, String title,
            long date, int width, int height) {
        String path = generateFilepath(title);
        // Insert into MediaStore. 
        ContentValues values = new ContentValues(4);
        values.put(ImageColumns.DATE_TAKEN, date);
        values.put(ImageColumns.DATA, path);
        setImageSize(values, width, height);
Stop searching for code, let great code find you!  Add Codota to your java IDE