Android Webview caret disappears - android

I am in the process of testing a hybrid app for Android 4.4+. The app consists of
one custom plugin (my own effort)
the HTML UI created using Phonon.
Phonegap CLI v 6.4.2
My test device is a Huwaei Holly running Android 4.4.2
One of the issues I have run into is the fact that the caret in textarea and input controls stops working "after a while" and the soft keyboard does not popup when I tap the control.
By dint of some trial and error I pinned down the problem - it happens AFTER the app has displayed at least one vanilla HTML/JS alert box which I am using for my own debugging needs. Replacing that with a Phonon.alert box - which is simply an overlayed layer of HTML, not a new window as, I imagine, the bog standard alert is - "fixed" the problem.
Very good but the fact that this happens at all still bothers me - I will not use vanilla alerts in my release build but if it happened with alerts it might well happen with something else.
A spot of Googling revealed that is a known issue that appears to have been around for a while. This SO thread, for instance, suggests the Webview has to be set as being focussable and I have run into the same suggestion elsewhere too.
However, it is not at all clear to me just where I should do this. About the only configuration locations I have at my disposal are
The config.xml file for my Phonegap/Cordova project
The plugin.xml file for my custom Phonegap/Cordova plugin
The Phonegap docs related to config.xml do not mention anything about FrameworkLayout, android:focussable etc.
I'd be most grateful to anyone who might be able to either
explain just where the android:focussable bit should go or
suggest the root cause of the problem.

Related

Can't find my app's full home page in Android Studio Layout Editor

Prerequisites: Got a working app from a friend who needs some changes made. They were outsourcing and now want to internally manage it.
I come from a web and game dev background, so Android/IOS development is new to me, but a lot of the principles seem to be the same.
I got the project onto my device, installed all of the dependencies, and fixed all of the file paths.
The app successfully builds, and I have my virtual Android device running it great!
However, my buddy wants some really simple layout changes, and for the life of me, I can't find where to just edit the home screen layout. I was trying to solve my issue from a web dev approach, by grepping where the logo screen is used in the app, but those files seem to just load a white "background" layer, and not the entire composed page?
I'm missing something really silly here, and I just want to ask a real person on here, instead of digging through documentation and trying to word a condensed question in a Google search.
Here are my condensed questions: How can I just edit the home screen of my app in Android Studio? Where can I find the full home page file to view the entire layout, and not just a fragment?
Edit: The app also utilizes the Flutter SDK, which may explain why I have been having trouble with layout edits. I'm going to look at it again after work today, and hopefully answer my own question. I appreciate the help so far!
Edit 2: After going back to the app with a different approach, I found out my project had defaulted to the "android" sub folder of my master, and wasn't showing any of the Flutter .dart documents. After going up one folder directory, I was finally able to access that Main.Dart file with the display information.
I was able to mount it for inspection, but its saying my emulated device isn't supported. I need to look at it when I have time tonight, and may need to ask a separate question for it. I have my project sdk set to Android 33, and my virtual device is set to Android version 33. I searched around Stack, with a few people with reporting similar issues. I tried following their solutions, but it didn't seem to work.

Cordova/Android on click/tap/vclick/touchstart not working

NOTE: The following issue only occurs on Android versions above 4.4.2 (as far as I know)
TL;DR buttons with click/tap/vclick/touchstart attached to them, seem to work only partly (10-30% of the time) in my cordova app (Android only).
I'm trying to develop a hybrid app for ios/android/windows. In the app, I'll have the occasional button that needs to trigger some actions.
Generally I'd use .on('click', function() { ... });, but I've learned that click doesn't really cooperate with mobile devices.
I tried changing click with vclick, tap and touchstart. But nothing seems to trigger my click events.
Next I tried to see if there was perhaps any css blocking my triggers, but nothing consistent.
The issue with this is, when I apply the following piece of code in my console, it would work sometimes (not always):
$('.anyElement').on('tap', function(){
console.log("tapped");
});
I also tried the following, because I thought the binding was messed up somehow:
$('.anyElement').off().on('tap', function(){
console.log("tapped");
});
So currently I'm kind of not sure where to look anymore. If there perhaps are ways for me to figure out why my stuff doesn't get triggered, that'd be great!
was having the same issue on a cordova jquery app on intel xdk, what solved it for me, at least for now is commenting "fastclick.min.js" in my index.html. seems fastclick.min.js was the causing the issue on android, as it was working on IOS, check out http://community.phonegap.com/nitobi/topics/simple-js-events-like-onclick-are-not-working-on-devices he also soved it by removing some conflicted js, "smoothstate.js" in his case. am still tryin to figure out a better fix though if it exists

Is there a fix for Bootstrap 3 modals on Android 2.x?

