02 September 2015
Corona Store: Toast Notifications and Lua Utilities
We have a few exciting new plugins available on the Corona Store: Spiral Code Studio returns to bring us Toast-style notifications, and Xibalba Studios brings two new utilities, written in Lua.
Please visit the store to activate plugins, or to submit a plugin yourself.
1. Toast Notifications
Toasts are messages displayed to the user for a brief time. You can now use them on Android and iOS, thanks to this plugin.
Using it is quite simple:
1 2 |
local toast = require('plugin.toast') toast.show('Non-intrusive notification message!') |
Check it out on the Corona Store.
2. MWC Random Number Generator
This is a simple, lightweight random number generator, adapted to Lua from some code by the late George Marsaglia (who maintained the famed Diehard test suite, for assessing various random number generators properties).
Check it out on the Corona Store.
3. Stable Array
This is a data structure much like a stock Lua array, except that removing objects doesn’t entail moving other objects, neither by shifting them down nor backfilling the liberated slot. Doing this naively in Lua would lead to holes, of course, such that the # operator becomes unreliable, to say nothing of ipairs() no longer iterating all elements, in general.
Check it out on the Corona Store.
Steven Johnson (Star Crunch)
Posted at 17:28h, 02 SeptemberMy apologies if anybody has issues with #3 (I seem to be, anyhow). I’ll see if I can puzzle it out tonight. Still learning the process a bit.
I’ll flesh out the docs with some examples (for 2 and 3) as well.
Steven Johnson (Star Crunch)
Posted at 13:22h, 03 SeptemberOkay, #3 seems to be good now. A boring little detail was out of order. 🙂 Examples and install instructions have been added to the docs.
Adi
Posted at 00:05h, 04 SeptemberToast Notifications seems interesting but from the doc content it seems it is pure client. there is no method to control from a server. was that the intention?
Lerg
Posted at 04:15h, 05 SeptemberToast notifications are merely a text display overlay. If you want, you can combine them with push notifications. E.g., when a push is received show a toast notifications like “update is available” or “somebody sent you a message”.
Simon Fearby
Posted at 20:24h, 19 SeptemberAdi
Try OneSignal for server controlled push notifications
http://fearby.com/how-to-setup-a-new-sandbox-corona-ios-app-with-push-notifications-with-onesignal/
Thanks Lerg
Joshua
Posted at 02:20h, 25 MarchAwesome! But it does not work in the simulator, you have to download the app on your device first, no problem for me though.