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.
Related
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
I have the same website for mobile and desktop devices. One weird behavior I discovered is on mobile devices - Android and Chrome browser.
I didnt have the opportunity to discover exact trigger of the behavior but I think it has something to do with screen turning off.
I have this code before unload. On desktop it works fine.
$(document).on('beforeunload',function(){
$('.loading').show();
})
On phone it works also good but when I minimize Chrome or screen turns off and I wake up the phone. It triggers beforeunload event. Because of that I need to reload the page. I tried also small workaround that clicking on the .loading class will hide it, but with this behavior it doesnt work.
Any ideas ?
This issue seems to occur on some Android devices, notably the Kindle Fire. I'm currently developping an app that runs in Landscape Right and Landscape Left modes, but it seems on some Android devices it starts up on one side then cannot be rotated afterwards.
I'm using Unity 4.3.4f, and my settings are set to support both landscape modes and is set on Auto-Rotation.
Also, I've made sure the problem isn't about the auto-rotation being locked on my device, so it must be something related to my app settings.
Any reason this works on some devices and not on others ?
Note : This issue doesn't occur on iOS devices.
UPDATE : This issue occurs only sometimes on some devices. Sometimes rotation will work fine, other times it just will stay stuck in one direction. Same build, upon killing the app and restarting it may work. Kinda confused as to why this is happening !
Check if in this devices you dont have the rotation blocked in settings.
I have written an application using Adobe Air 3.4 SDK. I have deployed it to my android v4.0.4 device. It works fine (in full screen mode as expected).
Now the application is expected to run in full screen mode automatically before the device shows the native android screen to the user.
How can I do this? Suggestions anyone?
In the AIR native classes, there is a thing called startAtLogin that you can set to true or false :
NativeApplication.nativeApplication.startAtLogin = true;
But I doubt that can be used to override the native android screen and be displayed before it.
I suppose some built-in checks have been made to be sure nothing gets booted before the screen is ready and diplayed.
Still, you can try it :-)
At first I thought this was a problem with my app, but it seems to be happening in any app (though interestingly, not the home screen) in the gingerbread emulator.
To replicate my issue, open eclipse and fire up the android emulator for gingerbread (I'm using the "Google APIs - API Level 9" as my target)
So the procedure to duplicate once the emulator loads is
press LCtrl-F11 to shift orientation to landscape, then again to switch to portrait
Result:
In the homescreen:
The view rotates to landscape, and then back to portrait, as expected
In any app (i've tried browser, calculator, maps, and the app i'm currently working on):
the view rotates to landscape, and then nothing, it stays in landscape even the emulator is displaying the phone in landscape mode (see below)
Has anyone else had this issue, or have I installed the emulator in some incorrect way - this hasn't been an issue with any of the previous emulators
This is a bug with the Android emulator running 2.3.x. Bug is already acknowledged here
Actually, I have run into that problem occasionally before, though it does seem to get progressively worse with each passing tools release. There is nothing wrong with your installation or how you are using the program, AFAIK. You might try using Ctrl-F12 to switch back rather than Ctrl-F11 and see if that improves matters. I think the problem may stem from the emulator trying to emulate four-way orientation, but that is just a guess.
I just got stuck with the same problem in my own application. The app always stays in lanscape mode after using the camera. The only workaround I found is to click on the home button (emulator changes to portrait mode) and then click again on my application to get back to it also in portrait mode.
Did anybody report that bug already?
(Gingerbread emulator, Eclipse 3.5.x, Android Development Tools 8.0.1.v201012062107-82219)