- Points
- 822
- Digest
- 0
- R.P.
- 50
- Joined
- 2011-6-13
- Last visit
- 2012-11-23
- Posts
- 277

|
Is it to show message in the notification bar?
There is the api:
ppy_notification(title, content, flag, icon,callback, param)
This is for using Android notification (shown on the top of the screen) when Players switch the game to background. You need to register a “inbackground” callback
export(“inbackground”, func);
function func(){
// do something
}
Parameter:
title: a String
content: a String
flag: one of NOTIFICATION_ALL , NOTIFICATION_SOUND, NOTIFICATION_VIBRATE,
NOTIFICATION_LIGHTS. It sets the notifying method
icon: in Integer, 0 shows a check icon; 1 shows an exclamation icon; 2 shows error icon.
callback: a function name, will be called when the notification is clicked (notifications are shown in the notification bar on the top of the screen)
the function must be defined as
function callback(id, param)
id is the return value of ppy_notification()
param: will be passed into callback
Return:
An integer, an ID of this notification. You may use it in the callback
|
|