hansemannn / titanium-firebase-analytics

Use the Firebase Analytics SDK in Axway Titanium 🚀
Other
35 stars 18 forks source link

Error running FireBase analytics v2 on Android #13

Closed yahya-uddin closed 6 years ago

yahya-uddin commented 6 years ago

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
yahya-uddin commented 6 years ago

Note that the first 2 errors seems to relate to firebase.core:

https://github.com/hansemannn/titanium-firebase-core/issues/10

hansemannn commented 6 years ago

Same as for your other issue, please use the module correctly and setup the required properties. In this case, the error (Missing google app id value from from string resources with name google_app_id.) should be clear as well.