Giter Site home page Giter Site logo

hansemannn / titanium-firebase-analytics Goto Github PK

View Code? Open in Web Editor NEW
35.0 7.0 18.0 117.16 MB

Use the Firebase Analytics SDK in Axway Titanium 🚀

License: Other

JavaScript 0.03% Objective-C 79.75% C 16.02% Java 0.24% Shell 0.05% C++ 3.92%
firebase firebase-analytics titanium appcelerator axway native javascript

titanium-firebase-analytics's Introduction

Firebase Analytics - Titanium Module

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

⚠️ This module complies to the EU General Data Protection Regulation (GDPR) regulation already. Use the enabled property to enable or disable Analytics and resetAnalyticsData() to make Cambridge Analytica angry 😙.

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.2.0+
  • Android: Titanium SDK 7.0.0+

Installation

In general, make sure to follow the general instructions described in the main project.

iOS

No additional setup required for Firebase Analytics on iOS.

Android

There are a few additional requirements for Firebase Analytics on Android:

  1. Copy the following code under the <application> tag of your tiapp.xml. Please note to replace all occurrences of MY_PACKAGE_NAME with your actual package name (= <id> in your tiapp.xml):
<android xmlns:android="http://schemas.android.com/apk/res/android">
	<manifest>
		<application>
			<service android:name="com.google.android.gms.measurement.AppMeasurementService" android:enabled="true" android:exported="false" />

			<service android:name="com.google.android.gms.measurement.AppMeasurementJobService" android:permission="android.permission.BIND_JOB_SERVICE" android:enabled="true" android:exported="false" />

			<service android:name="MY_PACKAGE_NAME.gcm.RegistrationIntentService" android:exported="false" />

			<receiver android:name="com.google.android.gms.measurement.AppMeasurementReceiver" android:enabled="true">
			   <intent-filter>
				  <action android:name="com.google.android.gms.measurement.UPLOAD" />
			   </intent-filter>
			</receiver>

			<!-- Only add the GCM-related tags if you are using push notifications as well -->
			<service android:name="MY_PACKAGE_NAME.gcm.GcmIntentService" android:exported="false">
			   <intent-filter>
				  <action android:name="com.google.android.c2dm.intent.RECEIVE" />
				  <action android:name="com.google.android.c2dm.intent.SEND" />
			   </intent-filter>
			</service>

			<service android:name="MY_PACKAGE_NAME.gcm.GcmIDListenerService" android:exported="false">
			   <intent-filter>
				  <action android:name="com.google.android.gms.iid.InstanceID" />
			   </intent-filter>
			</service>
		</application>
	</manifest>
</android>
  1. Create a file strings.xml that is located at:

    • Alloy: <project-dir>/app/platform/android/res/values/strings.xml
    • Classic: <project-dir>/platform/android/res/values/strings.xml

    with your Firebase Application ID (mobilesdk_app_id from the JSON file) content:

<?xml version="1.0" encoding="UTF-8"?>
<resources>
	<string name="google_app_id">YOUR_FIREBASE_APPLICATION_ID</string>
</resources>

Disable AD_ID

If you get a warning about AD_ID usage you can try the following tiapp.xml lines to remove it:

<manifest>
	<application >
		<meta-data android:name="google_analytics_adid_collection_enabled" android:value="false" />
		<meta-data android:name="google_analytics_default_allow_ad_personalization_signals" android:value="false" />
	</application>
	<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />
</manifest>

It might impact you analytics data so only use it if you are sure you don't need it. Check Google Support: Advertising ID for more information.

Download

API's

FirebaseAnalytics

Methods

log(name, parameters)
  • name (String)
  • parameters (Dictionary, optional)

Logs an app event. The event can have up to 25 parameters. Events with the same name must have the same parameters. Up to 500 event names are supported.

Make sure to check the Log Events docs to validate that you are using a valid event name (1st parameter) and parameter structure (2nd event).

saveUserProperty(parameters)
  • parameters (Dictionary)
    • value (String)
    • name (String)

Sets a user property to a given value. Up to 25 user property names are supported. Once set, user property values persist throughout the app lifecycle and across sessions.

setScreenNameAndScreenClass(parameters)
  • parameters (Dictionary)
    • screenName (String)
    • screenClass (String, defaults to TiController)

Sets the current screen name, which specifies the current visual context in your app. This helps identify the areas in your app where users spend their time and how they interact with your app.

resetAnalyticsData() (iOS-only, on Android requires /lib version > 11.6.0)

Clears all analytics data for this app from the device and resets the app instance id.

fetchAppInstanceID(callback)

Fetches the app instance ID.

Properties

enabled (Boolean, set)

Sets whether analytics collection is enabled for this app on this device. This setting is persisted across app sessions. By default it is enabled.

userID (String, set)

The user ID to ascribe to the user of this app on this device, which must be non-empty and no more than 256 characters long. Setting userID to null removes the user ID.

Example

// Require the Firebase Core module (own project!)
if (OS_IOS) {
  var FirebaseCore = require('firebase.core');
  FirebaseCore.configure();
}

// Require the Firebase Analytics module
var FirebaseAnalytics = require('firebase.analytics');

// Get the App Instance ID
Ti.API.info('App Instance ID: ' + FirebaseAnalytics.appInstanceID);

// Log to the Firebase console
FirebaseAnalytics.log('My_Event', { /* Optional arguments */ });

// Set user-property string
FirebaseAnalytics.setUserPropertyString({
  name: 'My_Name',
  value: 'My Value'
});

// Set User-ID
FirebaseAnalytics.userID = 'MyUserID';

// Set screen-name  and screen-class
FirebaseAnalytics.setScreenNameAndScreenClass({
  screenName: 'ScreenName',
  screenClass: 'ScreenClass'
});

// Toogle analytics on/off (default: on / true)
FirebaseAnalytics.enabled = false;

Update SDK's

  • Android: Using Gradle command gradle getDeps
  • iOS: Downloading the latest framework

Build

cd ios
appc run -p [ios|android] --build-only

Legal

This module is Copyright (c) 2017-Present by Hans Knöchel. All Rights Reserved.

titanium-firebase-analytics's People

Contributors

astrovic avatar fahad86 avatar hansemannn avatar jei avatar jordanbisato avatar m1ga avatar pebosi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

titanium-firebase-analytics's Issues

Firebase core and analytics module is not working in android build

Hi,

I have installed both firebase core and firebase analytics module in my app. IOS app is working fine but android build is giving following error.

[ERROR] : Failed to run dexer:
[ERROR] :
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/firebase/analytics/FirebaseAnalytics;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/firebase/analytics/FirebaseAnalytics$Event;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/firebase/analytics/FirebaseAnalytics$Param;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/firebase/analytics/FirebaseAnalytics$UserProperty;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/measurement/AppMeasurement;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/measurement/AppMeasurement$ConditionalUserProperty;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/measurement/AppMeasurement$Event;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/measurement/AppMeasurement$EventInterceptor;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/measurement/AppMeasurement$OnEventListener;
[ERROR] :
[ERROR] : UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] : java.lang.RuntimeException: Translation has been interrupted
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:614)
[ERROR] : at com.android.dx.command.dexer.Main.runMultiDex(Main.java:365)
[ERROR] : at com.android.dx.command.dexer.Main.runDx(Main.java:286)
[ERROR] : at com.android.dx.command.dexer.Main.main(Main.java:244)
[ERROR] : at com.android.dx.command.Main.main(Main.java:95)
[ERROR] : Caused by: java.lang.InterruptedException: Too many errors
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:606)
[ERROR] : ... 4 more
[ERROR] Application Installer abnormal process termination. Process exit value was 1

App is using following versions
Titanium sdk: 8.3.1.GA
Firebase core: 3.0.0
Firebase analytics: 2.1.2
ti.playservices : 16.1.3
ti,cloudpush: 5.1.2
ti.admob: 4.3.0
ti.map: 3.1.1

Custom Event Log

I added a custom event log on my app but it seems that it logs as error on firebase event. Please guide us what's the correct way to add custom event. Thanks

Module platform: iOS
Module version:  1.1.0
Ti SDK version:  7.0.2.GA

Here's my sample code:

Alloy.Globals.FirebaseAnalytics = require('firebase.analytics');
Alloy.Globals.FirebaseAnalytics.configure();

Alloy.Globals.FirebaseAnalytics.log('click', {category: 'Main', action: 'Main-feed'});

Can't build using 1.4.0 version of module

I am using Appc SDK 7.5.0. With Firebase core 2.0.0 and an older version of this module, everything works fine. ( As you can see I am using the newest firebase core ).

• When I try to build to a device I get an error about "DTDeviceKit: deviceType from 00008006-000668380CE2002E was NULL"

• When I try to build to a simulator I get errors about "Undefined symbols for architecture x86_64"

Error log for build against simulator:

[TRACE] Undefined symbols for architecture x86_64:
[TRACE] "OBJC_CLASS$_APMAnalytics", referenced from:
[TRACE] objc-class-ref in FirebaseAnalytics(FIRAnalytics_ca9cdf99cfbae2f51d040b73dd242e94.o)
[TRACE] "_kAPMMonitorLogTagOptionKey", referenced from:
[TRACE] +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics(FIRAnalytics_ca9cdf99cfbae2f51d040b73dd242e94.o)
[TRACE] "_gAPMAppMeasurementLibraryVersion", referenced from:
[TRACE] +[FIRAnalytics initialize] in FirebaseAnalytics(FIRAnalytics_ca9cdf99cfbae2f51d040b73dd242e94.o)
[TRACE] "_kAPMIsAnalyticsCollectionEnabled", referenced from:
[TRACE] +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics(FIRAnalytics_ca9cdf99cfbae2f51d040b73dd242e94.o)
[TRACE] "OBJC_METACLASS$_APMMeasurement", referenced from:
[TRACE] OBJC_METACLASS$_FIRAMeasurement in FirebaseAnalytics(FIRAMeasurement_7113499ff6c634053dac5bf06844d505.o)
[TRACE] "_APMFormattedUserPropertyName", referenced from:
[TRACE] +[FIRAnalytics setUserPropertyString:forName:] in FirebaseAnalytics(FIRAnalytics_ca9cdf99cfbae2f51d040b73dd242e94.o)
[TRACE] "OBJC_METACLASS$_APMSessionReporter", referenced from:
[TRACE] OBJC_METACLASS$_FIRASessionReporter in FirebaseAnalytics(FIRASessionReporter_fedb19668cf4c09fe19f4dd3dd423569.o)
[TRACE] "OBJC_CLASS$_APMValue", referenced from:
[TRACE] OBJC_CLASS$_FIRAValue in FirebaseAnalytics(FIRAValue_2e0ad7f420162fa95ff8e12af195aa2b.o)
[TRACE] "OBJC_CLASS$_APMMeasurement", referenced from:
[TRACE] objc-class-ref in FirebaseAnalytics(FIRAMeasurement_7113499ff6c634053dac5bf06844d505.o)
[TRACE] OBJC_CLASS$_FIRAMeasurement in FirebaseAnalytics(FIRAMeasurement_7113499ff6c634053dac5bf06844d505.o)
[TRACE] objc-class-ref in FirebaseAnalytics(FIRAnalytics_ca9cdf99cfbae2f51d040b73dd242e94.o)
[TRACE] "OBJC_METACLASS$_APMConditionalUserProperty", referenced from:
[TRACE] OBJC_METACLASS$_FIRAConditionalUserProperty in FirebaseAnalytics(FIRAConditionalUserProperty_991dd1dfefbe571de6dbf327969af9a0.o)
[TRACE] "OBJC_METACLASS$_APMAdExposureReporter", referenced from:
[TRACE] OBJC_METACLASS$_FIRAAdExposureReporter in FirebaseAnalytics(FIRAAdExposureReporter_9f9da43a0e4ed4258a1c1de8d08084f3.o)
[TRACE] "OBJC_METACLASS$_APMScreenViewReporter", referenced from:
[TRACE] OBJC_METACLASS$_FIRAScreenViewReporter in FirebaseAnalytics(FIRAScreenViewReporter_ded399434f21648531c172048caa1206.o)
[TRACE] "OBJC_CLASS$_APMScreenViewReporter", referenced from:
[TRACE] objc-class-ref in FirebaseAnalytics(FIRAScreenViewReporter_ded399434f21648531c172048caa1206.o)
[TRACE] OBJC_CLASS$_FIRAScreenViewReporter in FirebaseAnalytics(FIRAScreenViewReporter_ded399434f21648531c172048caa1206.o)
[TRACE] "OBJC_CLASS$_APMAdExposureReporter", referenced from:
[TRACE] OBJC_CLASS$_FIRAAdExposureReporter in FirebaseAnalytics(FIRAAdExposureReporter_9f9da43a0e4ed4258a1c1de8d08084f3.o)
[TRACE] "_APMFormattedEventName", referenced from:
[TRACE] +[FIRAnalytics logEventWithOrigin:name:parameters:] in FirebaseAnalytics(FIRAnalytics_ca9cdf99cfbae2f51d040b73dd242e94.o)
[TRACE] "OBJC_CLASS$_APMConditionalUserProperty", referenced from:
[TRACE] OBJC_CLASS$_FIRAConditionalUserProperty in FirebaseAnalytics(FIRAConditionalUserProperty_991dd1dfefbe571de6dbf327969af9a0.o)
[TRACE] "OBJC_CLASS$_APMEvent", referenced from:
[TRACE] OBJC_CLASS$_FIRAEvent in FirebaseAnalytics(FIRAEvent_c32f39c4e1681f460e696def59992d96.o)
[TRACE] "_kAPMSafelistedEventsOptionKey", referenced from:
[TRACE] +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics(FIRAnalytics_ca9cdf99cfbae2f51d040b73dd242e94.o)
[TRACE] "OBJC_METACLASS$_APMEvent", referenced from:
[TRACE] OBJC_METACLASS$_FIRAEvent in FirebaseAnalytics(FIRAEvent_c32f39c4e1681f460e696def59992d96.o)
[TRACE] "_kAPMIsAnalyticsCollectionDeactivated", referenced from:
[TRACE] +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics(FIRAnalytics_ca9cdf99cfbae2f51d040b73dd242e94.o)
[TRACE] "OBJC_CLASS$_APMConditionalUserPropertyController", referenced from:
[TRACE] OBJC_CLASS$_FIRAConditionalUserPropertyController in FirebaseAnalytics(FIRAConditionalUserPropertyController_faf82aa1c60b80614f617fe3e96f08fe.o)
[TRACE] "OBJC_CLASS$_APMSessionReporter", referenced from:
[TRACE] OBJC_CLASS$_FIRASessionReporter in FirebaseAnalytics(FIRASessionReporter_fedb19668cf4c09fe19f4dd3dd423569.o)
[TRACE] "OBJC_METACLASS$_APMIdentifiers", referenced from:
[TRACE] OBJC_METACLASS$_FIRAIdentifiers in FirebaseAnalytics(FIRAIdentifiers_16c07d77c69044b43f7b9de70da25f9f.o)
[TRACE] "OBJC_METACLASS$_APMUserAttribute", referenced from:
[TRACE] OBJC_METACLASS$_FIRAUserAttribute in FirebaseAnalytics(FIRAUserAttribute_66224d31710f67eef7b8c0e9f1c05115.o)
[TRACE] "_kAPMAnalyticsConfiguration", referenced from:
[TRACE] +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics(FIRAnalytics_ca9cdf99cfbae2f51d040b73dd242e94.o)
[TRACE] "_kAPMAppMeasurementOriginFirebase", referenced from:
[TRACE] +[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics(FIRAnalytics_ca9cdf99cfbae2f51d040b73dd242e94.o)
[TRACE] "OBJC_METACLASS$_APMValue", referenced from:
[TRACE] OBJC_METACLASS$_FIRAValue in FirebaseAnalytics(FIRAValue_2e0ad7f420162fa95ff8e12af195aa2b.o)
[TRACE] "OBJC_CLASS$_APMIdentifiers", referenced from:
[TRACE] OBJC_CLASS$_FIRAIdentifiers in FirebaseAnalytics(FIRAIdentifiers_16c07d77c69044b43f7b9de70da25f9f.o)
[TRACE] "OBJC_METACLASS$_APMConditionalUserPropertyController", referenced from:
[TRACE] OBJC_METACLASS$_FIRAConditionalUserPropertyController in FirebaseAnalytics(FIRAConditionalUserPropertyController_faf82aa1c60b80614f617fe3e96f08fe.o)
[TRACE] "OBJC_CLASS$_APMUserAttribute", referenced from:
[TRACE] OBJC_CLASS$_FIRAUserAttribute in FirebaseAnalytics(FIRAUserAttribute_66224d31710f67eef7b8c0e9f1c05115.o)
[TRACE] "OBJC_CLASS$_FIRComponentContainer", referenced from:
[TRACE] objc-class-ref in FIRAnalyticsConnector(FIRAnalyticsConnector_83e864ed9fa8f98ebe9f4740c2eef8b8.o)
[TRACE] "OBJC_CLASS$_FIRComponent", referenced from:
[TRACE] objc-class-ref in FIRAnalyticsConnector(FIRAnalyticsConnector_83e864ed9fa8f98ebe9f4740c2eef8b8.o)
[TRACE] ld: symbol(s) not found for architecture x86_64
[TRACE] clang: error
[TRACE] : linker command failed with exit code 1 (use -v to see invocation)
[ERROR] ** BUILD FAILED **

Error log for build against device:

[TRACE] CompileC /Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Intermediates/Dealer\ Center.build/Debug-iphoneos/Dealer\ Center.build/Objects-normal/arm64/TiUIiOSMenuPopupProxy.o /Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/Classes/TiUIiOSMenuPopupProxy.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler (in target: Dealer Center)
[TRACE] cd /Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone
[TRACE] export LANG=en_US.US-ASCII
[TRACE] /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch arm64 -fmessage-length=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -std=c99 -fmodules -gmodules -fmodules-cache-path=/Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/DerivedData/ModuleCache.noindex -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wunreachable-code -Wno-implicit-atomic-properties -Wno-objc-interface-ivars -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wno-parentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wno-unused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEPLOYTYPE=development -DLAUNCHSCREEN_STORYBOARD=1 -DDEFAULT_BGCOLOR_RED=1 -DDEFAULT_BGCOLOR_GREEN=1 -DDEFAULT_BGCOLOR_BLUE=1 -DTI_LOG_SERVER_PORT=45296 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -miphoneos-version-min=9.0 -g -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wno-strict-prototypes -Wno-semicolon-before-method-body -Wno-unguarded-availability -index-store-path /Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/DerivedData/Index/DataStore -iquote /Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Intermediates/Dealer\ Center.build/Debug-iphoneos/Dealer\ Center.build/Dealer\ Center-generated-files.hmap -I/Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Intermediates/Dealer\ Center.build/Debug-iphoneos/Dealer\ Center.build/Dealer\ Center-own-target-headers.hmap -I/Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Intermediates/Dealer\ Center.build/Debug-iphoneos/Dealer\ Center.build/Dealer\ Center-all-target-headers.hmap -iquote /Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Intermediates/Dealer\ Center.build/Debug-iphoneos/Dealer\ Center.build/Dealer\ Center-project-headers.hmap -I/Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Products/Debug-iphoneos/include -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk/usr/include/libxml2 -Iheaders -I/Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Intermediates/Dealer\ Center.build/Debug-iphoneos/Dealer\ Center.build/DerivedSources/arm64 -I/Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Intermediates/Dealer\ Center.build/Debug-iphoneos/Dealer\ Center.build/DerivedSources -Wno-arc-performSelector-leaks -F/Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Products/Debug-iphoneos -F/Users/jason.wogan/Library/Application\ Support/Titanium/modules/iphone/firebase.core/2.0.0/platform -F/Users/jason.wogan/Library/Application\ Support/Titanium/modules/iphone/com.traderinteractive.appsee/0.0.1/platform -F/Users/jason.wogan/Library/Application\ Support/Titanium/modules/iphone/com.traderinteractive.fyusion/0.0.2/platform -F/Users/jason.wogan/Library/Application\ Support/Titanium/modules/iphone/firebase.cloudmessaging/2.0.1/platform -F/Users/jason.wogan/Library/Application\ Support/Titanium/modules/iphone/firebase.analytics/1.3.0/platform -F/Users/jason.wogan/Library/Application\ Support/Titanium/modules/iphone/ti.crashlytics/1.1.1/platform -DDEBUG -include /Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Intermediates/PrecompiledHeaders/SharedPrecompiledHeaders/11076202699044268272/Dealer_Center_Prefix.pch -MMD -MT dependencies -MF /Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Intermediates/Dealer\ Center.build/Debug-iphoneos/Dealer\ Center.build/Objects-normal/arm64/TiUIiOSMenuPopupProxy.d --serialize-diagnostics /Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Intermediates/Dealer\ Center.build/Debug-iphoneos/Dealer\ Center.build/Objects-normal/arm64/TiUIiOSMenuPopupProxy.dia -c /Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/Classes/TiUIiOSMenuPopupProxy.m -o /Users/jason.wogan/work/mobileapps/mobile-imt-v2/build/iphone/build/Intermediates/Dealer\ Center.build/Debug-iphoneos/Dealer\ Center.build/Objects-normal/arm64/TiUIiOSMenuPopupProxy.o
[ERROR] 2018-11-26 15:54:12.250 xcodebuild[17594:1076757] DTDeviceKit: deviceType from 00008006-000668380CE2002E was NULL

Can't build for neither iOS or Android

SDK 7.0.1

[ERROR] :  TiApplication: (main) [90,2388] Sending event: exception on thread: main msg:java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.fluidmarket.fluids-2/base.apk"],nativeLibraryDirectories=[/data/app/com.fluidmarket.fluids-2/lib/arm, /data/app/com.fluidmarket.fluids-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]] couldn't find "libfirebase.core.so"; Titanium 7.0.1,2017/12/18 10:42,undefined

[ERROR] : TiApplication: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.fluidmarket.fluids-2/base.apk"],nativeLibraryDirectories=[/data/app/com.fluidmarket.fluids-2/lib/arm, /data/app/com.fluidmarket.fluids-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]] couldn't find "libfirebase.core.so"
[ERROR] : TiApplication: at java.lang.Runtime.loadLibrary(Runtime.java:367)
[ERROR] : TiApplication: at java.lang.System.loadLibrary(System.java:1076)
[ERROR] : TiApplication: at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:151)
[ERROR] : TiApplication: at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:118)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:205)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:114)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime.init(KrollRuntime.java:136)
[ERROR] : TiApplication: at com.fluidmarket.fluids.FluidApplication.onCreate(FluidApplication.java:79)
[ERROR] : TiApplication: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1036)
[ERROR] : TiApplication: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6316)
[ERROR] : TiApplication: at android.app.ActivityThread.access$1800(ActivityThread.java:221)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1860)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:158)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:7224)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
[ERROR] : AndroidRuntime: FATAL EXCEPTION: main
[ERROR] : AndroidRuntime: Process: com.fluidmarket.fluids, PID: 14045
[ERROR] : AndroidRuntime: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.fluidmarket.fluids-2/base.apk"],nativeLibraryDirectories=[/data/app/com.fluidmarket.fluids-2/lib/arm, /data/app/com.fluidmarket.fluids-2/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]] couldn't find "libfirebase.core.so"
[ERROR] : AndroidRuntime: at java.lang.Runtime.loadLibrary(Runtime.java:367)
[ERROR] : AndroidRuntime: at java.lang.System.loadLibrary(System.java:1076)
[ERROR] : AndroidRuntime: at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:151)
[ERROR] : AndroidRuntime: at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:118)
[ERROR] : AndroidRuntime: at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:205)
[ERROR] : AndroidRuntime: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:114)
[ERROR] : AndroidRuntime: at org.appcelerator.kroll.KrollRuntime.init(KrollRuntime.java:136)
[ERROR] : AndroidRuntime: at com.fluidmarket.fluids.FluidApplication.onCreate(FluidApplication.java:79)
[ERROR] : AndroidRuntime: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1036)
[ERROR] : AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6316)
[ERROR] : AndroidRuntime: at android.app.ActivityThread.access$1800(ActivityThread.java:221)
[ERROR] : AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1860)
[ERROR] : AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] : AndroidRuntime: at android.os.Looper.loop(Looper.java:158)
[ERROR] : AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7224)
[ERROR] : AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
[ERROR] : AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

Get the above error on Android, on iOS it simply crashes at boot. Seems the firebasecore can't be found.

Set User Property Not Working

I am able to log all events to Firebase but not any User Properties. This is happening on both iOS and Android using:

Firebase Core (3.0.2 on Android and 2.2.0 on iOS)
Firebase Analytics (2.1.1 on Android and 1.4.1 on iOS)
Ti.PlayServices (11.0.40)
Titanium SDK (7.5.0 GA and the two most recent nightly builds of 7.5.1)

This is what I am using to set it:

FirebaseAnalytics.setUserPropertyString({
name: myAppNum,
value: 163
});

Any reason why this would not be showing even days later in Firebase Analytics?

Firebase API initialization failure when using analytics with other firebase modules.

Hi @hansemannn ,

I am using Firebase core, cloud messaging, auth modules in project. This is working great. Thanks for all these great modules 👍🏼😀. Now I am trying to add Analytics in app. When I add my mobilesdk_app_id key in strings.xml file I start to get errors. I am using google-services.json file.

I checked by putting keys APIKey, projectID, storageBucket, applicationID,databaseURL, GCMSenderID in configuration but it is still throwing error.

Could you please help me with this.

<string name="google_app_id">mobilesdk_app_id</string>

[ERROR] :  FirebaseApp: Firebase API initialization failure.
[ERROR] :  FirebaseApp: java.lang.reflect.InvocationTargetException
[ERROR] :  FirebaseApp: 	at java.lang.reflect.Method.invoke(Native Method)
[ERROR] :  FirebaseApp: 	at com.google.firebase.FirebaseApp.zza(Unknown Source)
[ERROR] :  FirebaseApp: 	at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
[ERROR] :  FirebaseApp: 	at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
[ERROR] :  FirebaseApp: 	at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
[ERROR] :  FirebaseApp: 	at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
[ERROR] :  FirebaseApp: 	at android.content.ContentProvider.attachInfo(ContentProvider.java:1748)
[ERROR] :  FirebaseApp: 	at android.content.ContentProvider.attachInfo(ContentProvider.java:1723)
[ERROR] :  FirebaseApp: 	at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
[ERROR] :  FirebaseApp: 	at android.app.ActivityThread.installProvider(ActivityThread.java:5153)
[ERROR] :  FirebaseApp: 	at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
[ERROR] :  FirebaseApp: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
[ERROR] :  FirebaseApp: 	at android.app.ActivityThread.-wrap1(ActivityThread.java)
[ERROR] :  FirebaseApp: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
[ERROR] :  FirebaseApp: 	at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] :  FirebaseApp: 	at android.os.Looper.loop(Looper.java:148)
[ERROR] :  FirebaseApp: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
[ERROR] :  FirebaseApp: 	at java.lang.reflect.Method.invoke(Native Method)
[ERROR] :  FirebaseApp: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[ERROR] :  FirebaseApp: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
[ERROR] :  FirebaseApp: Caused by: java.lang.IllegalArgumentException: Given String is empty or null
[ERROR] :  FirebaseApp: 	at com.google.android.gms.common.internal.zzbo.zzcF(Unknown Source)
[ERROR] :  FirebaseApp: 	at com.google.android.gms.internal.kh.<init>(Unknown Source)
[ERROR] :  FirebaseApp: 	at com.google.firebase.auth.FirebaseAuth.<init>(Unknown Source)
[ERROR] :  FirebaseApp: 	at com.google.android.gms.internal.lr.<init>(Unknown Source)
[ERROR] :  FirebaseApp: 	at com.google.firebase.auth.FirebaseAuth.zzb(Unknown Source)
[ERROR] :  FirebaseApp: 	at com.google.firebase.auth.FirebaseAuth.getInstance(Unknown Source)
[ERROR] :  FirebaseApp: 	... 20 more
[ERROR] :  TiBaseActivity: (main) [49,261] Error dispatching lifecycle event: Given String is empty or null
[ERROR] :  TiBaseActivity: java.lang.IllegalArgumentException: Given String is empty or null
[ERROR] :  TiBaseActivity: 	at com.google.android.gms.common.internal.zzbo.zzcF(Unknown Source)
[ERROR] :  TiBaseActivity: 	at com.google.android.gms.internal.kh.<init>(Unknown Source)
[ERROR] :  TiBaseActivity: 	at com.google.firebase.auth.FirebaseAuth.<init>(Unknown Source)
[ERROR] :  TiBaseActivity: 	at com.google.android.gms.internal.lr.<init>(Unknown Source)
[ERROR] :  TiBaseActivity: 	at com.google.firebase.auth.FirebaseAuth.zzb(Unknown Source)
[ERROR] :  TiBaseActivity: 	at com.google.firebase.auth.FirebaseAuth.getInstance(Unknown Source)
[ERROR] :  TiBaseActivity: 	at firebase.auth.TitaniumFirebaseAuthModule.onStart(TitaniumFirebaseAuthModule.java:75)
[ERROR] :  TiBaseActivity: 	at org.appcelerator.titanium.TiLifecycle.fireLifecycleEvent(TiLifecycle.java:150)
[ERROR] :  TiBaseActivity: 	at org.appcelerator.titanium.TiBaseActivity.onStart(TiBaseActivity.java:1401)
[ERROR] :  TiBaseActivity: 	at org.appcelerator.titanium.TiLaunchActivity.onStart(TiLaunchActivity.java:413)
[ERROR] :  TiBaseActivity: 	at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1237)
[ERROR] :  TiBaseActivity: 	at android.app.Activity.performStart(Activity.java:6253)
[ERROR] :  TiBaseActivity: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2379)
[ERROR] :  TiBaseActivity: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
[ERROR] :  TiBaseActivity: 	at android.app.ActivityThread.-wrap11(ActivityThread.java)
[ERROR] :  TiBaseActivity: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
[ERROR] :  TiBaseActivity: 	at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] :  TiBaseActivity: 	at android.os.Looper.loop(Looper.java:148)
[ERROR] :  TiBaseActivity: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
[ERROR] :  TiBaseActivity: 	at java.lang.reflect.Method.invoke(Native Method)
[ERROR] :  TiBaseActivity: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[ERROR] :  TiBaseActivity: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

My configuration

  Name                        = Mac OS X
  Version                     = 10.14.3
  Architecture                = 64bit
  # CPUs                      = 8
  Memory                      = 16.0GB

Node.js
  Node.js Version             = 8.9.1
  npm Version                 = 5.5.1

Titanium CLI
  CLI Version                 = 5.1.1
  node-appc Version           = 0.2.44

Titanium SDKs
  7.4.1.GA
    Version                   = 7.4.1
    Install Location          = /Users/ravindra/Library/Application Support/Titanium/mobilesdk/osx/7.4.1.GA
    Platforms                 = iphone, android
    git Hash                  = f47cf79a83
    git Timestamp             = 10/8/2018 17:44
    node-appc Version         = 0.2.45
 
Mac OS X
  Command Line Tools          = installed

Intel® Hardware Accelerated Execution Manager (HAXM)
  Not installed

Java Development Kit
  Version                     = 1.8.0_162
  Java Home                   = /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home

Genymotion
  Path                        = not found
  Genymotion Executable       = not found
  Genymotion Player           = not found
  Home                        = not found

VirtualBox
  Executable                  = not found
  Version                     = unknown

Android SDK
  Android Executable          = not found
  ADB Executable              = /Users/ravindra/Library/Android/sdk/platform-tools/adb
  SDK Path                    = /Users/ravindra/Library/Android/sdk

Android NDK
  NDK Path                    = /Users/ravindra/Library/Android/android-ndk-r12b
  NDK Version                 = 12.1.2977051

Android Platforms
  1) android-26
    Name                      = Android 8.0.0
    API Level                 = 26
    Revision                  = 1
    Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
    ABIs                      = 
    Path                      = /Users/ravindra/Library/Android/sdk/platforms/android-26
  2) android-27
    Name                      = Android 8.1.0
    API Level                 = 27
    Revision                  = 1
    Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
    ABIs                      = 
    Path                      = /Users/ravindra/Library/Android/sdk/platforms/android-27
  3) android-28
    Name                      = Android 9 (not supported by Titanium SDK 7.4.1.GA, but may work)
    API Level                 = 28
    Revision                  = 1
    Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
    ABIs                      = 
    Path                      = /Users/ravindra/Library/Android/sdk/platforms/android-28

Android Add-Ons
  4) Google Inc.:Google APIs:21
    Name                      = Google APIs (unknown) **Not supported by Titanium SDK 7.4.1.GA**
    Vendor                    = n/a
    Revision                  = 1
    Description               = n/a
    Skins                     = none
    ABIs                      = none
    Path                      = /Users/ravindra/Library/Android/sdk/add-ons/addon-google_apis-google-21
    Libraries                 = none
  5) Google Inc.:Google APIs:23
    Name                      = Google APIs (unknown) **Not supported by Titanium SDK 7.4.1.GA**
    Vendor                    = n/a
    Revision                  = 1
    Description               = n/a
    Skins                     = none
    ABIs                      = none
    Path                      = /Users/ravindra/Library/Android/sdk/add-ons/addon-google_apis-google-23
    Libraries                 = none

Android Emulators
  Nexus 5X API 27
    ID                        = Nexus_5X_API_27
    SDK Version               = not installed
    ABI                       = x86
    Skin                      = nexus_5x
    Path                      = /Users/ravindra/.android/avd/Nexus_5X_API_27.avd
    SD Card                   = /Users/ravindra/.android/avd/Nexus_5X_API_27.avd/sdcard.img
    Google APIs               = no

Genymotion Emulators
  None

Connected Android Devices
  None

Thanks!!

Play Console Firebase Analytics Crash reported

Hi, I am getting this error reported a few times on the Android Vitals on the production app. Can't seem to reproduce it in dev environment. Does anyone know what it might be? Thanks

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)

_ZN8firebase9analytics31TitaniumFirebaseAnalyticsModule3logERKN2v820FunctionCallbackInfoINS2_5ValueEEE

backtrace:
#00 pc 0000000000005234 /data/app/com.fluidmarket.fluid-1/lib/arm64/libfirebase.analytics.so (_ZN8firebase9analytics31TitaniumFirebaseAnalyticsModule3logERKN2v820FunctionCallbackInfoINS2_5ValueEEE+120)
#1 pc 0000000000728c00 /data/app/com.fluidmarket.fluid-1/lib/arm64/libkroll-v8.so (_ZN2v88internal25FunctionCallbackArguments4CallEPFvRKNS_20FunctionCallbackInfoINS_5ValueEEEE+188)
#2 pc 000000000077cb6c /data/app/com.fluidmarket.fluid-1/lib/arm64/libkroll-v8.so
#3 pc 000000000077d150 /data/app/com.fluidmarket.fluid-1/lib/arm64/libkroll-v8.so
#4 pc 000000000077d3bc /data/app/com.fluidmarket.fluid-1/lib/arm64/libkroll-v8.so (_ZN2v88internal21Builtin_HandleApiCallEiPPNS0_6ObjectEPNS0_7IsolateE+28)
#5 pc 00000000000000e4

Phones without Google Play Services

Hi guys,

my app is crashing with:

[ERROR] TiExceptionHandler: (main) [1,899] Unable to instantiate service com.google.android.gms.measurement.AppMeasurementService: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.measurement.AppMeasurementService" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/uk.co.uktv.dave-oaDwSe_2k_mJYdhb3BBh6Q==/base.apk"],nativeLibraryDirectories=[/data/app/uk.co.uktv.dave-oaDwSe_2k_mJYdhb3BBh6Q==/lib/x86, /data/app/uk.co.uktv.dave-oaDwSe_2k_mJYdhb3BBh6Q==/base.apk!/lib/x86, /system/lib]]
[ERROR] TiExceptionHandler:
[ERROR] TiExceptionHandler: dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
[ERROR] TiExceptionHandler: java.lang.ClassLoader.loadClass(ClassLoader.java:379)
[ERROR] TiExceptionHandler: java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[ERROR] TiExceptionHandler: android.app.AppComponentFactory.instantiateService(AppComponentFactory.java:103)
[ERROR] TiExceptionHandler: android.app.ActivityThread.handleCreateService(ActivityThread.java:3514)
[ERROR] TiExceptionHandler: android.app.ActivityThread.access$1300(ActivityThread.java:199)
[ERROR] TiExceptionHandler: android.app.ActivityThread$H.handleMessage(ActivityThread.java:1666)
[ERROR] TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:106)
[ERROR] TiExceptionHandler: android.os.Looper.loop(Looper.java:193)
[ERROR] TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6669)
[ERROR] TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method)
[ERROR] TiExceptionHandler: com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
[ERROR] TiExceptionHandler: com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
[ERROR] FirebaseInstanceId: Google Play services missing or without correct permission.
[ERROR] FirebaseInstanceId: Google Play services missing or without correct permission.

bcoz of my tiapp.xml settings:

		<service android:name="com.google.android.gms.measurement.AppMeasurementJobService" android:permission="android.permission.BIND_JOB_SERVICE" android:enabled="true" android:exported="false" />

		<receiver android:name="com.google.android.gms.measurement.AppMeasurementReceiver" android:enabled="true">
		   <intent-filter>
			  <action android:name="com.google.android.gms.measurement.UPLOAD" />
		   </intent-filter>
		</receiver>  

I only include firebase modules when there is Google Play Services available.

if (OS_ANDROID) {
const playServices = require('ti.playservices');
playServicesAvailable = playServices.isGooglePlayServicesAvailable();
// return ConnectionResult: SUCCESS=0, SERVICE_MISSING, SERVICE_UPDATING, SERVICE_VERSION_UPDATE_REQUIRED, SERVICE_DISABLED, SERVICE_INVALID=9

if (playServicesAvailable == 0) {
analyticsEnabled = true;
var FirebaseCore = require('firebase.core');
var FirebaseAnalytics = require('firebase.analytics');

}
}

is there any work around to sort out my problem?

Thanks

Android Run Failed Due to Preconditions

Update: I was trying to use firebase analytics 2.1.0 which gave all of the precondition errors below. I switched the code to use firebase analytics 2.0.1 and everything worked as it should. So the latest release of the module is what is throwing all of the precondition errors.

I am trying to use the Firebase Analytics module with Android. With the same setup I am able to use the Firebase Cloud Messaging module for Android but when I try to include the analytics the app loads but hangs on startup with the error at the bottom. I have read through every other issue on both the core and analytics modules and my setup seems to be what everyone else has got to work. Any help with this issue would be greatly appreciated.

I am using :
Alloy File :
----------
var moment = require('alloy/moment');
var FirebaseCore = require('firebase.core');
var fca = require('firebase.analytics')
var fcm = require('firebase.cloudmessaging');
FirebaseCore.configure({file: 'google-services.json'});

Ti.App ( Commented Out All Other Modules)
-------------------------------------------
 <module platform="android" version="11.0.40">ti.playservices</module>
 <module version="2.2.0">firebase.core</module>
 <module version="2.0.1">firebase.analytics</module>
 <module version="1.0.2">firebase.cloudmessaging</module>

  Ti.APP SDK
 -------------
  <sdk-version>7.1.1.GA</sdk-version>
   
Ti.App Android Manifest
  -----------------------
 <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementService"/>
            <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.measurement.AppMeasurementJobService" android:permission="android.permission.BIND_JOB_SERVICE"/>
            <service android:exported="false" android:name="com.commercial.imt2.gcm.RegistrationIntentService"/>
            <receiver android:enabled="true" android:name="com.google.android.gms.measurement.AppMeasurementReceiver">
                <intent-filter>
                    <action android:name="com.google.android.gms.measurement.UPLOAD"/>
                </intent-filter>
            </receiver>
            <service android:exported="false" android:name="com.commercial.imt2.gcm.GcmIntentService">
                <intent-filter>
                    <action android:name="com.google.android.c2dm.intent.RECEIVE"/>
                </intent-filter>
            </service>
            <service android:exported="false" android:name="com.commercial.imt2.gcm.GcmIntentService">
                <intent-filter>
                    <action android:name="com.google.android.c2dm.intent.SEND"/>
                </intent-filter>
            </service>
            <service android:exported="false" android:name="com.commercial.imt2.gcm.GcmIDListenerService">
                <intent-filter>
                    <action android:name="com.google.android.gms.iid.InstanceID"/>
                </intent-filter>
            </service>
            <service android:name="com.commercial.imt2.services.MyGcmListenerService" android:exported="false" >
              <intent-filter>
                  <action android:name="com.google.android.c2dm.intent.RECEIVE" />
              </intent-filter>
            </service>

    Strings.xml File Under Platform/Android/res/values
    --------------------------------------------------
   <?xml version="1.0" encoding="UTF-8"?>
1:475698257911:android:e672692e655ea311

Error:

W/System.err: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/Preconditions;
[WARN] W/System.err: at com.google.android.gms.internal.measurement.zzgl.zzg(Unknown Source)
[WARN] W/System.err: at com.google.firebase.analytics.FirebaseAnalytics.getInstance(Unknown Source)
[WARN] W/System.err: at firebase.analytics.TitaniumFirebaseAnalyticsModule.analyticsInstance(TitaniumFirebaseAnalyticsModule.java:40)
[WARN] W/System.err: at firebase.analytics.TitaniumFirebaseAnalyticsModule.setScreenNameAndScreenClass(TitaniumFirebaseAnalyticsModule.java:74)
[WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
[WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:187)
[WARN] W/System.err: at org.appcelerator.kroll.KrollRuntime.runModule(KrollRuntime.java:247)
[WARN] W/System.err: at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:134)
[WARN] W/System.err: at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:189)
[WARN] W/System.err: at org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:171)
[WARN] W/System.err: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:666)
[WARN] W/System.err: at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:175)
[WARN] W/System.err: at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:160)
[WARN] W/System.err: at android.app.Activity.performCreate(Activity.java:6955)
[WARN] W/System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
[WARN] W/System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
[WARN] W/System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
[WARN] W/System.err: at android.app.ActivityThread.-wrap14(ActivityThread.java)
[WARN] W/System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
[WARN] W/System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
[WARN] W/System.err: at android.os.Looper.loop(Looper.java:154)
[WARN] W/System.err: at android.app.ActivityThread.main(ActivityThread.java:6776)
[WARN] W/System.err: at java.lang.reflect.Method.invoke(Native Method)
[WARN] W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
[WARN] W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
[WARN] W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.Preconditions" on path: DexPathList[[zip file "/data/app/com.comme
rcial.imt2-1/base.apk"],nativeLibraryDirectories=[/data/app/com.commercial.imt2-1/lib/arm64, /data/app/com.commercial.imt2-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
[WARN] W/System.err: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[WARN] W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
[WARN] W/System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[WARN] W/System.err: ... 25 more
[INFO] [LiveView] Error Evaluating app.js @ Line: undefined
[ERROR] Failed resolution of: Lcom/google/android/gms/common/internal/Preconditions;
[ERROR] File: app.js
[ERROR] Line: undefined
[ERROR] SourceId: undefined
[ERROR] Backtrace:
[ERROR] undefined

ERROR] FirebaseApp: Firebase API initialization failure.
[ERROR] FirebaseApp: java.lang.reflect.InvocationTargetException
[ERROR] FirebaseApp: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] FirebaseApp: at com.google.firebase.FirebaseApp.zza(Unknown Source)
[ERROR] FirebaseApp: at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
[ERROR] FirebaseApp: at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
[ERROR] FirebaseApp: at firebase.core.TitaniumFirebaseCoreModule.configure(TitaniumFirebaseCoreModule.java:116)

