-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not getting data on Android #10
Comments
Hello @trkfabi Uncaught TypeError: Alloy.Globals.FA.configure is not a function I declare this module in alloy.js as below |
Hi Mitul,
No, I haven’t found a solution yet. I’m not receiving any data from the Android apps on the firebase console.
I have added these 2 lines to tiapp.xml:
<module platform="android" version="1.0.1">firebase.analytics</module>
<module platform="android" version="1.0.1">firebase.core</module>
And this is the code in Alloy.js:
Alloy.Globals.FirebaseCore = require('firebase.core');
Alloy.Globals.FirebaseAnalytics = require('firebase.analytics');
Alloy.Globals.FirebaseCore.configure();
and I call this method:
Alloy.Globals.FirebaseAnalytics.log(eventName, parms);
it works on iOS.
and this is my app/assets folder:
Hope we can find a solution or workaround to this issue.
Fabian
… On Jan 1, 2018, at 4:22 AM, Mitul Bhalia ***@***.***> wrote:
Hello @trkfabi <https://github.com/trkfabi>
Did you find any solution for your issue?
Also can you please tell me how to configure android module?
I added google-services.json in /app/assets/android/ but when i tried run the demo, it shows me below error.
Uncaught TypeError: Alloy.Globals.FA.configure is not a function
I declare this module in alloy.js as below
Alloy.Globals.FA = require('firebase.analytics');
Alloy.Globals.FA.configure();
Please let me know.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#10 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABffPdLpmMJ4wEtlm7FHhOmhW4u5KSasks5tGIeygaJpZM4RCpWE>.
|
I noticed that you use an outdated version of the module that didn't play nice with playservices at that time. With 7.0.0+, the google play services are managed in a central place, the ti.playservices module. The updated module version (2.x) requires that module and firebase.core to be included. Example: <module>ti.playservices<module>
<module>firebase.core<module>
<module>firebase.analytics<module> In addition, if the problem still occurs with titanium-firebase-analytics 2.0.0 (current stable), I've prepared a 2.0.1 version that attempts to pass the activity different than before. Let me know if that works out! Preprelease: |
Ok @trkfabi Let me know when you find solution. @hansemannn My main concern is that i am not using latest version of mac os so i need to use ti sdk 7.0 then i have to first update my mac os then xcode version so is there any older which i can use for my iphone app? |
Hi Hans,
thank you for the update.
I don’t know if I am missing something…
I had to install node 8.x to use Ti sdk 7.x+.
I replaced tiapp.xml lines with this:
![image](https://user-images.githubusercontent.com/1564477/34488195-39314bf6-efb6-11e7-85b0-0678e5d761fe.png)
it compiles without errors for both iOS and Android, but it crashes when the app runs with this error on iOS and Android:
![image](https://user-images.githubusercontent.com/1564477/34488204-4320f51c-efb6-11e7-8e31-84a7533436db.png)
![image](https://user-images.githubusercontent.com/1564477/34488209-47e3928a-efb6-11e7-8f10-29d061ee1ef1.png)
I pasted the modules in both folders, under the “modules” folder in the project and in /library/…
![image](https://user-images.githubusercontent.com/1564477/34488214-4d2e82e0-efb6-11e7-9c92-778adeb1043e.png)
![image](https://user-images.githubusercontent.com/1564477/34488272-9e9ab7ca-efb6-11e7-9f8d-7dd9a21d9155.png)
And this is Alloy.js (I have just added the setScreenNameAndClass method, no other modifications since last version)
![image](https://user-images.githubusercontent.com/1564477/34488418-3dc7194c-efb7-11e7-9a44-e804dc84d2f2.png)
I don’t know what’s going on :(((
Fabian.
… On Jan 1, 2018, at 2:27 PM, Hans Knöchel ***@***.***> wrote:
I noticed that you use an outdated version of the module that didn't play nice with playservices at that time. With 7.0.0+, the google play services are managed in a central place, the ti.playservices <https://github.com/appcelerator-modules/ti.playservices/releases> module. The updated module version (2.x) requires that module and firebase.core to be included.
Example:
<module>ti.playservices<module>
<module>firebase.core<module>
<module>firebase.analytics<module>
In addition, if the problem still occurs with titanium-firebase-analytics 2.0.0 (current stable), I've prepared a 2.0.1 version that attempts to pass the activity different than before. Let me know if that works out!
Preprelease:
firebase.analytics-android-2.0.1.zip <https://github.com/hansemannn/titanium-firebase-analytics/files/1596252/firebase.analytics-android-2.0.1.zip>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#10 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABffPSLSk5i0VJRARPxy8MzE52fRRL9mks5tGRWAgaJpZM4RCpWE>.
|
Sorry, I think your post is missing some screens / code. |
Sorry. I have updated the post. |
OMG, wait... I copied/pasted |
I've just changed an activity reference to initialize the instance and now the app doesn't crash for me anymore. Unfortunately, I still receive the following logs on Android when logging with It says:
Probably pasted the |
Thanks @trkfabi, great progress! The custom events are only not working, because it right now checks for dedicated custom keys like I think we can remove that check and just bridge all String keys to it. Let me see how other do that. I'll also update the readme today to reflect the installation steps. |
Added an own paragraph for the installation here. Closing this issue, will likely do a PR to add custom events. Thanks again everyone for participating! |
2.0.1 drafted, including an attempt to implement custom events: https://github.com/hansemannn/titanium-firebase-analytics/releases/tag/android-2.0.1 |
custom events are working fine with the latest 2.0.1. |
Excellent work! However, I had to add another service in the AndroidManifest section of the
Without this addition, I still received:
|
Thanks @DGJMaxwell, added that note! |
.. and an example app: https://github.com/hansemannn/titanium-firebase-demo |
I experimented the same issue reported by Fabian Martinez with firebase analytics. I can not figure it out how to setup firebase analytics. I get the same error : GoogleService failed to initialize, status: 10, Missing google app id value from from string resources with name google_app_id. I did add the 1:1XXXXXX:android:XXXXXXXX in platform/android/res/values I added the google-services.json in assets/android I added the require info in the tiapp.xml quoted below. My Tiapp.xml : ti.map : 4.0.0 (android) |
I used to get this error, but it’s related to the google app id you added in res/values. It’s not finding it for some reason.
Can you share exactly how you added the tag and the name of the file under res/values folder?
El ene. 14, 2018, a la(s) 1:53 p. m., Lilian ALVAREZ <notifications@github.com> escribió:
… I experimented the same issue reported by Fabian Martinez with firebase analytics. I can not figure it out how to setup firebase analytics.
I get the same error : GoogleService failed to initialize, status: 10, Missing google app id value from from string resources with name google_app_id.
I did add the 1:1XXXXXX:android:XXXXXXXX in platform/android/res/values
I added the google-services.json in assets/android
I added the require info in the tiapp.xml
My Tiapp.xml :
ti.map
ti.map
ti.playservices
ti.cloud
ti.cloudpush
dk.napp.social
firebase.core
firebase.analytics
facebook
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Here it is @trkfabi. In my strings.xml i added : |
Try replacing the strings contents with:
<string name="google_app_id">1:10XXXXXX3:android:XXXXXXXXXa</string>
El ene. 18, 2018, a la(s) 8:49 p. m., Lilian ALVAREZ <notifications@github.com> escribió:
… Here it is @trkfabi. In my strings.xml i added :
1:10XXXXXX3:android:XXXXXXXXXa
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I try and i still get the same error @trkfabi [ERROR] FA: Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI |
try adding it to:
app/i18n/en/string.xml
or
app/i18n/es/string.xml
or the language folder you are using, as if it was just another language text id.
(not the best but it may work)
… On Jan 24, 2018, at 3:41 PM, Lilian ALVAREZ ***@***.***> wrote:
I try and i still get the same error @trkfabi <https://github.com/trkfabi>
[ERROR] FA: Missing google_app_id. Firebase Analytics disabled. See https://goo.gl/NAOOOI <https://goo.gl/NAOOOI>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#10 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/ABffPfWm4U71tlY1ra7McBJlZXQRx5kZks5tN3lpgaJpZM4RCpWE>.
|
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
The text was updated successfully, but these errors were encountered: