Using Log at blackberry

imports:

import net.rim.device.api.system.EventLogger;

Variable:

/**
* your package ex:com.nux.app.log
* select then right click then choose Convert string to long
* will be like this : 0x36c3d2a18dcfa4e3L this is your Log ID
*/
private static long ID = 0x36c3d2a18dcfa4e3L;
private static String even="";

register your app to use LOG

EventLogger.register(ID,"Name of your APP", EventLogger.VIEWER_STRING);

then log what you need:

even = "Use WIFI";EventLogger.logEvent( ID, even.getBytes() );

or use new line:

even = "Use BIS-B";
EventLogger.logEvent( ID, even.getBytes() );//add to log

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *