Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Feature/updated autocollection #51

Merged
12 commits merged into from
Jun 12, 2015
Merged

Feature/updated autocollection #51

12 commits merged into from
Jun 12, 2015

Conversation

ElektrojungeAtWork
Copy link
Contributor

Hi,
I refactored the Lifecycletracking quite a bit.
a) Syncing when going into the background is now implemented in a separate class
b) AutoCollection is now the class for all auto-collection. Everything auto-collected can be disabled/enabled via methods on ApplicationInsights class

PS: Unit Tests are missing, will be added tomorrow, will add tomorrow.

@@ -311,19 +319,19 @@ public static void disableAutoPageViewTracking() {
* {@link com.microsoft.applicationinsights.library.ApplicationInsights#start()}.
*/
public static void enableAutoSessionManagement() {
if (!isRunning) {
InternalLogging.warn(TAG, "Could not set session management, because " +
if (!Util.isLifecycleTrackingAvailable()) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are using the same message multiple times in this class. Maybe it would be a good idea to put them elsewhere and reuse it.

Benjamin Reimold added 2 commits June 12, 2015 10:52
…tocollection

# Conflicts:
#	applicationinsights-android/src/main/java/com/microsoft/applicationinsights/library/ApplicationInsights.java
@ElektrojungeAtWork
Copy link
Contributor Author

@chrwend also changed the way we set the background-time. We now do it using the ComponentCallbacks2-onTrim() as it only gets called when the app is sent to background. This is pretty similar to the ApplicationDelegate-Callbacks in iOS. Unfortunately there's no "become visible"-callback for ComponentCallbacks2, so we still need the old way to detect the foregrounding.

ghost pushed a commit that referenced this pull request Jun 12, 2015
@ghost ghost merged commit 1fae9e0 into develop Jun 12, 2015
@ghost ghost deleted the feature/updated-autocollection branch June 12, 2015 19:43
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants