Loads SDK into react-native app - react-native

Suppose I have SDK for a an application like true caller : https://github.com/truecaller/android-sdk .
and I want to load that SDK on my own react-native app on both platforms android and iOS , I'm new to react-native and I searched the documentation and didn't find any clear tutorial.
Could you suggest a clear tutorial to get start with ?

First of all you need to understand how to build a react-native app over your existing java based app. This will give you better understanding of how to integrate your existing dependencies with react-native. Then following you can try to integrate any other java sdk compatible with react-native. Read this doc.
Update - Here's another doc which can help you build your own native modules.

Related

Make a react native app which not use expo run on web

I have a react-native App which is not using Expo and runs on android and iOS. Is it possible to make it run on Web? I found multiple projects for this purpose but I am not sure if those projects are aimed to be used only with Expo projects or not. I use multiple android and iOS modules in my app, I can't imagine how those modules will be converted to run on web. Any advise? Is what I am trying to do is even possible?
If you're using native modules with android or IOS specific functionality then you'll have to find a replacement that supports web, (or keep them and use something else for web).
Also no need to stay away from expo modules, expo modules can be used outside of expo too, here's how you can set them up: https://docs.expo.dev/bare/installing-expo-modules/
I'd suggest you listen to some of Fernando Rojo's talks about this:
https://www.youtube.com/watch?v=0FfvIuSouTU&ab_channel=SoftwareMansion

Can I use the same codebase for both a React Native macOS app and a React Native Windows app?

I am trying to create an app using React Native that runs on iOS, Android, macOS and Windows. An advantage of being able to use React Native is that you can share code between platforms.
I am following the setup guides for React Native macOS and Windows, but in the guides, they guide you through creating a new app from scratch for each platform. As I want to use the same app, so I don't have to write the same code twice, I create the macOS app following the guide. Then, in this app, I use the command npx react-native-windows-init --overwrite from the Windows guide to initialise the Windows platform. But when I then go to run the macOS app using the command npx react-native run-macos, I get the error:
Cannot find module 'metro-config/src/defaults/exclusionList'
and
no bundle URL present
One thing I find strange about the setup guides is that for macOS it tells you to use React Native 0.63 and for Windows 0.66. I used 0.66 for both, maybe this is the problem. But if it is, and each platform requires different versions of React Native, how can I use the one app / codebase for both platforms? This goes against one of React Native's core premises:
Create platform-specific versions of components so a single codebase can share code across platforms.
Is it possible to create a single app for both desktop platforms like you would with iOS and Android, and if so, how?
Yes, you can. You will have to create a mono repo
Or you can use mono repo boilerplate. Here is a link to it
https://github.com/mmazzarolo/react-native-universal-monorepo

react-native-external-display library is not supporting in expo

react-native-external-display library not supporting in expo app. facing error null is not an object (evaluating 'RNExternalDisplayEvent.SCREEN_INFO'). I would like to use a expo in the device which has two display screens so I need to display my code based on display screen.
. Please support me with your suggestions If any other library which will support my requirement. Thanks in advance.
I have not found any other library that supports an external display for React Native. Therefore using Expo may not be the best choice.
You could eject expo and then add the react-native-external-display library, which may require you to fix some errors. Alternatively you could start a new project without expo and add the library.

Synchronizing React-native application integrated with the iOS Calendar using expo

I am trying to link my react native app with the iOS calendar. My app runs on expo and uses the react-native-calendar-strip. I've been searching to see how to make a start but not quite sure.Could you please guide me on how to do this?
below is the package that I used
https://github.com/BugiDev/react-native-calendar-strip

Why is that we cannot install native libraries on Expo? (that requires linking)

I am a newbie and learned react-native expo. I am curious why we can't use any native library with Expo.
For example, if I want to use filesystem on expo I just cant use it, I know expo has it's own file system but I want to use another library but that library requires linking so it is not working in expo. Why is that?
I have tried everything.
This is the library that I want to use ==> https://github.com/itinance/react-native-fs
It requires command : react-native link react-native-fs
How do I do it?
You first have to understand the difference between react-native cli & expo
Please read this documentation to understand the difference
React Native expo uses their own servers to compile your javascript into java and return APK file as a complete APP, and that is the reason you do not need android SDKs or android studio environment on your PC when you are using expo
but when you are using react-native cli you do need the android studio environment such as SDKs, because when you are using cli , it compiles the code using that android studio sdk/environment that you made in your PC that is why you do not need a third party server like expo do.
and thats the reason you get android files right in your react-native project and due to which you can add native modules to it.
However you also have the option to use expo-eject, You can read more about expo-eject in this documentation
Thank You!, Have a great day & welcome to stackoverflow community!.