[ERROR] FirebaseApp: at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
[ERROR] FirebaseApp: at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:187)
[ERROR] FirebaseApp: at org.appcelerator.kroll.KrollRuntime.runModule(KrollRuntime.java:247)
[ERROR] FirebaseApp: at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:134)
[ERROR] FirebaseApp: at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:189)
[ERROR] FirebaseApp: at org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:171)
[ERROR] FirebaseApp: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:666)
[ERROR] FirebaseApp: at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:175)
[ERROR] FirebaseApp: at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:160)
[ERROR] FirebaseApp: at android.app.Activity.performCreate(Activity.java:6955)
[ERROR] FirebaseApp: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
[ERROR] FirebaseApp: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927)
[ERROR] FirebaseApp: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3045)
[ERROR] FirebaseApp: at android.app.ActivityThread.-wrap14(ActivityThread.java)
[ERROR] FirebaseApp: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1642)
[ERROR] FirebaseApp: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] FirebaseApp: at android.os.Looper.loop(Looper.java:154)
[ERROR] FirebaseApp: at android.app.ActivityThread.main(ActivityThread.java:6776)
[ERROR] FirebaseApp: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] FirebaseApp: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
[ERROR] FirebaseApp: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
[ERROR] FirebaseApp: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/Preconditions;
[ERROR] FirebaseApp: at com.google.android.gms.internal.measurement.zzgl.zzg(Unknown Source)
[ERROR] FirebaseApp: at com.google.android.gms.measurement.AppMeasurement.getInstance(Unknown Source)
[ERROR] FirebaseApp: ... 26 more
[ERROR] FirebaseApp: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.Preconditions" on path: DexPathList[[zip file "/data/app/com.commer
cial.imt2-2/base.apk"],nativeLibraryDirectories=[/data/app/com.commercial.imt2-2/lib/arm64, /data/app/com.commercial.imt2-2/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
[ERROR] FirebaseApp: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[ERROR] FirebaseApp: at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
[ERROR] FirebaseApp: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
[ERROR] FirebaseApp: ... 28 more

Fatal Error for Android 9 (Pie)

Hello I am getting below error. Module is working on emulator but not working on devices like Xiaomi MIA2

02-14 17:32:05.534 10443 10443 E AndroidRuntime: FATAL EXCEPTION: main
02-14 17:32:05.534 10443 10443 E AndroidRuntime: Process: com.sizebiz.just.live.basketball, PID: 10443
02-14 17:32:05.534 10443 10443 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN8titanium11KrollModule16getProxyTemplateEN2v85LocalINS1_7ContextEEE" referenced by "/data/app/com.sizebiz.just.live.basketball-brYMUgffwqCoZUL5AJLYhA==/lib/arm64/libfirebase.analytics.so"...
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at java.lang.System.loadLibrary(System.java:1669)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:139)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:113)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:207)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:113)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at org.appcelerator.kroll.KrollRuntime.init(KrollRuntime.java:135)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at com.sizebiz.just.live.basketball.JustLiveBasketballApplication.onCreate(JustLiveBasketballApplication.java:159)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1155)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5885)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at android.app.ActivityThread.access$1100(ActivityThread.java:200)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1651)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:193)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6692)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
02-14 17:32:05.534 10443 10443 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

My appc ti info as below

Operating System
  Name                        = Mac OS X
  Version                     = 10.12.6
  Architecture                = 64bit
  # CPUs                      = 2
  Memory                      = 8.0GB

Node.js
  Node.js Version             = 11.8.0
  npm Version                 = 6.5.0

Titanium CLI
  CLI Version                 = 5.1.1
  node-appc Version           = 0.2.44

Titanium SDKs
  7.5.1.v20190124152315
    Version                   = 7.5.1
    Install Location          = /Users/kerberos/Library/Application Support/Titanium/mobilesdk/osx/7.5.1.v20190124152315
    Platforms                 = iphone, android
    git Hash                  = 93a7e89867
    git Timestamp             = 1/24/2019 23:29
    node-appc Version         = 0.2.47
  7.5.0.GA
    Version                   = 7.5.0
    Install Location          = /Users/kerberos/Library/Application Support/Titanium/mobilesdk/osx/7.5.0.GA
    Platforms                 = iphone, android
    git Hash                  = 2e5a7423d0
    git Timestamp             = 11/15/2018 21:52
    node-appc Version         = 0.2.47
  7.4.2.GA
    Version                   = 7.4.2
    Install Location          = /Users/kerberos/Library/Application Support/Titanium/mobilesdk/osx/7.4.2.GA
    Platforms                 = iphone, android
    git Hash                  = 13aff1d7b4
    git Timestamp             = 11/19/2018 17:54
    node-appc Version         = 0.2.45
 
Mac OS X
  Command Line Tools          = installed

Intel® Hardware Accelerated Execution Manager (HAXM)
  Not installed

Java Development Kit
  Version                     = 1.8.0_131
  Java Home                   = /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home

Genymotion
  Path                        = not found
  Genymotion Executable       = not found
  Genymotion Player           = not found
  Home                        = not found

VirtualBox
  Executable                  = not found
  Version                     = unknown

Android SDK
  Android Executable          = not found
  ADB Executable              = /Users/kerberos/Library/android-sdk-macosx/platform-tools/adb
  SDK Path                    = /Users/kerberos/Library/android-sdk-macosx

Android NDK
  NDK Path                    = not found
  NDK Version                 = not found

Android Platforms
  1) android-10
    Name                      = Android 2.3.3 **Not supported by Titanium SDK 7.5.1.v20190124152315**
    API Level                 = 10
    Revision                  = null
    Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WVGA800, WVGA854
    ABIs                      = armeabi-v7a, x86
    Path                      = /Users/kerberos/Library/android-sdk-macosx/platforms/android-10
  2) android-16
    Name                      = Android 4.1.2 **Not supported by Titanium SDK 7.5.1.v20190124152315**
    API Level                 = 16
    Revision                  = 1
    Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
    ABIs                      = 
    Path                      = /Users/kerberos/Library/android-sdk-macosx/platforms/android-16
  3) android-23
    Name                      = Android 6.0
    API Level                 = 23
    Revision                  = 3
    Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
    ABIs                      = 
    Path                      = /Users/kerberos/Library/android-sdk-macosx/platforms/android-23
  4) android-26
    Name                      = Android 8.0.0
    API Level                 = 26
    Revision                  = 1
    Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
    ABIs                      = 
    Path                      = /Users/kerberos/Library/android-sdk-macosx/platforms/android-26
  5) android-27
    Name                      = Android 8.1.0
    API Level                 = 27
    Revision                  = 1
    Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
    ABIs                      = 
    Path                      = /Users/kerberos/Library/android-sdk-macosx/platforms/android-27
  6) android-28
    Name                      = Android 9
    API Level                 = 28
    Revision                  = 1
    Skins                     = HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800, WVGA854, WXGA720, WXGA800, WXGA800-7in
    ABIs                      = x86
    Path                      = /Users/kerberos/Library/android-sdk-macosx/platforms/android-28

Android Add-Ons
  None

Android Emulators
  None

Genymotion Emulators
  None

Connected Android Devices
  None

Xcode
  9.2 (build 9C40b) - Xcode default
    Install Location          = /Applications/Xcode.app/Contents/Developer
    iOS SDKs                  = 11.2
    iOS Simulators            = 11.2
    Watch SDKs                = 4.2
    Watch Simulators          = 4.2
    Supported by TiSDK 7.5.1.v20190124152315 = yes
    EULA Accepted             = yes
    Teams                     = none
 
iOS Keychains
  login.keychain-db           = /Users/kerberos/Library/Keychains/login.keychain-db
  System.keychain             = /Library/Keychains/System.keychain

iOS Development Certificates
/Users/kerberos/Library/Keychains/login.keychain-db
  Mahmut Tiyek (8R5X3KDS3C)
    Not valid before          = 7/24/2018 1:31 AM
    Not valid after           = 7/24/2019 1:31 AM

iOS App Store Distribution Certificates
/Users/kerberos/Library/Keychains/login.keychain-db
  Mahmut Tiyek (8YDJT5V23L)
    Not valid before          = 7/24/2018 1:34 AM
    Not valid after           = 7/24/2019 1:34 AM

Apple WWDR Certificate
  Apple WWDR                  = installed

Development iOS Provisioning Profiles
  JLB Device Test
    UUID                      = dd61632b-405b-4ee4-a272-118a04f87c68
    App Prefix                = 8YDJT5V23L
    App Id                    = com.sizebiz.just.live.basketball
    Date Created              = 1/6/2019 3:49 AM
    Date Expired              = 1/6/2020 3:49 AM
    Managed                   = No
 
App Store Distribution iOS Provisioning Profiles
  JLB Distribution
    UUID                      = 860a7bc0-d50e-4898-99dd-b68ed984421f
    App Prefix                = 8YDJT5V23L
    App Id                    = com.sizebiz.just.live.basketball
    Date Created              = 7/24/2018 2:05 AM
    Date Expired              = 7/24/2019 1:34 AM
    Managed                   = No
 
Ad Hoc iOS Provisioning Profiles
  None

Enterprise Ad Hoc iOS Provisioning Profiles
  None

iOS Simulators
11.2
  iPad Air (ipad)
    UDID                      = 18A203AF-8A15-47E9-BBF8-49C055645D19
    Supports Watch Apps       = no
  iPad Air 2 (ipad)
    UDID                      = 7E251490-150D-44E1-A797-32A53DA43465
    Supports Watch Apps       = no
  iPad (5th generation) (ipad)
    UDID                      = 064DEEA8-AFF7-4C2E-92A6-54AFAADD1FC9
    Supports Watch Apps       = no
  iPad Pro (9.7-inch) (ipad)
    UDID                      = 8AC72C60-6D7D-4442-8CF2-8AFB486E72B9
    Supports Watch Apps       = no
  iPad Pro (12.9-inch) (ipad)
    UDID                      = 9856F80C-8CE1-4BAB-A85F-8B2F62377722
    Supports Watch Apps       = no
  iPad Pro (12.9-inch) (2nd generation) (ipad)
    UDID                      = BF03F2BA-9613-49CC-A138-7D05F4B8754A
    Supports Watch Apps       = no
  iPad Pro (10.5-inch) (ipad)
    UDID                      = A30B5957-5836-4033-9BF4-7A2DD75D7B75
    Supports Watch Apps       = no
  iPhone X (iphone)
    UDID                      = 4D0C74B6-7C2D-4F66-8FC3-BF8CB556F985
    Supports Watch Apps       = yes
  iPhone 8 (iphone)
    UDID                      = F60E2BEB-B408-479C-A489-8DD1D7CBCF73
    Supports Watch Apps       = yes
  iPhone 8 Plus (iphone)
    UDID                      = E3D7CF3A-2359-49D8-B4D1-D7E646254363
    Supports Watch Apps       = yes
  iPhone 5s (iphone)
    UDID                      = A0864645-3857-464F-A613-4165941CC8BA
    Supports Watch Apps       = yes
  iPhone 6 Plus (iphone)
    UDID                      = 761AB25C-CE1E-46EF-BD36-731D92D063A5
    Supports Watch Apps       = yes
  iPhone 6 (iphone)
    UDID                      = F919D335-6896-48D9-8275-D223A49519B8
    Supports Watch Apps       = yes
  iPhone 6s (iphone)
    UDID                      = A5E0E482-9DC0-4EF2-B825-E08F6635FE6E
    Supports Watch Apps       = yes
  iPhone 6s Plus (iphone)
    UDID                      = 3D1858E5-A7F0-4F39-A378-A1692B04E9B2
    Supports Watch Apps       = yes
  iPhone SE (iphone)
    UDID                      = 7DC7772F-6C51-4D40-871C-E4AE46881AB5
    Supports Watch Apps       = yes
  iPhone 7 (iphone)
    UDID                      = F676E144-AB5C-4B59-898D-EF61E648BAEA
    Supports Watch Apps       = yes
  iPhone 7 Plus (iphone)
    UDID                      = 17EE1937-C61D-42E0-818C-49E934F3BC4B
    Supports Watch Apps       = yes

