com.zelfi.client
Class Advertiser

java.lang.Object
  extended bycom.zelfi.client.Advertiser

public class Advertiser
extends Object

This class can be used by game developers to integrate the Zelfi Ad component. In order to be able to use the Zelfi-Part, the functions of this class must be called.

Version:
4.0, 22/08/2007
Author:
Zelfi AG - kostenlose Handyspiele

Constructor Summary
Advertiser()
           
 
Method Summary
static void display(Displayable displayable, MIDlet midlet)
          Cancels the wait mode of the thread in the Zelfi Ad component.
static void display(Displayable displayable, MIDlet midlet, boolean wait, boolean internet)
          Extended display methode cancels the wait mode of the thread in the Zelfi Ad component.
static void display(MIDlet midlet)
          Cancels the wait mode of the thread in the Zelfi Ad component.
static void init(MIDlet midlet)
          Initializes the Zelfi Ad component.
static boolean showMenu(Displayable displayable, MIDlet midlet, boolean onlytest)
          Shows the menu of the Zelfi Ad component.
static void showWML(MIDlet midlet)
          Shows rms saved wap page at finishing the application.
static void shutdown(MIDlet midlet)
          Shows rms saved wap pages or if no wap pages are available additional advertising at finishing the application.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Advertiser

public Advertiser()
Method Detail

init

public static final void init(MIDlet midlet)
Initializes the Zelfi Ad component. Advertiser.init(ZelfiMIDlet midlet) must be called in the MIDlet class function startup ().

Parameters:
midlet - Object of the MIDlet-class
See Also:
MIDlet.startApp()

display

public static final void display(Displayable displayable,
                                 MIDlet midlet,
                                 boolean wait,
                                 boolean internet)
Extended display methode cancels the wait mode of the thread in the Zelfi Ad component. If the wait is past, advertising will be showed. The programmer can define the position of the call of the function himself. Only advertising will be showed if the time come for that, otherwise the call remains without effect.

Parameters:
displayable - the current canvas of the mobile application.
midlet - the object of the MIDlet-class.
wait - true - waits till the end of the Zelfi-thread. false - only starts Zelfi-thread wihout waiting. Important: never use "false" in keypressed, paint or commandAction.
internet - true - allows application to connect to the internet. false - can be used for debugging.

display

public static final void display(Displayable displayable,
                                 MIDlet midlet)
Cancels the wait mode of the thread in the Zelfi Ad component. If the wait is past, advertising will be showed. The programmer can define the position of the call of the function himself. Only advertising will be showed if the time come for that, otherwise the call remains without effect.

Parameters:
displayable - the current canvas of the mobile application.
midlet - the object of the MIDlet-class.

display

public static final void display(MIDlet midlet)
Cancels the wait mode of the thread in the Zelfi Ad component. If the wait is past, advertising will be showed. The programmer can define the position of the call of the function himself. Only advertising will be showed if the time come for that, otherwise the call remains without effect.

Parameters:
midlet - the object of the MIDlet-class.

showMenu

public static final boolean showMenu(Displayable displayable,
                                     MIDlet midlet,
                                     boolean onlytest)
Shows the menu of the Zelfi Ad component. You can insert this option in your game/application menu. You should test first if the menu is available.

Parameters:
displayable - the current canvas of the mobile application.
midlet - the object of the MIDlet-class.
onlytest - true - test if menu is available false - show menu if menu is available
Returns:
boolean true - menu is available false - menu is not available

showWML

public static final void showWML(MIDlet midlet)
                          throws MIDletStateChangeException
Shows rms saved wap page at finishing the application. Can be called in the destroyApp.

Parameters:
midlet - Object of the MIDlet-class
Throws:
MIDletStateChangeException
Since:
MIDP 2.0
See Also:
shutdown(MIDlet midlet)

shutdown

public static final void shutdown(MIDlet midlet)
                           throws MIDletStateChangeException
Shows rms saved wap pages or if no wap pages are available additional advertising at finishing the application. Can be called in the destroyApp.

Parameters:
midlet - Object of the MIDlet-class
Throws:
MIDletStateChangeException
Since:
MIDP 2.0
See Also:
showWML(MIDlet midlet)