Skip to content

hansemannn/titanium-firebase-performance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

49 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Firebase Performance - Titanium Module

Use the native Firebase SDK in Axway Titanium. This repository is part of the Titanium Firebase project.

Supporting this effort

The whole Firebase support in Titanium is developed and maintained by the community (@hansemannn and @m1ga). To keep this project maintained and be able to use the latest Firebase SDK's, please see the "Sponsor" button of this repository, thank you!

Requirements

  • The Firebase Core module (iOS only)
  • iOS: Titanium SDK 6.3.0+
  • Android: Titanium SDK 7.0.0+

Download

API's

FirebasePerformance

Methods

startTrace(name)
  • name (String)
incrementCounter(message, counter, increment)
  • name (String)
  • counter (String)
  • increment (Number, optional)
stopTrace(name)
  • name (String)

Properties

dataCollectionEnabled (Boolean, get/set, iOS-only)

allTraces ([String], iOS-only)

Example

// Require the Firebase Performance module
var FirebasePerformance = require('firebase.performance');

// Start the named trace
FirebasePerformance.startTrace('trace_name');

// Increment the counter value
FirebasePerformance.incrementCounter('trace_name', 'counter_name', 1); // Trace name, counter name, increment (optional)

// Stop the named trace
FirebasePerformance.stopTrace('trace_name');

/// -- iOS-only, remove for Android for now --

// Manually disable data collection (enabled by default)
FirebasePerformance.dataCollectionEnabled = false;

// Returns all trace-names
Ti.API.log(FirebasePerformance.allTraces);

Build

iOS

cd ios
appc ti build -p ios --build-only

Android

cd android
appc ti build -p android --build-only

Legal

This module is Copyright (c) 2017-present by Hans Knรถchel. All Rights Reserved. Usage of this module is subject to the Terms of Service agreement with Appcelerator, Inc.