On Android 2.x, I cannot get Bootstrap modals to work. They open properly, but then they will not scroll if they are larger than the screen. And you can't click on any of the buttons to close the dialog. Basically, it opens and displays properly, but is completely dead in the water in terms of interacting with the modal.
Bootstrap has no interest in fixing it as they don't support older Android versions. But, I thought there simply HAS to be a way to make it work, right? But apparently not.
I have tried the following hacks, and none of them work. They're all at least a year old, so perhaps they applied to Bootstrap 2.x, but they aren't working for Bootstrap 3.
https://github.com/twbs/bootstrap/issues/8975#issuecomment-24804826
https://github.com/twbs/bootstrap/issues/9890#issuecomment-22915234
https://github.com/twbs/bootstrap/issues/5589#issuecomment-9745069
https://github.com/twbs/bootstrap/issues/3230#issuecomment-5629022
And so on...
Does anyone out there have a solution? Or do I have to use a different modal component? I'm required to support all versions of Android for this project, regretfully.

wrapped android-app crashes on resume "no current context"

i got a webapp build via flambe/haxe which is wrapped by phonegap build to get an .ipa and .apk. For now the only remaining error is that the app looses its context if i switch between apps or pressing home-button resulting in the following error on android:
"W/Adreno200-EGL(31381): <qeglDrvAPI_eglSetBlobCacheFuncsQCOM:5575>: EGL_BAD_PARAMETER"
"E/libEGL(31381): eglSetBlobCacheFuncsANDROID resulted in an error: 0x300c"
"E/SurfaceTexture(31381): [unnamed-31381-1] updateTexImage: invalid current EGLContext"
"E/CanvasTexture(31381): unexpected error: updateTexImage return -38"
The last two lines keep repeating (even after several minutes) until i close the app manually which results in the following error-message:
"E/libEGL(21636): call to OpenGL ES API with no current context (logged once per thread)"
Full errorlog can be viewed here: http://goo.gl/UkxwfI (Dropbox)
One thing that keeps bugging me is the following message since all "related" problems got that feature turned ON, but i cant find anything to change that.
"D/webcoreglue(31381): netstack: Memory Cache feature is OFF"
Another thing is with: D/CordovaActivity(31381): CB-3064: The errorUrl is null
As of http://goo.gl/qZWc4F (github) there seems to be a problem on resuming in cordova. (just strg+f "cb-3064")
Took me the whole day to use google on terms like:
EGL_BAD_PARAMETER, qeglDrvAPI_eglSetBlobCacheFuncsQCOM, SurfaceTexture, CanvasTexture, updateTexImage, invalid current EGLContext, eglSetBlobCacheFuncsANDROID, error: 0x300c, OpenGL ES API
but without any good hints or helpful info.
additional information:
tested on Sony Xperia J (ST26i) and android 4.1.2
min android SDK 14
android:hardwareAccelerated="true" (default since sdk 14)
landscape + fullscreen
webview used to display the website coming from flambe/haxe
used build phonegap / phonegap 3.3 (using 2.8 - 3.3 = same)
building it myself via cordova doesnt help (so it should not relate to phonegap build)
cordova.inappbrowser only used to open links in external browser, website running in webview
website only shows a html5-game (nothing fancy, just something like bejeweld)
Maybe there's some easy help by juggling with the Android-Manifest. I really dont want to do native since the webapp is shipped to iOS via Phonegap too.
Update 1
Tried to reproduce the error using native android and playing with different manifest-settings. But it seems like this has something to do with how phonegap/cordova handles the drawing of everything on screen.
Next things to do will involve posting on phonegap-forums and checking out iOS errorlog. Maybe i find something while comparing my results to: iOS app crashes on resuming
Update 2
iOS-Errorlog doesn't help. Exception Type 20 and Exception Code 8badf00d. Stack shows errors with graphics too (like in android). Errorlog see Link in Comment...
"Fixed" by building android and ios myself with cordova. Resuming/Restarting feels a bit bumpy but thats the next thing to fix.
Phonegap build just doesn't like the life cycle of apps.

data-rel="external" not working in jQueryMobile Beta 2 and PhoneGap 1.0

I just upgraded to PhoneGap 1.0 and jQueryMobile Beta 2 and it seems like file:// navigation is totally borked. I've posted a super stripped-down 2 page example for Android 2.2 here: https://bitbucket.org/uhlenhuthm/pgdemo/overview
DETAILED PROBLEM DESCRIPTION:
I've created a very simple 2 page test application in PhoneGap 1.0 for Android. In my assets/www folder, I have two files: index.html and hola.html. PhoneGap loads the index.html file which contains a single button (see below). Clicking on the button SHOULD load a new page (no AJAX loading), but instead the button just changes color while being tapped and nothing else happens. This only happens when the link has data-ajax="false". Setting data-rel="external" actually has no effect and JQM loads the page using AJAX (another bug). AJAX loading works fine, but that's not what I need (for a more complex project). Including the phonegap.min.js file doesn't fix the problem either.
The weird thing is that this works in the browser (not going through PhoneGap on the phone, it goes to hola.html no problem). Maybe there's something weird with how JQM and PhoneGap deal with file:// URLs?
Am I making a bonehead mistake or is there something really wrong here?
Attempt to give this a read. He points out many different issues with upgrades, this being one of them. Here is a quote detailing what probably is causing this issue: "If you are unable to open a second html page in your app then you're missing the following tag which should be placed in the application tag of your apps AndroidManifest.xml:"
<activity android:name="com.phonegap.DroidGap" android:label="#string/app_name" android:configChanges="orientation|keyboardHidden"><intent-filter></intent-filter></activity>
I hope this helps!

Categories

Resources