Our SFMCSdk is initialized when the user is logged in and we clear the parameters and disable push when logging out.
On iOS there seems to be sfmc_tearDown
to release the current instance, which lets you change the configuration.
How do we do the same thing on Android? I could not find any tear down method and when I call SFMCSdk.configure()
again the app just crashes:
(pool-33-thread-1) > ☠☠☠ FATAL ☠☠☠ Message: Task com.salesforce.marketingcloud.events.c$a@540bc21 rejected from java.util.concurrent.ThreadPoolExecutor@8685846[Shutting down, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 5] Stacktrace: java.util.concurrent.RejectedExecutionException: Task com.salesforce.marketingcloud.events.c$a@540bc21 rejected from java.util.concurrent.ThreadPoolExecutor@8685846[Shutting down, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 5] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2086) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:848) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1394) at java.util.concurrent.Executors$DelegatedExecutorService.execute(Executors.java:630) at com.salesforce.marketingcloud.events.c.a(Unknown Source:25) at com.salesforce.marketingcloud.events.c$d.a(Unknown Source:24) at com.salesforce.marketingcloud.internal.g.run(Unknown Source:17) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923)