React Native app lags when it comes to foreground - android

When the app is sent to the background and brought back to the foreground, my app lags a lot, especially while scrolling.
I am using AppState to detect this change.
Is this a bug in React Native in android?
Any suggestions on this?
Platform: Android,
RN Version: 0.60.3

Related

Restart an Application when app goes background - React native

I want to restart my application if user minimize and reopen. I have tried with Native android application with android:clearTaskOnLaunch="true" and it works perfectly.
But same thing it's not working on React native application.

React Native detect screen lock/unlock when app is running in the back ground

Problem: I need a way to measure if the screen is locked/unlocked while my app is running in the background.
What I have tried: Using React Native's App State, I can measure if the App is active, but there is no differentiation between the App being in the background or the screen is locked.
I have found this duplicate, however since there has been no solution given I have opened a new question.
I'm looking for a solution for Android.
When your application is in the background, the process running React Native is paused. You cannot manage your event from inside your application.
The only solution is to use headless js.

Removing launch screen in react native app

I am developing an app in react-native.
Whenever I start the app I am getting the below screen as the start screen.
Any idea how can I remove it?
I am new to the react-native world. Any help is highly appreciated.
This screen lets your app stay up and running without delays
If you allocate to give it up
You need to change this on Android and iOS separately
For Android - https://stackoverflow.com/a/44380138/9161478
For iOS - https://stackoverflow.com/a/34073928/9161478

Cordova app slows down Android multi-task UI and message center

I am currently developing a Cordova app targeting Android, using Ionic. I noticed that the android multi-task UI (if you tap the context button next to the home button on your phone) slows down heavily if the app is active. If I close the Cordova app, it's running fluently again. This happens to Cordova apps with and without the use of Ionic.
My app also uses the cordova-plugin-background-mode, and if I start background mode with a sticky notification, it slows down the Android message center (But only if the sticky notification is visible). Though I think this issue might be related to Ionic, since another sample app I created without Ionic does not have this issue.
I profiled the app using Android Studio's Monitor, but it does not seem to use a lot of Memory (10MB) or CPU (0.8%) when running in background, so I don't understand where these performance drops come from.
Has anyone else had these kinds of performance issues and found a way to improve them? I tried prod/release-mode and Crosswalk already, both did not work (prod mode improved the app startup time though).
Here are my system configurations:
Node version: v6.10.0
Cordova CLI : 6.5.0
Ionic: 3.6.0 (ng) / 2.1.4 (app-scripts)
Android SDK: AP25
android-minSdkVersion: 16
Test Phone: HTC10
Mhm strange, I actually found a solution.. For some reason, using a custom icon for the background mode plugin sticky notification solved the problem with the message center...
The multitask UI seems to run smoother after I added a timer interval that actually periodically updates the ui (a little spinner that indicates an active connection within the app). For some reason, it seems like the multitask UI does not slow down if the GPU is always a little busy (a very tiny task) with the app...

My Android application breaks my phones multi-tasking panel.

I'm creating an Android application and it's nearing completion. Unfortunately, it currently breaks the System UI when I click the square for showing all the applications running when the app I'm creating is open. Any ideas as to why this is happening? Is it using too much memory?

Categories

Resources