public class LogSession extends java.lang.Object implements ILogSession
Logger.newSession(Context, String, String) and is used to append new log entries to
the nRF Logger log.| Modifier and Type | Method and Description |
|---|---|
android.content.Context |
getContext()
Returns the application context.
|
android.net.Uri |
getSessionContentUri()
Returns the session read-only content Uri.
|
android.net.Uri |
getSessionEntriesUri()
Returns the session entries
Uri. |
android.net.Uri |
getSessionsUri()
Returns the
Uri that may by used to obtain all sessions created by the same
application (and the same profile) as this session. |
android.net.Uri |
getSessionUri()
Returns the session
Uri. |
java.lang.String |
toString() |
@NonNull public android.content.Context getContext()
ILogSessiongetContext in interface ILogSession@NonNull public android.net.Uri getSessionUri()
ILogSessionUri. The Uri may be saved in
Activity.onSaveInstanceState(android.os.Bundle) to recreate the session using
Logger.openSession(Context, Uri) when orientation change.
Use this Uri also to open the log session in the nRF Logger.
Intent intent = new Intent(Intent.ACTION_VIEW, mLogSession.getSessionUri()); startActivity(intent);
getSessionUri in interface ILogSession@NonNull public android.net.Uri getSessionEntriesUri()
ILogSessionUri. New log entries may be inserted using this Uri.getSessionEntriesUri in interface ILogSession@Nullable public android.net.Uri getSessionsUri()
Uri that may by used to obtain all sessions created by the same
application (and the same profile) as this session. It may be used to open the list of
log sessions in the nRF Logger application or to obtain list of sessions using
ContentProvider. Keep in mind that sessions with LogContract.SessionColumns.NUMBER
equal to 0 are "date sessions". Date sessions are created each time a new session is being
added by the application (and profile) in a new day. See Logger for more information.
Intent intent = new Intent(Intent.ACTION_VIEW, mLogSession.getSessionsUri()); startActivity(intent);
null if the session Uri is invalid or the owner app data does not exist in the
database.@NonNull public android.net.Uri getSessionContentUri()
ILogSession[Application name], [Creation date] [Session name] ([Session key]) D 10.34.01.124 This is the oldest log message (debug) V 10.34.02.238 This is the log message (verbose) I 10.34.03.527 This is the log message (info) A 10.34.04.612 This is the log message (application) W 10.34.04.812 This is the log message (warning) E 10.34.05.452 This is the newest log message (error)
getSessionContentUri in interface ILogSessionUri that can be read using
ContentResolver.query(Uri, String[], String, String[], String) method.
The value will be in the first row, column number 0
(with id: LogContract.Session.Content.CONTENT).@NonNull public java.lang.String toString()
toString in class java.lang.Object