WatchOS Simulators
4.2
  Apple Watch - 38mm (watch)
    UDID                      = 2F89A688-72D1-4219-A6AC-19DA6D5343EE
  Apple Watch - 42mm (watch)
    UDID                      = C2A27A27-2B8D-4EA2-AE76-CC1DB1834BBA
  Apple Watch Series 2 - 38mm (watch)
    UDID                      = CF951364-8B4C-4365-82A2-751B372031BE
  Apple Watch Series 2 - 42mm (watch)
    UDID                      = F9A877E1-0DAC-4AB9-A3EF-7897679919BE
  Apple Watch Series 3 - 38mm (watch)
    UDID                      = CDF6A36E-0048-418D-A600-178CF1E6C581
  Apple Watch Series 3 - 42mm (watch)
    UDID                      = 6EBCA80C-C0D6-475C-B1D4-FE05FA08B996

Connected iOS Devices
  None

Android Issues
  !  Unable to locate an Android NDK.
     Without the NDK, you will not be able to build native Android Titanium modules.
     If you have already downloaded and installed the Android NDK, you can tell Titanium where the
     Android NDK is located by running 'appc titanium config android.ndkPath /path/to/android-ndk',
     otherwise you can install it by running 'appc titanium setup android' or manually downloading
     from http://appcelerator.com/android-ndk.

  !  Android API Android 2.3.3 (android-10) is too old and is no longer supported by Titanium SDK
     7.5.1.
     The minimum supported Android API level by Titanium SDK 7.5.1 is API level 23.

  !  Android API Android 4.1.2 (android-16) is too old and is no longer supported by Titanium SDK
     7.5.1.
     The minimum supported Android API level by Titanium SDK 7.5.1 is API level 23.

iOS Issues
  !  Unable to find any valid iOS adhoc provisioning profiles.
     This will prevent you from packaging apps for adhoc distribution.
     You will need to log in to http://appcelerator.com/ios-dist-certs with your Apple Developer
     account, then create, download, and install a profile.

Android: FirebaseInstanceIdService Timeout

Hello, and thank you for making this module! I'm trying to get the Android side of it working for basic analytics (really just need the total users). iOS has been working fine in the app, but Android keeps failing around a service timeout on .../com.google.firebase.iid.FirebaseInstanceIdService. I'm sure I have a setting wrong, or some other conflict going on but I've been unable to debug it at this point. The full error log:
firebase_crash.txt (line 64 shows the timeout error, and line 98 is where the ANR explanation starts). This crash prevents the app from opening/continuing and shows the generic "App Not Responding" error modal.

I've read a few articles about the FirebaseInstanceIdService being deprecated, but figured that it should still be okay if it's working for iOS?

I'm currently using TiSDK 7.4.2.GA, firebase.core 3.0.2, and firebase.analytics 2.2.2. I've included only the information from the README.md in the manifest/application area.

I've tried building without the firebase.analytics module and it works fine (firebase initializes successfully, and the app starts like normal), but of course no information passes through. I've attempted the suggestions in the Not Getting Data On Android thread, but to no avail. Any help/suggestions would be greatly appreciated! Please let me know if there's anything else you'd need to know to diagnose. Thank you!

Firebase Demo does not load.

Hello,

First of all I would thank you for your hard job in order to make the firebase works on titanium :)

I have troubles when I try to build the example app found on your repository. I have just added the google-services.json, GoogleService-Info.plist on Resources folder and strings.xml on /platform/android/res/values folder

The tiapp.xml file remains the same as the example app (but I have changed the Titanium SDK to 7.5.0 as is the latest one, but I have also tried 7.0.2, 7.1.1, 7.3.0, 7.4.1.

When I compile the app, the app freezes on splash screen (default titanium splash screen) and the log has the data that you can found on the bottom of my post.

The thing is the Firebase Analytics recognize the device and updates a device and the event "first_time" on the Firebase Analytics Dashboard.

I really need some help to make this works! :)

My setup:
ti.playservices: latest - 11.0.40
Firebase Core: latest 3.0.2
Firebase Analytics : latest 2.2.2
SDK : latest 7.5.0GA (and I have used 7.0.2,7.1.1, 7.3.0, 7.4.1)
Device : Android (Huawei EVA-L09 - Huawei P9 - android 7.0.0)

Thank you!

The console prints the following:
-- Start application log -----------------------------------------------------
[INFO] : int logctl_get(): open '/dev/hwlog_switch' fail -1, 13. Permission denied
[INFO] :
[INFO] : Note: log switch off, only log_main and log_events will have logs!
[INFO] : I/ : power log dlsym ok
[INFO] : art: Reinit property: dalvik.vm.checkjni= false
[INFO] : TiApplication: (main) [0,0] checkpoint, app created.
[INFO] : MultiDex: VM with version 2.1.0 has multidex support
[INFO] : MultiDex: Installing application
[INFO] : MultiDex: VM has multidex support, MultiDex support library is disabled.
[INFO] : FA: App measurement is starting up, version: 11020
[INFO] : FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
[INFO] : FA: To enable faster debug mode event logging run:
[INFO] : FA: adb shell setprop debug.firebase.analytics.app d2app.idisc.es
[INFO] : FirebaseInitProvider: FirebaseApp initialization successful
[INFO] : TiApplication: (main) [132,132] Titanium Javascript runtime: v8
[INFO] : HwCust: Constructor found for class android.app.HwCustActivityImpl
[INFO] : HwCust: Constructor found for class android.app.HwCustHwWallpaperManagerImpl
[INFO] : TiRootActivity: (main) [0,0] checkpoint, on root activity create, savedInstanceState: null

Bug on param "value" of event "ecommerce_purchase" in android

Hi,
I log the event "ecommerce_purchase" in my iOS/android app, and for every event logged in android, i have the following firebase_error for the parameter named "value" :
18 : Invalid value parameter type

In this event, the param "value" must be a double, and i have no problems when my code is executed in my iOS app, i make sure to use a parseFloat() in my code :

FirebaseAnalytics.log('ecommerce_purchase', {
        transaction_id: transaction_id,
        location: location,
        value: parseFloat(cmd.total),
        currency: 'EUR'
});

Can you do something about this issue please ?

Firebase Module not receiving our uncaughtException

we have set up
Ti.App.addEventListener('uncaughtException',function(evt) {
var dictionary = {
name: 'testing',
reason: evt.message,
frames: evt.stackTrace.split("+")
};

			 Crashlytics.recordCustomException(dictionary);

}

Firebase is not receiving this message

Attempting to log appInstanceID crashes iOS simulator

I was pulling my hair out for hours trying to figure out why my iOS app would hang and crash the simulator at the splash screen immediately after the FirebaseAnalyticsModule loaded, when the Android version was working fine. I thought there might have been a problem with the plist file. Turns out the line in the README logging the appInstanceID is what is causing the crash:

// Get the App Instance ID
Ti.API.info('App Instance ID: ' + FirebaseAnalytics.appInstanceID);

The only info I got from the system log (the standard Titanium cli log just abruptly ends with no error):

Jan 11 15:55:40 Corys-MBP MyApp[43020]: assertion failed: 17G4015 16B91: libxpc.dylib + 79599 [F7D4B188-D5C2-3E5E-BB76-BC7C6A368166]: 0x7d
Jan 11 15:55:40 Corys-MBP com.apple.CoreSimulator.SimDevice.454405BA-CE9C-4478-813B-9DE5974C92E1[35034] (UIKitApplication:digital.blackbird.myapp[0x2bdc][35060][43020]): Service exited due to SIGSEGV | sent by exc handler[0]

I have yet to test if the same line crashes on a device, but I suspect that it won't.

Maybe this is less of a bug report and more of a request to update the README that the above line may crash the simulator, since the simulator does not generate an instance ID.

Error with Hyperloop 2.2.0

Hi @hansemannn,
thank you for this module.
I've downloaded your module today along with the new Hyperloop 2.2.0, so I didn't have the chance to test it before.
I'm getting this error, very similar to the one I'm getting with ti.firebase too (which was working fine on Friday), so I guess it has to do with the new Hyperloop version.

[DEBUG] [Hyperloop] No CocoaPods Podfile found. Skipping ...
[TRACE] [Hyperloop] Generating includes for static framework FirebaseNanoPB (/Users/Fabi/Documents/Workspace/Titanium/xxx/modules/iphone/firebase.analytics/1.0.0/platform/FirebaseNanoPB.framework)
[TRACE] [Hyperloop] Static framework, parsing all header files
2017-10-23T20:05:09.422Z | ERROR  | An uncaught exception was thrown!
ENOENT: no such file or directory, scandir '/Users/Fabi/Documents/Workspace/Titanium/xxx/modules/iphone/firebase.analytics/1.0.0/platform/FirebaseNanoPB.framework/Headers'
2017-10-23T20:05:09.423Z | ERROR  | ENOENT: no such file or directory, scandir '/Users/Fabi/Documents/Workspace/Titanium/xxx/modules/iphone/firebase.analytics/1.0.0/platform/FirebaseNanoPB.framework/Headers'

Do you know what this means?

Exception Thrown

Getting bellow exception randomly while logging event, analytics.log(eventName, params). I have included "firebase.core" and "firebase.analytics" in alloy.js.

Uncaught Attempt to invoke virtual method 'android.content.Context android.content.ContextWrapper.getApplicationContext()' on a null object reference

not building together with GoogleSigning Module(iOS)

Hi,
I have added this two module in My Appcelerator project. But My appcelerator not build with this module.

If I added both module individually then it building properly . but added two module in single project cause me a issue.

[ERROR] : ** BUILD FAILED **

[ERROR] : The following build commands failed:

[ERROR] : Ld /Users/admin/Documents/Appcelerator_Studio_Workspace/testt/build/iphone/build/Products/Debug-iphonesimulator/testt.app/testt normal x86_64

[ERROR] : (1 failure)

Link for both module are

iOS build failed with no helpful error messages

  • I Added the firebase.core module v2.2.0
  • I put GoogleService-Info.plist in app/assets/iphone
  • I Added firebase.analytics module v1.4.1
  • And I called the module from within the app

The app doesn't even build in iOS !!!
Here's what I get:

...
[INFO]  Invoking xcodebuild
[ERROR] ** BUILD FAILED **
[ERROR] The following build commands failed:
[ERROR]         Ld /Users/Me/Documents/Appcelerator_Studio_Workspace/MyApp/build/iphone/build/Products/Debug-iphonesimulator/MyApp.app/MyApp normal x86_64
[ERROR] (1 failure)

I even tried older versions core 2.0.0 with analytics 1.4.0 with no success

Please help, thanks.

Error running FireBase analytics v2 on Android

I am using Titanium 7.0.0 GA and Fire Base Core/ Analytics v2 for Android.

I have the following simple code in alloy.js:

var FirebaseCore = require("firebase.core");
var FirebaseAnalytics = require("firebase.analytics");
	
FirebaseCore.configure({
	APIKey: "AIzaXXXXXXXXXXXXXXXXXXXXX-XXXXXXXXXXXXX", // Assuming this is the Web API Key
	projectID: "my-sample-project-1234567890123",
	applicationID: "1:0123456789012:android:XXXXXXXXXXXXXXXX" // Assuming this is the App ID
});
	
FirebaseAnalytics.enabled = true; 
Ti.API.info('App Instance ID: ' + FirebaseAnalytics.appInstanceID);
Ti.API.info('FirebaseAnalytics.enabled: ' + FirebaseAnalytics.enabled);
FirebaseAnalytics.log('my_event', { /* Optional arguments */ });

Upon compiling and executing the above code, I get the following errors:

[ERROR] FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforceme
nt
[ERROR] FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
[INFO]  FA: App measurement is starting up, version: 11020
[INFO]  FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
[ERROR] FA: GoogleService failed to initialize, status: 10, Missing google app id value from from
 string resources with name google_app_id.
[ERROR] FA: Scheduler not set. Not logging error/warn
[INFO]  FA: To enable faster debug mode event logging run:
[INFO]  FA:   adb shell setprop debug.firebase.analytics.app uk.co.thedealerapp.thedealer
[INFO]  App Instance ID: undefined
[INFO]  FirebaseAnalytics.enabled: true
[ERROR] FA: AppMeasurementReceiver not registered/enabled
[ERROR] FA: AppMeasurementService not registered/enabled
[ERROR] FA: Uploading is not possible. App measurement disabled

Failed resolution of: Lcom/google/android/gms/measurement/internal/zzbw;

I am getting this error message with the latest version of the module, any ideas how I can resolve it?
[ERROR] : TiExceptionHandler: Error: Failed resolution of: Lcom/google/android/gms/measurement/internal/zzbw; [ERROR] : TiExceptionHandler: at HTTPClient.xhr.onerror (/wingee.utils.js:514:36) [ERROR] : TiExceptionHandler: [ERROR] : TiExceptionHandler: com.google.firebase.analytics.FirebaseAnalytics.getInstance(Unknown Source) [ERROR] : TiExceptionHandler: firebase.analytics.TitaniumFirebaseAnalyticsModule.analyticsInstance(TitaniumFirebaseAnalyticsModule.java:37) [ERROR] : TiExceptionHandler: firebase.analytics.TitaniumFirebaseAnalyticsModule.log(TitaniumFirebaseAnalyticsModule.java:46) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:75) [ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1226) [ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:98) [ERROR] : TiExceptionHandler: android.os.Looper.loop(Looper.java:154) [ERROR] : TiExceptionHandler: android.app.ActivityThread.main(ActivityThread.java:6776) [ERROR] : TiExceptionHandler: java.lang.reflect.Method.invoke(Native Method)

