We are moving to Discord!

Join us on the Countly Community Discord Server! Engage in discussions, share your feature ideas, and learn from fellow Countly users to build exceptional apps and experiences.

Does secondary calls Countly.init clears/deletes events which are present in the Countly queue(s)/store?

Scenario example:

1) Countly.init(config) // device offline, config does NOT contain custom header with access token required for server access (so Countly SDK will not be able to send data to server)
2) Countly.recordEvent ("test")

....
3) Countly.init(config) // device online, config contains custom header with access token required for server access (so Countly SDK should be able to send data to server)

Question: Will be event "test" successfully sent to the Countly server for mentioned scenario?

The background of this question is:

1) Custom network request headers can be specified for CountlyConfig object only (not on object Countly as it is mentioned in the SDK documentation for Android)

2) Application specific requires to update access token it run-time sometimes

So to apply access token application has to use method init more than one time

Countly.sharedInstance().init

Android SDK release: 22.06.2

0

Comments

2 comments
  • Official comment

    Hello,
    Calling init twice is not a supported scenario. You should be calling init only once. We do not support SDK reinitialization.

    Currently there is no way to update custom http headers after init.

    Comment actions Permalink
  • Hi Arturs!
    Thank you!

    0
    Comment actions Permalink

Please sign in to leave a comment.