Performance Disable Performance Monitoring - tuarua/Firebase-ANE GitHub Wiki
The contents of this page are based on the original Firebase Documentation
To let you users opt-in or opt-out of using Firebase Performance Monitoring, you might want to configure your app so that you can enable and disable Performance Monitoring. You might also find this capability to be useful during app development and testing.
You can disable the Performance Monitoring SDK when building your app with the option to re-enable it at runtime, or build your app with Performance Monitoring enabled and then have the option to disable it at runtime using Firebase Remote Config. You can also completely deactivate Performance Monitoring, with no option to enable it at runtime.
One situation where disabling Performance Monitoring during your app build process could be useful is to avoid reporting performance data from a pre-release version of your app during app development and testing.
You can add one of two keys to the InfoAdditions for your app xml to disable or deactivate Performance Monitoring:
- To disable Performance Monitoring, but allow your app to enable it at runtime, set firebase_performance_collection_enabled to false in your app xml's Info.plist file.
- To completely deactivate Performance Monitoring with no option to enable it at runtime, set firebase_performance_collection_deactivated to true in your app xml's InfoAdditions. This setting overrides the firebase_performance_collection_enabled setting and must be removed from your app xml's InfoAdditions to re-enable Performance Monitoring.
You can also disable Performance Monitoring at build time, but allow your app to enable it at runtime, by adding a element to the element of your app's manifestAdditions, as follows:
<application>
...
<meta-data android:name="firebase_performance_collection_enabled" android:value="false" />
...
</application>
To completely deactivate Performance Monitoring with no option to enable it at runtime, add a element to the element of your app's manifestAdditions, as follows:
<application>
...
<meta-data android:name="firebase_performance_collection_deactivated" android:value="true" />
...
</application>
PerformanceANE.isDataCollectionEnabled = false;
PerformanceANE.isInstrumentationEnabled = false;