Integrating Crash Analytics in React Native from 'react-native-firebase' - firebase

I successfully went through RNfirebase docs and added the libraries in my project. Everything is working well and good and the app starts. It's now basically for android.
I have only integrated it the way docs said i.e natively in Gradle files and wherever the docs said.
The question is do I have to initialize any method somewhere in my JS codes to record the crash events or they would be automatically sent to firebase console without requiring any codes (Which I think its impossible because I have to take their instance somewhere and then render them so that they call the native modules).
Well there are some methods which I could see in the docs. How to use them to record events.

You would have included google-services.json by which the firebase will be initialized.
After doing Crashalytics setup you are good to go. You will be automatically getting crash notifications in the console.
Check this documentation . Even though this is for V6 it applies for all versions. We had used another such service called Bugsnag, which is not as elegant as Crashalytics, that used to send to its console as well without we calling their send APIs.
So basically you do not need to call their APIs when crash occurs, Crashalytics will automatically send the crash report.
Please look to this link also.

Related

How to trace exact issue from Firebase Crashlytics log in React Native App?

I have a React Native app with Firebase crashlytics integrated. I am forcefully crashing the app by calling function which does not exist. (this.test()).
I am getting logs in crashlytics, but looking at that logs I am not able to track the exact issue location.
Logs are quite generic and which is not helping me to pinpoint the issue.
Is there any way to get more info on that issue from logs? or anything I need to do so that I can get the issue location? if we are getting an issue in the inded.js file can we trace back the exact js file in app which is causing the issue.
Please help me with this information. Than you for helping.
Firebaser here - it sounds like you'd benefit from Crashlytics custom logging. This tool allows you to log any messages you want that get appended to the Crashlytics crash report that gets sent up to the console. I'm not sure how the React Native wrapper for Firebase Crashlytics works or if it allows you to do this, but according to the React Native Firebase reference doc you should be able to.
With this tool, you could call log in your code whenever you want to record information about the session, the user, or whatever's happening with code that you're executing in the background.

Other unrelated apps listed in google-services.json for no apparent reason

Anyone knows why the google-services.json for a particular app when downloaded from the console contains details related to other unconnected apps that a developer might have in their firebase account? It makes no sense to list them all in this json used by a totally unrelated app. What's the reasoning behind Google/Firebase doing so and if and how the json can be cleaned up to just have only the data needed for the relevant app?
That's just the way it works. The multiple apps in that file correspond to the multiple apps that you added to the Firebase project.
The idea with putting them all in the same file is that you can use that one file in each of your app builds that are tied to the same project. On Android, sometimes developers have multiple flavors of app builds, each one with a different application ID. In that case, the Firebase plugin will select the correct app from the json with no additional work required.
Having more apps in the file doesn't hurt your build at all. As I mentioned, the gradle plugin will select the correct app from the list using its ID. The others are ignored. There is no need to clean anything up.
If you delete an app from your project using the Firebase console, you can download a new json, and that should no longer have the deleted app in it.
If you are having a specific problem or error that you think is related to the fact that multiple apps are listed, please file an issue with Firebase support, along with reproduction steps.

Topic Creating within Firebase Console

I was wondering how I can create a topic in the console of fire base. I see there is android code to do it from the application but that takes time to reflect on the console. I don't even know where to look if it was created. Also can this be done in Javascript compared to java?
Example code for JS would be nice if I cannot do it through the console.
Thanks,
You don't need to do anything in the console to create a topic. Just start using it by string name on both the server and client, and it will just work.

Can we customize the onSave handler in Aviary?

I have tried on the Aviary SDK, is a amazing images editor tools for developer. It really save our time to develop all the function for images edit.
But, one concern about the onSave handler, Aviary will send the edited image to their cloud server, and host it for 72 hours. Therefore, am I right to say we have to make sure our apps has connection with the Adobe cloud? This cloud be a problem if abode cloud service down or Adobe stop the service?
So, anyway to customize the 'onSave' handler for Aviary?
Thanks.
Found that if we using the Android SDK, we are able to set the withOutput, which is
withOutput(Uri)
- Sets the output location where the edited image will be saved.
But no idea for web version, for the onSave method.

Real time collaboration with CodeMirror

I started this little project where I would do real time collaboration on code using CodeMirror.
I have a msgs system setup such its easy to pass objects from one user to another. My problem is getting it integrated with CodeMirror. I found out that it have events for onchange and a replaceRange(string, from, to).
I pass the onchange objects to the other users and uses the replaceRange to update the view. Problem is then when using replaceRange, it triggers an new onchange and it sends msgs back and forward. Anyone know if there are some way of updating the local view without it triggering an onchange. Or suggestings for other paths to take. (the msgs system is already set up and its easy to pass javascript objects to other clients).
You Can Use Firepad
FirePad is an open-source (on GitHub) realtime collaborative plug-in to codemirror. You can get it setup with codemirror in 4 extra lines of code and a few minutes. It's uses Firebase for the backend.
To get this to work properly, you'll have to merge changes as well. See http://ot.substance.io/ for a demo of an open-source solution (also using CodeMirror).

Resources