Currently I can only send crash reports to Fabric Crashlytics and according to this documentation, I can attach custom messages and name-value pairs to crash reports using the following code:
Crashlytics.log("Error Passing Data for User: " + user.getId());
But this only gets triggered if a crash occurs and then this data will be attached to the report.
But is it possible to send a a custom report without waiting for a crash to trigger it? Pretty much using Fabric Crashlytics as an analytics service.
For example if I want to send a message to the dashboard saying a specific method could not be called or if certain data is missing. I am trying to use it for analytics purposes for the developers to track the internal process logs.
Thanks in advance
Fabric provides an analytics module called answers.
It let you track events inside your app.
There are some predefined events but its also possible to define
your own events with custom attributes like this:
Answers.getInstance().logCustom(
new CustomEvent("Error")
.putCustomAttribute("Error Passing Data for User", user.getId())
);
Tracked events are available nearly immediately and can be analyzed inside the webinterface of fabric.
Related
If I install the app when clicking the dynamic link. All of that information from dynamic should be still available when I open the app for the first time.How can I get that information? It is not working when I use this: getInitialLink() returns Promise<string|null>;
Since, you haven't mentioned - I'm assuming you are having problems with shorter urls, if that's the case try putting the longer url.
Or refer here on Simon's answer: When I use the long instead of short links, everything works perfectly fine.
On Android, you use the getInvitation() method to get data from the Dynamic Link:
AppInvite.AppInviteApi.getInvitation(mGoogleApiClient, this, false).setResultCallback
(/* ... */);
Then, in the callback, you can get the data passed in the Dynamic Links link parameter by calling the getDeepLink() method:
Firebase Documentation - Use Case
For future reference or detailed answer on Firebase Dynamic Links
Behave just like normal Links
In cases where the application doesn’t require installation (say, if it’s already installed) then clicking the Dynamic Link will automatically open the link to the desired screen.
Dynamic Links have a very simple process flow:
The user begins by clicking the Dynamic Link
If the the needs of the Dynamic Link target are satisfied (this is, the application being installed) then the user is navigated to the target location
Otherwise, if the application requires install in order to navigate
to the Dynamic Link target, the the user is taken to the point of
install for the application. Once the application has been installed,
the user is navigated to the target location of the Dynamic Link
And if that wasn’t all, we can integrate Dynamic Links with Firebase Analytics to track the interaction with any links that we generate for our applications. But if we only require simple tracking, then we can use the automatic built-in analytics from the Dynamic Links panel within the Firebase Console where we can also obtain attribution and referrer information for interacted links with no extra effort required from our side.
What makes it different from Google Analytics?
One of the first things that came to my mind when I read about Firebase Analytics was, “What about my Google Analytics setup?”. So if you already have Google Analytics in place, then why would you make the switch to Firebase Analytics? Well, here’s a couple of differences between the two:
Audiences
We can use Firebase Analytics to create Audiences — these are groups of users that we can then interact with using other Firebase service such as Firebase Notifications and / or Firebase Remote Config.
Integration with other Firebase Services
An awesome thing with Firebase Analytics is that we can integrate other Firebase services with analytics. For example, creating an Audience of users who have experienced a crash reported through Firebase Crash Reporting.
Lower Method Count
The Google Analytics dependency on Android has a total count of 18,607 methods and has a total of 4kb used for dependancies. On the other hand, Firebase Core (for Analytics) has a method count of 15,130 and only 1kb used for dependancies.
Automatic Tracking
When we add the firebase core dependency, it will automatically begin tracking a collection of user engagement events and device information for us — this is useful if you’re looking to only collect the minimal data for your app.
Unlimited Reporting
For up to 500 events, Firebase Analytics provides us with unlimited reporting straight out of the box for free!
No Singleton Initialisation
When setting up Google Analytics on Android we are required to initialize a Singleton instance. Firebase Analytics are simply available by fetching the instance directly from where we wish to track data. This isn’t much effort obviously but just makes the setup flow slightly easier.
Single Console
All of the data for every Firebase service is available for a single console. That makes it both easier and quicker for us to navigate from checking the analytic stats for our app to viewing the latest crash reports.
It looks like this is a react-native-firebase open bug for android
For fix the only thing that is required to be changed in module code:
private boolean isInvitation(PendingDynamicLinkData pendingDynamicLinkData) {
return FirebaseAppInvite.getInvitation(pendingDynamicLinkData) != null;
}
to
private boolean isInvitation(PendingDynamicLinkData pendingDynamicLinkData) {
FirebaseAppInvite invite = FirebaseAppInvite.getInvitation(pendingDynamicLinkData);
if (invite != null && invite.getInvitationId() != null && !invite.getInvitationId().isEmpty()) {
return true;
}
return false;
}
Bug reference : https://github.com/invertase/react-native-firebase/issues/1273
Please Check Your Manifest file
open AndroidManifest.file => In your activity tag there is intent-filter tag put below line in that tag.
<data android:scheme="https" android:host="your.dynamic.link" />
<data android:scheme="http" android:host="your.dynamic.link" />
If already done then check this link for the full blog on the dynamic link with react native.
Link: http://blog.logicwind.com/react-native-dynamic-links-using-firebase/
I hope this will help. sorry for the typos.
I'm using this code to analyse the sign_up method user is using:
Bundle bundle = new Bundle();
bundle.putString(FirebaseAnalytics.Param.SIGN_UP_METHOD, "sign_up_method");
mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SIGN_UP, bundle);
as soon as the user sign up, above given code is supposed to save the event in the Firebase console.
The problem is that the event is getting created but the there's nothing under the value column, i.e., sign_up_method is not getting shown.
Here's a snapshot from the console (event name: sign_up is there but in place of the sign_up_method, there is a -):
What's going wrong here?
Please let me know.
I asked the same question from the Firebase Support Team and they told me that
Unfortunately, not all parameters are represented directly in your
Analytics reports. It is only available on a subset of suggested
events. But they can be used as filters in Audience definitions for
every report. They are also included in data exported to BigQuery if
your app is linked to a BigQuery project.
So, either link your app to BigQuery or get satisfied with what Firebase has to provide.
Please check the Firebase Analytics docs for this. Looks like you are incorrectly setting the parameter as FirebaseAnalytics.Param.SIGN_UP_METHOD
It should be FirebaseAnalytics.Param.METHOD instead
I made an Android app and I have integrated some tools of Firebase, but when I include the Firebase Analytics in the event APP_OPEN Android Studio shows that "I need out bundle", but in the docs of Firebase the method I should not send bundle. How resolve this problem?
The Bundle parameter is nullable. You can pass null if you don't intend to pass any parameters along with the APP_OPEN event. Note that even if no parameters are suggested for APP_OPEN, you are free to log up to 25 parameters in case you have some context that you would like to capture with the event (for example, you could pass a parameter that indicates how much time has elapsed since the previous APP_OPEN event).
I am using Crashlytics in my application and I wanted to get user id and email along with each crash. I did something like this:
Crashlytics.setUserEmail(tokenModel.getEmail());
Crashlytics.setUserIdentifier(String.valueOf(tokenModel.getPk()));
I am doing this in my login screen, after the user has provided his email and successfully registered with the app, so as to get user id. The problem is, I am not getting these data in the crash reports.
What is the lifecycle and working of Crashlytics in above context? Do I need to set these fields every time the app opens?
I am not sure if it needs to be done every time you launch the app and the Crashlytics docs don't explicitly say it neither.
I know that we do it with every launch and it works - provided user info is displayed properly in the dashboard.
My suggestion would be to try send this information every time you initalize Crashlytics with Fabric.with(this, new Crashlytics());, as soon as you have your user data provided (for example after fetching his user profile from your server).
You need to select the issue, click in more details and at the top right corner you can see a label with Identifier.
You need to set it every time you initialise the Crashlytics. At least doing this it works.
if you are using this Crashlytics.setUserIdentifier(""); you can check in data tab in firebase. Fabric.with(this, new Crashlytics()); working fine.
If you look into codes of FirebaseCrashlytics than you can see that userId is being saved into the session. So I am sure that after restarting application your id will be restored.
I have developed one android application. Now we are testing this application in production environment.
I have to track the below information with out depending on tester to share the log file,
Send Log file. May be Logcat data. Foe Example If any web service fails we need to write that into log file then same needs to be sent to the server or to given mail id.
If there is any crash in our app then we can get the stach track by using getDefaultUncaughtExceptionHandler then we need to send the stack trace info via mail or send it to web server.
Or else I can use any solution provider like Google Analytics, Crashlytics or else I can write the log data to text file. And then same to be sent via mail on a daily or weekly basis.
Help me on this.
It's about time you move to crashlytics https://try.crashlytics.com/ or critisism http://www.crittercism.com/ check it out, infact there is ton of other options out there
With a service like http://www.apteligent.com (Crittercism renamed to Apteligent), when looking at a crash, you'll be able to automatically see a log of: web service calls, network connectivity changes, changes to screen views, and app foreground/background events that led up to the crash without manually adding any additional logging to your app:
https://www.apteligent.com/2016/03/working-automatic-breadcrumbs/