Back

ScanFile

Hello World

Forces android to scan an image file to appear in the phone's gallery.

app.ScanFile( file )

See also: CreateImage, CreateCameraView, ScreenShot.

Example - Add Image to Gallery

function OnStart()
{
    img = app.CreateImage( null, 1, 1 );
    img.SetPaintColor( "green" );
    img.DrawCircle( 0.5, 0.5, 0.3 );
    img.Save( app.GetAppPath() + "/circle.jpg" );

    app.ScanFile( "circle.jpg" );
    app.ChooseImage();
}
Copy All       Run      
string: path to file or folder ( “/absolute/...” or “relative/...” )