ERROR in setScreenNameAndScreenClass - FA: Name must consist of letters, digits or _

Over the last few months I've started seeing errors when invoking the 'setScreenNameAndScreenClass' methods. I had been using strings with forward slashes in them for several years without issue, but after upgrading the FA module in the last year (I think when I jumped from android v3.x to v5.x), I started seeing errors like "FA: Name must start with a letter" or "FA: Name must consist of letters, digits or _". After looking at the Firebase docs, I did see that EVENT names must follow this format, but the strings themselves shouldn't be restricted by that. If I changed the 'screen name' string to something that met the alphanumeric and length requirements then I did NOT see the error. I noticed that Firebase had deprecated the 'setScreenName' method at some point - and suggested using the 'logEvent' SCREEN_VIEW event in its place, which is how the Ti FA module's 'setScreenNameAndScreenClass' method had been updated. However, after looking at the specific code, I saw a potential issue that might be causing the issue.

Using the Android version as an example (although I see the same thing on iOS as well) - specifically the TitaniumFirebaseAnalyticsModule.java file, on lines 120-2 we have this:

Bundle bundle = new Bundle(1);
bundle.putString(screenName, screenClass);
instance.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW, bundle);

I think this makes it possibly view 'screenName' as an 'event type' and therefore needing the string restrictions (alphanumeric, <40 chars). But I think that should instead be something like this:

Bundle params = new Bundle();
params.putString(Param.SCREEN_CLASS, screenClass);
params.putString(Param.SCREEN_NAME, screenName);
instance.logEvent(FirebaseAnalytics.Event.SCREEN_VIEW, bundle);

I'm not an Android dev, so I may be off on the specific syntax/usage, but I'm basing this off the SCREEN_VIEW (and SCREEN_NAME/SCREEN_CLASS) docs here: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event#public-static-final-string-screen_view

There may be something else going on, but I thought this might be at least a starting point. I'm not sure why else this occurs. This issue is causing all my custom screenviews to come through to Firebase as 'not set'. One work-around that I'm currently using is to manually set a 'screen_view' event using the Ti FA method 'logEvent'. That seems to work, but thought I would point this out.

Android: FirebaseCore.configure() error

On Android there is something conflicting using the latest versions of firebase.analytics 2.1.0, firebase.core 2.2.0 and ti.playservice 11.8.0.

The app crash with this error:

[WARN]  W/System.err: java.lang.NoSuchMethodError: No static method zzh(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String; in class Lcom/google/android/gms/common/internal/zzbo; or its super classes (declaration of 'com.google.android.gms.common.internal.zzbo' appears in /data/app/it.testApps.aaaa-1/base.apk)
[WARN]  W/System.err: 	at com.google.firebase.FirebaseOptions$Builder.setApiKey(Unknown Source)
[WARN]  W/System.err: 	at firebase.core.TitaniumFirebaseCoreModule.configure(TitaniumFirebaseCoreModule.java:108)
[WARN]  W/System.err: 	at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)
[WARN]  W/System.err: 	at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:55)
[WARN]  W/System.err: 	at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:41)
[WARN]  W/System.err: 	at ti.modules.titanium.TitaniumModule$Timer.run(TitaniumModule.java:166)
[WARN]  W/System.err: 	at android.os.Handler.handleCallback(Handler.java:751)
[WARN]  W/System.err: 	at android.os.Handler.dispatchMessage(Handler.java:95)
[WARN]  W/System.err: 	at android.os.Looper.loop(Looper.java:154)
[WARN]  W/System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6119)
[WARN]  W/System.err: 	at java.lang.reflect.Method.invoke(Native Method)
[WARN]  W/System.err: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
[WARN]  W/System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
[ERROR] TiExceptionHandler: (main) [285,5281] ----- Titanium Javascript Runtime Error -----
[ERROR] TiExceptionHandler: (main) [0,5281] - In /alloy/controllers/index.js:129,17
[ERROR] TiExceptionHandler: (main) [0,5281] - Message: Uncaught No static method zzh(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String; in class Lcom/google/android/gms/common/internal/zzbo; or its super classes (declaration of 'com.google.android.gms.common.internal.zzbo' appears in /data/app/it.testApps.aaaa-1/base.apk)
[ERROR] TiExceptionHandler: (main) [0,5281] - Source: 			FirebaseCore.configure({
[ERROR] V8Exception: Exception occurred at /alloy/controllers/index.js:129: Uncaught No static method zzh(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String; in class Lcom/google/android/gms/common/internal/zzbo; or its super classes (declaration of 'com.google.android.gms.common.internal.zzbo' appears in /data/app/it.testApps.aaaa-1/base.apk)
[ERROR] V8Exception: No static method zzh(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String; in class Lcom/google/android/gms/common/internal/zzbo; or its super classes (declaration of 'com.google.android.gms.common.internal.zzbo' appears in /data/app/it.testApps.aaaa-1/base.apk)

I thought it was a problem of the firebase.core 2.2.0 module ( hansemannn/titanium-firebase-core#19), but instead the problem does not occur if I use thefirebase.analytics 2.1.0 version.

Error: Failed resolution of: Lcom/google/firebase/analytics/FirebaseAnalytics; Appc SDK 9

My 2 latest app releases for Android are running all of the latest software. Appc SDK 9.0.3, the latest firebase modules. Ever since I moved to uploading the aab file instead of the apk file, firebase anayltics acts like I never released the app. Only the older versions are showing so my user counts are dropping fast since most users are now on the newest versions. Now I am not sure if it is an aab vs apk issue or it is just an issue with the latest firebase anayltics module but no new versions are showing on the firebase or google analytics websites.

The apps themselves run perfectly fine they just don't show up.

ScreenClass always defaults to 'TiViewController'

Hello,

I don't seem to be able to set ScreenClass and ScreenName with setScreenNameAndScreenClass(). It appears to always get logged as 'TiViewController' in the Firebase console.

I am calling setScreenNameAndScreenClass() in the controller of my window.
I am using version 2.2.2 on Titanium SDK 7.5.0.

it may well be my ineptitude with Firebase and native development. If so, I welcome any directions on the correct implementation. Are there any restraints I should be adhering to regarding ScreenClass and ScreenName?

Many thanks in advance!

iOS ** BUILD FAILED **, Android crash

Hello,

I have added firebase.core && firebase.analytics module in my Appcelerator App (SDK 6.3.0.GA)

The build fails on iOS (real iPhone 6S and iPhone 5S simulator) with the same error message:

[ERROR] : ** BUILD FAILED **
[ERROR] : The following build commands failed:
[ERROR] : Ld build/Products/Debug-iphonesimulator/appName.app/appName normal x86_64
[ERROR] : (1 failure)

No other modules are been added to this project.

On android, app compiles but it shows an error:

Uncaught com.google.android.gms.commo.internal.zzby
FirebaseCore.configure().

Do I need any extra module in order to work?

Thanks!

Failed resolution of: Lcom/google/android/gms/measurement/internal/zzbw

Hi @hansemannn
we just downloaded and integrated FireBase Analytics and Core latest modules 3.0.0 and 5.0.0 respectively and seeing the issue Failed resolution of: Lcom/google/android/gms/measurement/internal/zzbw

[ERROR] : TiExceptionHandler: Ti.App.FirebaseAnalytics.log('click'
[ERROR] : TiExceptionHandler: ^
[ERROR] : TiExceptionHandler: Error: Failed resolution of: Lcom/google/android/gms/measurement/internal/zzbw;
[ERROR] : TiExceptionHandler: at Label. (/app.js:36:28)

[ERROR] : TiExceptionHandler: com.google.firebase.analytics.FirebaseAnalytics.getInstance(Unknown Source)
[ERROR] : TiExceptionHandler: firebase.analytics.TitaniumFirebaseAnalyticsModule.analyticsInstance(TitaniumFirebaseAnalyticsModule.java:37)
[ERROR] : TiExceptionHandler: firebase.analytics.TitaniumFirebaseAnalyticsModule.log(TitaniumFirebaseAnalyticsModule.java:46)
[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[ERROR] : TiExceptionHandler: org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:63)
[ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:978)
[ERROR] : TiExceptionHandler: org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1207)
[ERROR] : TiExceptionHandler: org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:265)
[ERROR] : TiExceptionHandler: android.os.Handler.dispatchMessage(Handler.java:98)

We haven't included any other third party module in the sample app. Can you please suggest what exactly is going wrong. We are using Ti 7.5.2GA SDK and play services 16.x.

Sample app previously used to work with FireBase Analytics and Core 2.1.0 and 3.0.0 respectively.

Any help is appreciated @hansemannn

Thanks in advance.

Error when building for android

Hello,

I'll preface with a big thanks for all the work that's been put into this library! I seem to be running in some trouble however.
I've previously been able to run my application using this library on android, however, unexplicably, something seems to have gone wrong and I'm now running into erros, even on branches of my application that previously worked.
The error being as followed:

[ERROR] Failed to run dexer:
[ERROR]
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/firebase/analytics/FirebaseAnalytics;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/firebase/analytics/FirebaseAnalytics$Event;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/firebase/analytics/FirebaseAnalytics$Param;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/firebase/analytics/FirebaseAnalytics$UserProperty;
[ERROR] 4 errors; aborting

I'm running:
Firebase.core version 3.0.2
Firebase.analytics version 2.2.2
Titanium SDK version 7.5.0.GA

I'm a little clueless as to what went wrong, so I welcome any suggestion.

Many thanks in advance,
Stefan Bakker

Error when using module in Android

Hi,
I'm getting this (runtime) error when I try to use the module in Android:
[ERROR] Application Installer abnormal process termination. Process exit value was 1
[ERROR] : Failed to run dexer:
[ERROR] :
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/firebase/zza;
[ERROR] : 1 error; aborting

Any idea what the cause of this error can be?

Several "not set" values in Firebase Analytics Events

I've got a lot of not set values in my events. I'm firing the events all the same and be sure, that the labels and the UserPropertyString is NOT empty. Anyways, there are these not set values.

Bildschirmfoto 2019-10-02 um 09 15 31

Bildschirmfoto 2019-10-02 um 09 15 24

How can I avoid this? From where does this behavior is sourced?

[iOS] Support Ads framework

First of all I would like to thank you for this awesome module. I've been using it for iOS for 2 weeks already and everything seems to work perfect!
I'm setting my user properties on Firebase analytics and I'm missing some of them like gender or age. Then I found this message on Firebase's iOS documentation:

The Age, Gender, and Interests properties are automatically collected only if your app links to the Ad Support framework. Linking to this framework also automatically collects the Advertising Identifier (IDFA).

I have no idea how to set this property on my Titanium iOS app, can you give me some help?
If this is something to be implemented I can have a deep look at the module although I'm not very good on native Obj-c code 😬

Thanks!

Won't work with CloudMessaging module

I'm trying to add this module and CloudMessaging but when I do so, my app stops to work and freezes on splash screen without any error on logs:

// TRACE LOG
-- Start application log -----------------------------------------------------
[WARN]  zygote: Unexpected CPU variant for X86 using defaults: x86
[INFO]  TiApplication: (main) [0,0] checkpoint, app created.
[INFO]  MultiDex: VM with version 2.1.0 has multidex support
[INFO]  MultiDex: Installing application
[INFO]  MultiDex: VM has multidex support, MultiDex support library is disabled.
[DEBUG] FirebaseApp: com.google.firebase.auth.FirebaseAuth is not linked. Skipping initialization.
[DEBUG] FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization.
[INFO]  FA: App measurement is starting up, version: 11020
[INFO]  FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
[INFO]  FA: To enable faster debug mode event logging run:
[INFO]  FA:   adb shell setprop debug.firebase.analytics.app br.com.kyddo.enterprise
[INFO]  FirebaseInitProvider: FirebaseApp initialization successful
[DEBUG] APSAnalytics: APSAnalytics initialization started...
[DEBUG] AndroidRuntime: Shutting down VM
[TRACE] updating tiapp metadata with Appcelerator Platform...
[TRACE] Uploaded tiapp metadata with Appcelerator Platform!

If I remove Analytics, my app works just fine...

this is my analytics section on android:

<!-- Firebase Analytics -->
        <service
          android:name="com.google.android.gms.measurement.AppMeasurementService"
          android:enabled="true"
          android:exported="false" />

        <service
          android:name="com.google.android.gms.measurement.AppMeasurementJobService"
          android:permission="android.permission.BIND_JOB_SERVICE"
          android:enabled="true"
          android:exported="false" />

        <service
          android:name="br.com.kyddo.enterprise.gcm.RegistrationIntentService"
          android:exported="false" />

        <receiver
          android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
          android:enabled="true" >

          <intent-filter>
            <action
              android:name="com.google.android.gms.measurement.UPLOAD" />
          </intent-filter>
        </receiver>

        <!-- Only add the GCM-related tags if you are using push notifications as well -->
        <service
          android:name="br.com.kyddo.enterprise.gcm.GcmIntentService"
          android:exported="false" >

          <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
          </intent-filter>
        </service>

        <service
          android:name="br.com.kyddo.enterprise.gcm.GcmIntentService"
          android:exported="false" >

          <intent-filter>
            <action android:name="com.google.android.c2dm.intent.SEND" />
          </intent-filter>
        </service>

        <service
          android:name="br.com.kyddo.enterprise.gcm.GcmIDListenerService"
          android:exported="false" >

          <intent-filter>
            <action android:name="com.google.android.gms.iid.InstanceID" />
          </intent-filter>
        </service>
        <!--  -->

this is my CloudMessaging just below Analytics:

<!-- Firebase CloudMessaging -->
        <meta-data
          android:name="com.google.firebase.messaging.default_notification_icon"
          android:resource="@drawable/notificationicon"/>

        <service android:name="br.com.kyddo.enterprise.gcm.RegistrationIntentService" android:exported="false" />

        <receiver
          android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
          android:enabled="true">

          <intent-filter>
            <action android:name="com.google.android.gms.measurement.UPLOAD" />
          </intent-filter>
        </receiver>

        <service
          android:name="br.com.kyddo.enterprise.gcm.GcmIDListenerService"
          android:exported="false">

          <intent-filter>
            <action android:name="com.google.android.gms.iid.InstanceID" />
          </intent-filter>
        </service>

        <!-- Commented as it's already added by Analytics -->
        <!-- <service
          android:name="br.com.kyddo.enterprise.gcm.GcmIntentService"
          android:exported="false">

          <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
          </intent-filter>
        </service>

        <service
          android:name="br.com.kyddo.enterprise.gcm.GcmIntentService"
          android:exported="false">

          <intent-filter>
            <action android:name="com.google.android.c2dm.intent.SEND" />
          </intent-filter>
        </service> -->
        <!--  -->

my firebase lib:

/* ===============================
@ Imports
=============================== */
const FirebaseAnalytics = require('firebase.analytics')

/* ===============================
@ Consts & Lets
=============================== */
let Initialized

/* ===============================
@ Functions
=============================== */
Alloy.Firebase = {
	Config: callback => {
		const core = require('firebase.core') // eslint-disable-line
		const configured = core.configure()
		Alloy.Log(`[Firebase - config]: ${JSON.stringify(configured)}`)
		Initialized = true
		callback && callback()
	},
	CloudMessaging: require('firebase.cloudmessaging'), // eslint-disable-line
	Analytics: (event, params) => {
		if (!Alloy.CFG.FIREBASE || !Initialized) return

		params = params || (OS_IOS ? { action: 'click', category: 'click' } : null)

		Alloy.Log(
			`[Firebase - Analytics]: ${JSON.stringify({
				event,
				params,
			})}`,
		)
		OS_ANDROID && FirebaseAnalytics.log(event, params)
		OS_IOS && FirebaseAnalytics.log(event)
	},
}

Also, I already have my google-services.json under /app/assets/android/

I'm using:
7.5.1.GA
playservices: 11.0.40
core: 3.0.2
Analytics: 2.2.2
CloudMessaging: 1.4.1

package com.google.firebase.analytics does not exist

Why am i getting this while building module?

[ERROR] :  /Users/giru/Documents/Appcelerator_Studio_Workspace/titanium-firebase-analytics/android/src/firebase/analytics/TitaniumFirebaseAnalyticsModule.java:22: error: package com.google.firebase.analytics does not exist
[ERROR] :  import com.google.firebase.analytics.FirebaseAnalytics;
[ERROR] :                                      ^

Do i need to include firebase sdk in class path? can you tell me where to find firebase JAR file?

Uncaught translation error: java.lang.IllegalArgumentException: already added:

Hi,

I checked all the other issues concerning this error but can't seem to find what I'm missing.
I installed the ti.playservices + firebase.core after that the app still works when I add the firebase.analytics module these errors appear:
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/firebase/analytics/FirebaseAnalytics;

I am using the following versions:

Titanium SDK: 8.1.1.GA
ti.playservices: 11.0.40
firebase.core: 2.0.0
firebase.analytics: 2.0.1

Any help would be appreciated!

build error Android

Hello,

So the module is working fine on iOS but i am having some issue with Android.
When i build the project i get this error :
Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/firebase/zza;

Didn't find any solution on google.

capture d ecran 2017-11-11 a 13 03 12

Not getting data on Android

Hi,

I'm using analytics and core just to log some events. iOS works fine but I don't see any data going to Firebase under the Android project.
Settings seem to be just fine, the google-services.json is under /app/assets/android/ and no errors are begin logged in the console.
I'm using Ti SDK 6.3.0 and I don't use any other module that could conflict with this one.

I'd appreciate any clue of where to look at.

Thanks

SDK 7.0.0 support for Android

Hi, thanks for the module.
Is not working for Android with Ti SDK 7.0.0, in iOS is fine.

[ERROR] id: firebase.analytics version: 1.0.1 platform: android min sdk: 6.0.0
Operating System
  Name                        = Mac OS X
  Version                     = 10.13.2
  Architecture                = 64bit
  # CPUs                      = 4
  Memory                      = 17179869184

Node.js
  Node.js Version             = 9.2.1
  npm Version                 = 5.5.1

Titanium CLI
  CLI Version                 = 5.0.14

Titanium SDK
  SDK Version                 = 7.0.0.GA
  SDK Path                    = /Users/<username>/Library/Application Support/Titanium/mobilesdk/osx/7.0.0.GA
  Target Platform             = android

Android FirebaseInstanceId

When my app runs I'm getting the following error

[ERROR] : FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
[ERROR] : FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.

I've ensured I'm using the correct mobilesdk_app_id in the strings.xml file

Any other ideas why this is happening?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.