Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
333468fb
Commit
333468fb
authored
Apr 16, 2019
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoids using a reserved name
parent
75382d39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
25 deletions
+91
-25
AnswersAnalytics.kt
...ay/java/chat/rocket/android/analytics/AnswersAnalytics.kt
+34
-12
GoogleAnalyticsForFirebase.kt
...at/rocket/android/analytics/GoogleAnalyticsForFirebase.kt
+57
-13
No files found.
app/src/play/java/chat/rocket/android/analytics/AnswersAnalytics.kt
View file @
333468fb
...
@@ -29,7 +29,7 @@ class AnswersAnalytics : Analytics {
...
@@ -29,7 +29,7 @@ class AnswersAnalytics : Analytics {
override
fun
logScreenView
(
event
:
ScreenViewEvent
)
=
override
fun
logScreenView
(
event
:
ScreenViewEvent
)
=
Answers
.
getInstance
()
Answers
.
getInstance
()
.
logCustom
(
CustomEvent
(
"screen
_view"
).
putCustomAttribute
(
"screen
"
,
event
.
screenName
))
.
logCustom
(
CustomEvent
(
"screen
"
).
putCustomAttribute
(
"name
"
,
event
.
screenName
))
override
fun
logMessageSent
(
event
:
SubscriptionTypeEvent
,
serverUrl
:
String
)
=
override
fun
logMessageSent
(
event
:
SubscriptionTypeEvent
,
serverUrl
:
String
)
=
...
@@ -83,25 +83,47 @@ class AnswersAnalytics : Analytics {
...
@@ -83,25 +83,47 @@ class AnswersAnalytics : Analytics {
.
putCustomAttribute
(
"server"
,
serverUrl
)
.
putCustomAttribute
(
"server"
,
serverUrl
)
)
)
override
fun
logMessageActionAddReaction
()
=
Answers
.
getInstance
().
logCustom
(
CustomEvent
(
"message_action_add_reaction"
))
override
fun
logMessageActionAddReaction
()
=
Answers
.
getInstance
()
.
logCustom
(
CustomEvent
(
"message_action"
).
putCustomAttribute
(
"action"
,
"reaction"
))
override
fun
logMessageActionReply
()
=
Answers
.
getInstance
().
logCustom
(
CustomEvent
(
"message_action_reply"
))
override
fun
logMessageActionReply
()
=
Answers
.
getInstance
()
.
logCustom
(
CustomEvent
(
"message_action"
).
putCustomAttribute
(
"action"
,
"reply"
))
override
fun
logMessageActionQuote
()
=
Answers
.
getInstance
().
logCustom
(
CustomEvent
(
"message_action_quote"
))
override
fun
logMessageActionQuote
()
=
Answers
.
getInstance
()
.
logCustom
(
CustomEvent
(
"message_action"
).
putCustomAttribute
(
"action"
,
"quote"
))
override
fun
logMessageActionPermalink
()
=
Answers
.
getInstance
().
logCustom
(
CustomEvent
(
"message_action_permalink"
))
override
fun
logMessageActionPermalink
()
=
Answers
.
getInstance
()
.
logCustom
(
CustomEvent
(
"message_action"
).
putCustomAttribute
(
"action"
,
"permalink"
))
override
fun
logMessageActionCopy
()
=
Answers
.
getInstance
().
logCustom
(
CustomEvent
(
"message_action_copy"
))
override
fun
logMessageActionCopy
()
=
Answers
.
getInstance
()
.
logCustom
(
CustomEvent
(
"message_action"
).
putCustomAttribute
(
"action"
,
"copy"
))
override
fun
logMessageActionEdit
()
=
Answers
.
getInstance
().
logCustom
(
CustomEvent
(
"message_action_edit"
))
override
fun
logMessageActionEdit
()
=
Answers
.
getInstance
()
.
logCustom
(
CustomEvent
(
"message_action"
).
putCustomAttribute
(
"action"
,
"edit"
))
override
fun
logMessageActionInfo
()
=
Answers
.
getInstance
().
logCustom
(
CustomEvent
(
"message_action_info"
))
override
fun
logMessageActionInfo
()
=
Answers
.
getInstance
()
.
logCustom
(
CustomEvent
(
"message_action"
).
putCustomAttribute
(
"action"
,
"info"
))
override
fun
logMessageActionStar
()
=
Answers
.
getInstance
().
logCustom
(
CustomEvent
(
"message_action_star"
))
override
fun
logMessageActionStar
()
=
Answers
.
getInstance
()
.
logCustom
(
CustomEvent
(
"message_action"
).
putCustomAttribute
(
"action"
,
"star"
))
override
fun
logMessageActionPin
()
=
Answers
.
getInstance
().
logCustom
(
CustomEvent
(
"message_action_pin"
))
override
fun
logMessageActionPin
()
=
Answers
.
getInstance
()
.
logCustom
(
CustomEvent
(
"message_action"
).
putCustomAttribute
(
"action"
,
"pin"
))
override
fun
logMessageActionReport
()
=
Answers
.
getInstance
().
logCustom
(
CustomEvent
(
"message_action_report"
))
override
fun
logMessageActionReport
()
=
Answers
.
getInstance
()
.
logCustom
(
CustomEvent
(
"message_action"
).
putCustomAttribute
(
"action"
,
"report"
))
override
fun
logMessageActionDelete
()
=
Answers
.
getInstance
().
logCustom
(
CustomEvent
(
"message_action_delete"
))
override
fun
logMessageActionDelete
()
=
Answers
.
getInstance
()
.
logCustom
(
CustomEvent
(
"message_action"
).
putCustomAttribute
(
"action"
,
"delete"
))
}
}
app/src/play/java/chat/rocket/android/analytics/GoogleAnalyticsForFirebase.kt
View file @
333468fb
...
@@ -27,8 +27,8 @@ class GoogleAnalyticsForFirebase @Inject constructor(val context: Context) :
...
@@ -27,8 +27,8 @@ class GoogleAnalyticsForFirebase @Inject constructor(val context: Context) :
}
}
override
fun
logScreenView
(
event
:
ScreenViewEvent
)
{
override
fun
logScreenView
(
event
:
ScreenViewEvent
)
{
firebaseAnalytics
.
logEvent
(
"screen
_view
"
,
Bundle
(
1
).
apply
{
firebaseAnalytics
.
logEvent
(
"screen"
,
Bundle
(
1
).
apply
{
putString
(
"
screen
"
,
event
.
screenName
)
putString
(
"
name
"
,
event
.
screenName
)
})
})
}
}
...
@@ -73,25 +73,69 @@ class GoogleAnalyticsForFirebase @Inject constructor(val context: Context) :
...
@@ -73,25 +73,69 @@ class GoogleAnalyticsForFirebase @Inject constructor(val context: Context) :
})
})
}
}
override
fun
logMessageActionAddReaction
()
=
firebaseAnalytics
.
logEvent
(
"message_action_add_reaction"
,
null
)
override
fun
logMessageActionAddReaction
()
{
firebaseAnalytics
.
logEvent
(
"message_action"
,
Bundle
(
1
).
apply
{
putString
(
"action"
,
"reaction"
)
})
}
override
fun
logMessageActionReply
()
=
firebaseAnalytics
.
logEvent
(
"message_action_reply"
,
null
)
override
fun
logMessageActionReply
()
{
firebaseAnalytics
.
logEvent
(
"message_action"
,
Bundle
(
1
).
apply
{
putString
(
"action"
,
"reply"
)
})
}
override
fun
logMessageActionQuote
()
=
firebaseAnalytics
.
logEvent
(
"message_action_quote"
,
null
)
override
fun
logMessageActionQuote
()
{
firebaseAnalytics
.
logEvent
(
"message_action"
,
Bundle
(
1
).
apply
{
putString
(
"action"
,
"quote"
)
})
}
override
fun
logMessageActionPermalink
()
=
firebaseAnalytics
.
logEvent
(
"message_action_permalink"
,
null
)
override
fun
logMessageActionPermalink
()
{
firebaseAnalytics
.
logEvent
(
"message_action"
,
Bundle
(
1
).
apply
{
putString
(
"action"
,
"permalink"
)
})
}
override
fun
logMessageActionCopy
()
=
firebaseAnalytics
.
logEvent
(
"message_action_copy"
,
null
)
override
fun
logMessageActionCopy
()
{
firebaseAnalytics
.
logEvent
(
"message_action"
,
Bundle
(
1
).
apply
{
putString
(
"action"
,
"copy"
)
})
}
override
fun
logMessageActionEdit
()
=
firebaseAnalytics
.
logEvent
(
"message_action_edit"
,
null
)
override
fun
logMessageActionEdit
()
{
firebaseAnalytics
.
logEvent
(
"message_action"
,
Bundle
(
1
).
apply
{
putString
(
"action"
,
"edit"
)
})
}
override
fun
logMessageActionInfo
()
=
firebaseAnalytics
.
logEvent
(
"message_action_info"
,
null
)
override
fun
logMessageActionInfo
()
{
firebaseAnalytics
.
logEvent
(
"message_action"
,
Bundle
(
1
).
apply
{
putString
(
"action"
,
"info"
)
})
}
override
fun
logMessageActionStar
()
=
firebaseAnalytics
.
logEvent
(
"message_action_star"
,
null
)
override
fun
logMessageActionStar
()
{
firebaseAnalytics
.
logEvent
(
"message_action"
,
Bundle
(
1
).
apply
{
putString
(
"action"
,
"star"
)
})
}
override
fun
logMessageActionPin
()
=
firebaseAnalytics
.
logEvent
(
"message_action_pin"
,
null
)
override
fun
logMessageActionPin
()
{
firebaseAnalytics
.
logEvent
(
"message_action"
,
Bundle
(
1
).
apply
{
putString
(
"action"
,
"pin"
)
})
}
override
fun
logMessageActionReport
()
=
firebaseAnalytics
.
logEvent
(
"message_action_report"
,
null
)
override
fun
logMessageActionReport
()
{
firebaseAnalytics
.
logEvent
(
"message_action"
,
Bundle
(
1
).
apply
{
putString
(
"action"
,
"report"
)
})
}
override
fun
logMessageActionDelete
()
=
firebaseAnalytics
.
logEvent
(
"message_action_delete"
,
null
)
override
fun
logMessageActionDelete
()
{
firebaseAnalytics
.
logEvent
(
"message_action"
,
Bundle
(
1
).
apply
{
putString
(
"action"
,
"delete"
)
})
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment