Communicating with Insights
Let us know how you feel about this
There are certain times when data logging or collection may need to be disabled. For example, when battery power is low, or during a period of high intensity processing.
Based on the needs of your application, you can enable or disable the collection of certain types of data by Xamarin Insights, such as unhandled exceptions. For example:
Insights.DisableCollection– Setting this property to
truewill stop Insights from collecting information entirely, including crash reports.
Insights.DisableDataTransmission– Setting this property to
truewill disable the network features of Insights. Insights will still continue to collect data data but it will not transmit it to the server. You might want to do this during times of high CPU usage or low device power.
Insights.DisableExceptionCatching– Setting this property to
truewill stop Insights from trapping any unhandled exceptions.
Insights.DisableCollectionTypes– Set this one of the following values to disable the collecting of specific information:
Insights.CollectionTypes.HardwareInfo– Stops Insights from tracking information about the hardware device that the application is running on.
Insights.CollectionTypes.Locale– Stops Insights from tracking information about the locale of the device that the application is running on
Insights.CollectionTypes.OSInfo– Stops Insights from tracking information about the device OS that the application is running on.
Insights.CollectionTypes.Jailbroken– Stops Insights from tracking information from jailbroken devices.
Insights.CollectionTypes.NetworkInfo– Stops Insights from tracking information about the network that the application is communicating over.
DisableCollectionTypes types can be combined using a binary or pipe and set all at once. For example, the code snippet below will stop Insights from tracking the device OS and Network information:
Insights.DisableCollectionTypes = Insights.CollectionTypes.OSInfo | Insights.CollectionTypes.NetworkInfo;