BlackBerry 日志 log

How to show event log screen?

 

1. Press the BlackBerry button --> Options --> Screen/Keyboard
   a. Change Right Side Convenience Key Opens to Virtual Keyboard
   b. Press Escape key --> click on "Save" --> go back to homescreen

2. On the homescreen, press the right side convenience key(Simulating convenience keys), and the keyboard pops up. 


3. Pressing and holding the !?123 key until a lock appears on it, then pressing the " and / keys alternately, then the event log appears.

4. Press the BlackBerry button --> Options --> Click any item will pop up a menu

--> select Hide all types --> click your application and select toggle  Filter, the event log screen will only show your application's log information.

 

How to code event log?

 

    example: Logger.java (Logger.zip)

 

public static final boolean register(long guid,  String name,  int viewerType)
Registers the calling application's name and GUID, with a particular viewer type.

You must invoke this method before the logger can log events with the given GUID.

If a name/GUID has already been registered with a particular viewer type, calling this method with a new viewer type replaces the previous one.

Parameters:
guid - GUID of the registering application.
name - Name of the registering application.
viewerType - Type of viewer to be used when displaying the event (one of VIEWER_NUMBER, VIEWER_STRING, VIEWER_EXCEPTION).
Returns:
True if the registration was successful. False if another name has already been registered with the specified guid.

 

你可能感兴趣的:(UP,Go,BlackBerry)