I'm using Crashlytics (Natively) in React Native.
In RN, I'm overriding the JSExceptionHandler to use NativeModules and call out to my MyCrashHandler.
MyCrashHandler does the with Crashlytics reportError.. but this is only good if I THEN have a crash.
I can't have a Crashlytics crash because I already overrode the JSExceptionHandler.
How do I force Crashlytics to send my events? Maybe I need to use Firebase logging instead?
You don't have to wait for a crash to know that Crashlytics is working. You can use the SDK to force a crash by adding the following code to your app
Button crashButton = new Button(this);
crashButton.setText("Crash!");
Also, you can use your own API like this:
Fabric.with([Crashlytics.start(withAPIKey: "YOUR_API_KEY")]
You can write your own custom crash report by writing code in native iOS and Android. Please check the following the link for it.
https://firebase.google.com/docs/crashlytics/customize-crash-reports?platform=ios
Related
I want to call react-native function from native module.
I have created one barcode-scanner plugins for my react-native app, barcode-scanner SDK is available in native IOS & Android so, i extract those native code and create one plugins(NPM) for react-native app.
Now my problems is, Once barcode-scanner scan a data and send to native IOS, how can i get those scanning data in my react-native app ?(I got scanned data in IOS native)
I want to call react-native app function once native module scanned a data and send those data in react-native
Please give example or proper document so i can try and implement.
Thanks in advance.
You'll find your answer well described here:
https://facebook.github.io/react-native/docs/communication-ios#passing-properties-from-native-to-react-native
I have used "RCTDeviceEventEmitter" & "NativeEventEmitter" and add listener for received event
more detail
Need to get the timer going even if the app is running in backgroung.
Trying to use react-native-background-timer library to do so, but getting this error:
undefined is not an object (evaluating 'RNBackgroundTimer.setTimeout)
On some research got to know that I will have to eject expo to be able to use this.
Is there a way to do this with expo?
Yes actually within Expo itself you can use their Background Fetch API to handle all background tasks, it uses TaskManager under the hood to do that. You don't need to use react-native-background-timer.
Further details of this API and application is found here.
Hope this Helps!
I want to run a react-native app. Before, it runs normally. An then when I add a sound and I run it again it show Undefined is not an object (evaluating 'RCTToastAndroid.SHORT')
I already open another stackoverflow question like this but it not resolve my problem
Looking at the error, even without any code from you, I have some assumptions.
You are probably trying to implement Android Toast in your app.
In the react-native docs there is an example of how to do it here and you are getting an error because of it.
Please Provide the full code where you are implementing it so we can get an proper solution.
By what you posted in your answer, there is some error in implementing Android's Toast.
OR
You have the Toast module implemented correctly, but your are in an IOS device and in you can't use Android's Toast in IOS.
If this is your case, you can try implementing something different to display and use react native Plataform.select to render the Toast in Android and something else in IOS.
If I add a package that requires changes in the native code, like MainActivity for android, is it still possible to use codepush to update the app?
I don't think that's possible, since code-push runtime on the device can only replace the javascript part and not the native parts.
Does anyone have a clear idea about or a sample of air native extension that helps me use alert view of apple touch devices.
I tried a lot for the same but ended up getting no success.
Thanks in advance.
I am not tried this library anyhow please try with NativeAlert.
(OR)
This for alternative for access native UI.
You can try with ios-theme-for-flex-mobile-projects link.
This link shows like iOS Alert view.
Please find mobiletheme_ios_usage.fxp link you can download that project then workout.You can see iOS alert view(Not Native UI).