Question: I'm setting up a website using Google Sites.

If I add a hyperlink to a page and select 'Web Address', then enter `http://www.example.com` as the link, the actual page ends up being rendered with

```
http://www.google.com/url?q=http://www.example.com

```

as the hyperlink address. This injects an annoying 'redirecting you to www.example.com' Google page and a two-second delay into following hyperlinks off my page.

Is there any way to turn this behaviour off?

Answer: 
The gallery is using Android's media database to display the list of media. Deleting the file will not be reflected in the database until it scans the filesystem again. That is for example done after rebooting.

You can either delete the file directly through the database or force it to scan the file or folder you just deleted.

```
File fileToDelete =  new File("filepath");
boolean fileDeleted =  fileToDelete.delete();

// request scan    
Intent scanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
scanIntent.setData(Uri.fromFile(fileToDelete));
sendBroadcast(scanIntent);

```
I use the following code (which is also much like my code for creating a video which also tells the media system about file changes and correctly updates the Gallery):

```
private void deleteVideo(String videoUrl)
{
    File videoFile = new File(videoUrl);
    if (!videoFile.delete())
    {
        Log.e(TAG, "Failed to delete " + videoUrl);
    }
    else
    {
        MediaScannerConnection.scanFile(mContext,new String[] { videoUrl }, null, new MediaScannerConnection.OnScanCompletedListener() 
        {
            public void onScanCompleted(String path, Uri uri) 
            {
                Log.i("ExternalStorage", "Scanned " + path + ":");
                Log.i("ExternalStorage", "-> uri=" + uri);
            }
        });
    }
}

```