java.lang.Object | |
↳ | com.google.firebase.appindexing.FirebaseUserActions |
Provides methods for logging actions that the user takes in the app.
This is a simple example for logging that the user has started to view an article:
FirebaseUserActions.getInstance().start(
Actions.newView(
"Index your app with Google App Indexing",
"http://example.net/articles/02101984.html"));
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | APP_INDEXING_API_TAG | The tag used for logging debug information for calls to FirebaseUserActions class. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Logs that the user has stopped doing something in the app.
| |||||||||||
Returns an instance of
FirebaseUserActions . | |||||||||||
Logs that the user has started doing something in the app.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
The tag used for logging debug information for calls to FirebaseUserActions
class.
To enable logging:
adb shell setprop log.tag.FirebaseUserActions DEBUG
Logs that the user has stopped doing something in the app.
Use this method for a user action of some duration that has come to an end, like when the
user has finished viewing an article or stopped listening to a song, as well as for
instantanious actions the user has taken, such as sending a message or adding a song to a
playlist. For these instantanious actions, don't call start(Action)
at all, but just end(Action)
.
Parameters | |
---|---|
action |
Action :
The Action describing either the instantanious action the user has just
taken, or the more long-lived activity the user has stopped doing in the app; for the
latter start(Action) should be called before calling end(Action) . |
Returns | |
---|---|
Task<Void> |
A Task indicating the result of the operation.
|
Returns an instance of FirebaseUserActions
.
The default FirebaseApp
instance must have been initialized before this function is
called.
Returns | |
---|---|
FirebaseUserActions |
Logs that the user has started doing something in the app.
Use this method for a user action of some duration, like viewing an article or listening
to a song. If the action is instantanious, such as sending a message or adding a song to a
playlist, then make a single call to end(Action)
instead.
Parameters | |
---|---|
action |
Action :
The Action describing what the user has started doing in the app. |
Returns | |
---|---|
Task<Void> |
A Task indicating the result of the operation.
|