React Native on Samsung Tab A is slow - react-native

I am currently developing an application in React Native. There is significant performance drop when I run it on a Samsung Tab A (buttons visibly lag when clicked, a 3D animation we have takes very long to load in, etc.) I tried running the same application on a OnePlus 6T, and all these performance issues are gone. Obviously, the specs are better on a 6T vs. the Tab A, but why would tasks like button clicks even lag? This makes me wonder if the Tab A can support React Native apps at all. Does anyone have experience developing on the Tab A with React Native and have any advice?

Related

Native ui component drops frames on some phones

I am trying to work around the shadow limitation on react native for android. Basically I need box shadows. My solution was to build a native ui component (java) with which I can create box shadows.
Now I ran into a weird bug. In a bare minimum app, with nothing but just some navigation and the box shadow ui components, the navigation is extremely laggy/ drops frames, when the app has to load the box shadow component.
The weird thing is. This just happens on some phones. From my tests so far I can say the native component runs smoothly on:
Fairphone 3 (Snapdragon),
Samsung galaxy s21 (Snapdragon) and
xiaomi redmi note 9 (Snapdragon)
The app drops frames on:
Samsung galax s41 (Mediatek)
Huawei mate 20 (Kirin)
Samsung galaxy s7 (Snapdragon)
Does anyone have an idea what the Problem could be? Does it perhaps have something to do with the CPU?
I am really gratefull for every tip and idea. I really have no idea what the Problem could be.
Thanks!
You have a problem of optimization.
Try to do a Profiling of your app on different phones to find the process that is more time consuming.

Is there a function to call and display an external app inline in react-native?

I want to call an external app that is already installed in the mobile using a deep link and display that on 80% of the screen inside my app. Is it possible to do this in react-native?
You have to use this module for opening other apps but it will open up for the whole screen with deep linking, The Reason is that Other apps are also native apps and have their separate implementation.
You can trigger different apps but opening for 80% of the screen is not possible because this is not a Webview where you can control the height.
Simple as that, You cannot open one app in '20%' of the screen and other for '80%' of the screen.
https://github.com/FiberJW/react-native-app-link

Show a button on screen when the app is in background (React Native)

I'm trying to figure out how the apps like facebook messenger shows a circle of user image on screen when a new message comes, and Uber driver app shows the uber icon on screen when the user minimizes it. Is there anyway that I can show a customized component on phone screen even when the app is not open?
This Stackoverflow thread explains how to replicate in react native by changing the java code as its not supported by react native yet.
this feature is not support directly from react native and also this is not supported in ios therefore only you could implement it with java native code in android. to do that you should write a service in android which handle this element life cycle.
Check this below by lord pooria
RN-thread
Hope it helps. feel free for doubts

How to delete "dropped s far" from my react native application?

I'm developing a react native application and I don't know why some statistics are shown in my app (top left of screenshot), is there any way to hide this overlay?
This is the React Native Perf Monitor.
You need to open the Developer Menu and click Hide Perf Monitor.
Opening the Developer Menu

programmatical screen touch with react-native

My goal is to program a game assistant - app that runs on the background and does the following:
1) takes screenshot programmatically https://aboutreact.com/take-screenshot-programmatically/
2) analyzes some pixels of it
3) creates programmatical screen touches based on the screenshot
But I am not sure whether it is possible to use react native for creating screen touches. Any ideas? It appears to be possible in java, at least:
How to programmatically trigger the touch event in android?
Thank you!
It is possible to handle screen touches in react native using panResponder. You can more about it here:
https://facebook.github.io/react-native/docs/linking-libraries-ios
Also react-native have animated view that could be coupled by panResponder and I think it is applicable for you because you want to develop a game. You can read about react-native animations here:
https://facebook.github.io/react-native/docs/animations
Beside all of this if your game have many motions and is dependent to screen touches react-native maybe is not a good choice. Because react-native performance in such applications would be low. So I recommend be careful about the tech that you want to use.