how to debug Ionic 4 android app css issues onRstart - android

This ionic 4 app works fine in browser and on most devices, but rarely on some devices(no matter what version of Android) the styles of some elements change almost invisible when onRestart the app from background. It looks like the following 2 screenshots for two different ionic tabs.
I could not find any clue about this and even not clear how to make this happen for testing.
Any ideas about this or how to debug issue like this?
Thanks and happy new year :p

Connect the app to system via Cable, enable Usb debugging in Phone settings. Open Google chrome and go to 'chrome://inspect/#devices' . Now the device will appear with App widget ID.Click on the inspect menu and inspect the app

Related

WebAPK ignores display:standalone flag for PWA running on local network

I am developing a PWA for which I want to have "add to home screen" (a2hs) functionality in standalone display mode.
During development, my PWA is running on a server which is accessible from within my local network only (not from outer internet).
When testing a2hs on Chrome for Android, I encounter the following strange behavior.
Simple add to home screen
When my PWA is added to the home screen as a normal shortcut, then everything works fine. Clicking on the shortcut will open the PWA in standalone display mode (without Chrome UI visible).
Advanced add to home screen (WebAPK)
When the PWA is added to the home screen as a WebAPK shortcut, then the standalone flag in my web manifest is ignored. Clicking on the shortcut will open the PWA within a browser tab (with Chrome UI visible).
What could be the reason of this incorrect behavior? My guess is that Google's servers need to be able to access my PWA's manifest in order to properly assemble the WebAPK. Since my manifest is not accessible from internet, the WebAPK is not correctly assembled. This is just guessing though. Can someone confirm or describe the reason for this strange behavior?
If you are using a custom port, try using the default port.
Others have reported the same odd behaviour.
This issue was fixed by using the default port.
PWA deployed in node.js running in Standalone mode on Android and iOS
Your PWA can be in complete private network(we have one) and still work as an installable (WebAPK) PWA.
Only reason you would be seeing the Chrome UI is, one of the PWA criteria is not met.
Run lighthouse report and make sure everything under PWA is passed. Post your audit report if you need help with it.

IONIC - Why ionic application did not run correctly on device?

I have tested my application using ionic-serve and everything run normally.
But, when i tried it using device, the application will first run the splash screen (which is not run when using ionic serve) and nothing happen, only white screen.
Can somebody please help me with this situation?
I have no idea about what happen.
The white screen issue often occurs on devices and not in the browser when you are injecting something into a module that kicks off your app. Try to figure out which one, and remove it (if it's not being used) or update it.
First thing to do is to check for errors in the log. To see them, type the address chrome://inspect/#devices in chrome, and click on your app. You'll need to make sure your device has usb debugging turned on.

Cordova Android App: Screen becomes black while working with app

we're developing an cordova android app with angularJS/Ionic. We installed our app on several devices and everything worked fine for a week or two. But since a few days the app randomly becomes black while in use. You can "resurrect" the app when you click the hardware back-button. It seems like the whole GUI is black but all services are still running.
The next problem is, that we have no access to the devices and our own devices don't show this behaviour.
Maybe anyone here has experienced something similar and can help me work it out or can provide us a few good ideas for logging this kind of errors on android?

Appium: Home page is always set to default on android default browser

When I open default browser using Appium, instead of given url, it opens default home page. Never mind if I set the home page to blank page, or something else. It works fine when opening browser manually, but when appium opens it, it is again set to default page.
I tested 2 devices with Android 4.1 and I always get the same issue on both.
This issue does not happen with Chrome browser.
Has anyone had this problem?
If you want to work with the stock Android browser using Appium, i suggest you run your tests on an emulator instead of the real real device.
Appium is compatible with Chrome on real Android devices but you can run the tests on the Stock Android browser if you use an Emulated device.
I have tried it out and it works.
Cheers

Orientationchange only works the first time

I'm working on my app for android built using jquerymobile and phonegap.
I'm testing orientationchange to verify that jquerymobile manages layout accordingly with lanscape or portrait mode. I don't want any custom action at orientationchange event, I only want that jquerymobile css (media settings) works for me and reset the items on the html5 page.
But It seems that orientationchange event is fired only first time. To see that, I create this simple js:
$(window).bind( 'orientationchange', function(e){
navigator.notification.alert(jQuery.event.special.orientationchange.orientation());});
And I discovered that the alert message is shown only at first orientation change event(from portrait to landscape). After this first message no other alert appear, so I argue that the event is not more fired.
I'm missing something, maybe on configuration or Android manifest? thank you very much in advance.
I was seeing this happen in an AVD I created for 2.3.3 (Android). As a test I setup a new AVD (2.2) and this issue did not happen in the new AVD. Also, I deployed app to my physical phone (2.3.4) and tested, issue did not happen on the phone either.
I recreated the AVD in question and used the Google API 10, instead of Android 2.3.3. Issue happened under the google AVD as well. So there is either a bug in the 2.3.3 AVD or within Android 2.3.3 itself.
Hope this information is useful.

Categories

Resources