I am trying to turn off the data collection in Xamarin Forms App as shown below
IDynatrace dynatrace = DependencyService.Get<IDynatrace>();
The above statements throws an InvalidCastException.
I came across a support documentation which mentions that this method can only be used, when the agent is started with the user optin feature by method
ConfigurationBuilder.withUserOptIn(boolean) or property
ConfigurationBuilder.PROP_USER_OPT_IN. I am unable to optin using the ConfigurationBuilder since it is not available. Looks like ConfigurationBuilder is not available in the Dynatrace.OneAgent.Xamarin package.
Any support to solve the issue is highly appreciated. TIA
Solved! Go to Solution.
I will take a look and get back to you.
I found the problem and I have already a fix for it. Can you give me a mail address so we can shortly test the fix before releasing it. Thanks.
Thanks for the quick fix.