Is it a normal behaviour for a react native app? - android

I have a react native app which doesn't work without npm start running. When I try to start it without USB connection, I have an error message:
Unfortunately AppName has stopped working
I am working on android.
Does the problem go away when the app is deployed?
Thanks

Yes It Is Normal Behavior As NodeJS Update the UI and implement the Code there
is Need to Start NPM to make nodeJS work in ReactNative to work with Android

Related

Why React native app is Too slow in comparison with expo

I was Trying to build an app using react-native app.
but the app was running very slow like if i click or tap on any button it takes a around 1-2 seconds to perform basic function
and if i built the same thing using expo it works fine.
Can some please help me out why react native app is behaving like this.
My react Native-App video
My react Native-App video:https://photos.app.goo.gl/Y8jQRS8wrUcoTyH39
My expo app video
My Expo react Native App Video: https://photos.app.goo.gl/7Ezq3tErTS4aLL1GA
I tried all possible methods to make react native faster like using memo and callable methods.
if you are using native-base there an issue her : visit https://github.com/GeekyAnts/NativeBase/issues/4302

React Native Hot Reloading

I have created a React Application via Expo CLI, while I run something via:
yarn web
I am able to open a QR code, and Switch to Tunnel and open that application via my Personal Android Device, it renders fine. But I have to make any changes, and I spin the server again using the same command, it does not seem to refresh content. It does refresh on Web, but does not on Android.
I have gone through few SO's posts and seen that we need a Hot Reload to serve contents dynamically. But when I shake the phone rigorously, I do not find any thing such as Hot Reload to enable it.
This is what I am getting:
I need two things now so to unblock me:
How to enable Hot Reload?
How can I rebuild the package so that I can access the latest from Android mobile
I used expo start instead of yarn web,
And it has helped me in auto reloading

Application has not been registered

I know theres a few posts on this site regarding this error message but my issue doesn't seem to be answered by any of the solutions.
I am debugging my React Native app using my Android testing phone. Everything works correctly until I start using "Debug JS Remotely" with Chrome's React Native Debugger. That is when Chrome gives me this error. I do not have any other packages running and my AppRegistry has the correct name.
Edit: I restarted my computer and I managed to get Chrome React Native Debugger working without this error. However, upon reloading the app this error starts to pop up again.
Edit: Another thing to note, my application is working correctly when I'm not using Chrome's debugger. I have live reloading on and my app updates upon making changes to my files. This issue only appears when I turn on Remote JS Debugger.
in two situations this will happen:
1: when your development server is not up so try this:
react-native start
2: otherwise try this in terminal react-native run-android
Make sure that the packager is running from same directory as the app.
Make sure that the string in MainActivity.java matches the string in index.android.js.

Run background native app or service using cordova

i have a native android app and i'm making another app using cordova and phonegap,
Is it possible when i open my cordova app it will run on background the other native app?
Thank you
I'm not sure but I think is to mix the native code for the core service with the Webbased UI.
you can take a look at Cordova-Plugin-BackgroundService
but it is for android only.

Debugging Cordova + Chrome + App

i'm using Cordova Chrome App with Android ADT Bundle.
I have made a test application that runs ok in web browser and as web app for chrome.
But when i run the app for android window.close() doesn't work when i create the "native" app for android.
I read about other methods in cordova and chrome.app... but it is difficult for me because i can not debug using console.log in android emulator.
My questions:
How can i close the app?
How can i debug through console.log for example?
I read and try log cat, etc. but it doesn't show anything from javascript
Thank you
You could use the below line of code to exit the app.
navigator.app.exitApp();

Categories

Resources