toast.* — Toast


Type Library


Overview

The Toast plugin shows non-intrusive in-app notification messages for iOS and Android. A must have for any Corona application.

Toasts are not a part of Corona’s OpenGL hierarchy, therefore they don’t affect your Corona objects in any way. They just display a message and silently disappear.

Supported platforms: iOS 7+ and Android 2.3.3+.

Screenshots

Android
Android

iOS
iOS

Syntax

local toast = require('plugin.toast')

Functions

toast.show()

Project Settings

First, get the plugin on the Corona Marketplace page.

Add an entry into the plugins table of build.settings. When added, the build server will integrate the plugin during the build phase.

	settings = {
		plugins = {
			['plugin.toast'] = {publisherId = 'com.spiralcodestudio'}
		}
	}

Example

toast.show('Non-intrusive notification message!')
-- OR --
toast.show('Toast is done!', {duration = 'long', gravity = 'TopCenter', offset = {0, 128}})

Sample Project

A sample project can be found here.

https://github.com/Lerg/plugins-sample-toast