I've noticed that every time I run a cordova app using cordova run android, it seems like the menu button is being pressed, the context menu on another currently open app pops up.
It doesn't bother me but I was just curious if anyone else has noticed this peculiar behaviour...
Yes, this is normal. I can observe the same behaviour while developing on an android device.
Related
I wanted to share a very annoying problem I have with Expo React-Native. It does not break the app or something but it is just annoying to work with.
I am using Expo and I am using the Android Studio Emulator. Expo is installed on a Virtuall Device and its working properly, however I have this problem for a longer time I think since ReactNative 0.61(or 0.60) when they implemented "Fast Refresh". There are time "Fast Refresh" does work right but sometimes when changing a small thing u get an Error thats something like:
Attempted to assign to readonly property.
When you reload the app so the error goes away expo shows a white screen with an endless blue spinner... It's just annoying to quit the node server, close the app, open devops in a browser and bring everything back up everytime.
Has anybody experienced the same behavior or knows a fix for this ?
I've started developing a react-native app using Expo and running it in my Android phone. Things worked OK at first but then suddenly:
Every time I introduced a syntax error on my code, my phone would not display the compiling errors (they used to appear as white text on a red background) but instead it would show an uninformative error screen with a blue background.
My phone stopped responding to the shake gesture in order to access the dev menu. (I wonder who thought that shaking was a good idea as opposed to a more conventional menu...)
Live recompiling stopped working.
Even when refreshing manually, changes to my code sometimes won't be applied. It looks like the expo app is working with an old, cached version of my code.
Expo is indeed running in production mode. Any pointers?
Since you mentioned your project is running in production mode you must change it to development mode, you can do this by clicking the toggle button on expo-cli's interface.
Alternatively if you're using Expo CLI just press p while your project is running to toggle between modes.
You can read more about Dev/production modes here.
I'm using React Native to develop an Android app. Sometimes, after I run react-native run-android and my app starts, it hangs on a white screen. Shaking my phone doesn't do anything, and when I click 'pause' in the VSCode debugger it has no effect. If I press the Home button to background the app, then click on the app again, it launches normally and debugging works as expected. Is this a known issue? What can I do to fix it?
Open your android folder in Android studio
Press the green Play button
Open the logcat window from the bottom bar
Make sure the Device and Process are point to the right value, then inspect any error there
I don't have this problem, you need to inspect what happened at run-time to see how to fix this.
have you resolve this issue?
if you use react-native-vector-icons, make sure you update those fonts(Octicons.ttf and etc) in assets/fonts.
it works fine on iOS but on android, whenever the app is installed then sometimes it gets blank white screen after splash, but it works fine sometimes as well. it is just randomly happened
once i updated them, it works fine
Posting answer for people hitting this question possibly facing the same issue as me - blank white screen on android, ios working fine:
Make sure in your MainActivity.java you have getMainComponentName() function:
public class MainActivity extends ReactActivity {
#Override
protected String getMainComponentName() {
return "devApp3";
}
}
I was studying some tutorials on Android programming and I realized that pressing the Home button on the emulator takes me tot he phones Desktop, but my sample that was running at the time only goes to the background and does not get destroyed. However, if I press the return button, the app is destroyed as well. So I am assuming there might be other apps running int he background as well, those which I am not aware of. Is there something in the android emulator resembling the task manager from windows, which shows what apps are currently running on the phone? I don't have a smartphone with me, but I remember seeing something like that on my friend's smartphone a few days ago. It wasn't an external app but was something built into the phone, I could access it by going to Settings or something.
Is there a task manager built into the android emulator, or is there any other way I can see such things through the SDK debugger?
Inside the settings, there is a list of currently running processes.
First , Leaving the activity does not mean the process ends, It is just not invisible . When the Os needs more memory ,it will be recovered.
If you want to have a backup process, you can start a back service.
http://developer.android.com/reference/android/app/Service.html
Here is how I end a process (only works on Android 4.0+).
Instead of pressing home, press recent and swipe away the process you want to end. Then press home (or back).
You can also use this to close those nasty apps that prevent you from closing them by not allowing back button to work on their main screens.
This is much quicker than having to go to settings, etc.
I've created a sample application (just a textview, nothing else), and I noticed a bug.
After installing it from the SDCard, it displays the "Application installed" screen, with the done and open buttons.
If I click the open button, a strange thing occurs:
Whenever I put the application in background and reopen it from the application icon, it doesn't reopen it, it creates a new instance.
I can confirm that it is creating a new instance, because after putting it on background and reopening a few times, when I click the back button, it opens the previous instance, instead of returning to the home screen.
Now the strange thing is that it only happens after installing from the SDCard and clicking on the open button.
If I click the done button (or installing via ADB) and open the application via icon, it doesn't happen.
Also, if I click the open button (and the bug occurs), after the application is ended for the first time, the bug doesn't occurs anymore.
I've tested it in different devices and in different Android versions (GB, HC and ICS), and the bug is reproducing in them all.
Does someone know if this is an known issue from Android and if so, does someone have an official reference that I can refer?
Thanks in advance
Yep, it is a nasty, well-known Android bug that has been around since the very beginning. See the following:
Android issue 26658
Android issue 2373
Android app acts differently installed from adb vs sdcard