@appzung/react-native-code-push
Version:
React Native plugin for the CodePush service
28 lines (26 loc) • 1.04 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getTelemetryEnabled = getTelemetryEnabled;
exports.setTelemetryEnabled = setTelemetryEnabled;
var _NativeRNAppZungCodePushModule = require("./internals/NativeRNAppZungCodePushModule.js");
var _getConfiguration = require("./internals/getConfiguration.js");
/**
* Controls telemetry reporting.
*
* @param enabled - When false, updates on this device will stop appearing as failed, pending or succeeded in analytics.
*/
async function setTelemetryEnabled(enabled) {
await _NativeRNAppZungCodePushModule.NativeRNAppZungCodePushModule.setTelemetryEnabled(enabled);
await (0, _getConfiguration.reloadCachedConfiguration)();
}
/**
* Gets the current telemetry enabled status.
*
* When setTelemetryEnabled has never been enabled, returns the default value set in your configuration.
*/
function getTelemetryEnabled() {
return _NativeRNAppZungCodePushModule.NativeRNAppZungCodePushModule.getTelemetryEnabled();
}
//# sourceMappingURL=telemetry.js.map
;