PhoneGap Android Querystring issue - javascript

I seem to be having a issue using phoneGap with querystrings
I wanted to have a page as:
view.html?matchid=1234
I have also tried:
view.html#1234
Both of these work in the emulator (running 2.3) but neither work when on my phone (ICS 4.0) - It errors as if the page doesn't exists...
I believe it may be a issue with the version of android. Does anyone know of a fix/work around I could possibly do.
Ideally it would be still using the query in some way. If not the other option I thought of was to use localStorage. Save something to it before going to a generic view.html page which then takes the Id out of localStorage....

There is an issue for this in the Android issue tracker.
http://code.google.com/p/android/issues/detail?id=17535
It affects all versions of Honeycomb and ICS.
It has been fixed and marked for Future release, so don't expect it anytime soon.
You can find some workarounds on the issue thread.

Related

Chrome doesn't support image insertion here

I've seen similar questions asked regarding Flutter and other applications, but to give some context, Google's Gboard just changed the way GIFs and emojis insert into the application, but it's unclear how to support it now.
The error above appears when using Gboard to insert an image into an HTML input. I assume there's some way to accept this, but there does not appear to be any documentation on this apart from the obscure change notes on Gboard that say they changed the way they do it.
This was probably fixed in the newest update by Gboard. You can install an APK of an older version of Gboard here and the easiest way to downgrade Gboard for iOS is using a tweak called AppStore ++ but that only works if you are jailbroken.
Otherwise, just try other keyboards such as SwiftKey or Giphy to insert the image into your HTML input.

React-native facebook login crash on Android

I'm using react-native facebook login through this library: react-native-fbsdk. Following the installation guide did not completely get it working, but I managed to get it working after modifications on the native side, as instructed in many github issues etc.
Anyways, it was working fine two weeks ago, but now, when I try to login with facebook, the application immediately crashes. It doesn't open any login page or do anything else.
What is weird is that if I open a browser in the emulator, leave it to background, and then try to login, the login goes further (I get to actually login, but when I'm directed back, the application crashes).
From the tombstone files I am able to get following warnings/messages:
Expected native library version number "",actual native library
version number ""
Tens like these:
Could not find generated setter for class
com.facebook.reactnative.androidsdk.FBLoginButtonManager
How could I solve this problem? And why it doesn't work anymore? I didn't change anything in the code. Only thing I can think of is that it loads something from the internet during compiling the application. How could it otherwise fail?
This is answer for how I solved the problem, not that much about why it was behaving like this.
In short:
I got it working again by updating the emulator and android API 6.0 through Android Studio.
<Rant state='begin'>
I have no idea why this worked, nor why did it broke in the first place. As it was working good with the old emulator and API 6.0 earlier.
It seems like the react-native fbsdk is far from stable. Or then it is completely react-native's fault, idk to be honest. But this just makes me want to develop fully native, instead of react-native, which seems unstable from my experience so far.
<Rant state='end'>

Cordova iOS plugins failing to load

I've been developing a cross platform application which until recently has caused a few headaches. Android release will load the plugins without any issue at all, however, the iOS seems to have drop. I am unaware if it's something to do with the latest release of iOS (8.2) or something which has caused an issue in a most recent cordova update. Hopefully you guys would be able to shed some light on the matter.
I'm using jQuery Mobile, I've found an article while browsing through Stack Overflow that setting changeHash to false will counter act getting the message Resetting plugins due to page load. unfortunately it didn't work
$(":mobile-pagecontainer").pagecontainer("change", "#questions", {changeHash: false});
Another article I've found is that they simply tell me to ignore it, but something tells me not to do that.
In summary, all is well on Android, every plugin which I have installed is working without issue. On iOS non of the plugins are loading, and simply typing window.plugins should bring back an object of plugins but it's undefined. I've inserted a try catch to find the problem and this is the error which I am getting.
getQuestion: undefined is not an object (evaluating 'window.plugins.captureplugin')

Weinre breaks window.sessionStorage.setItem

Ran into a weird one now.
On FireFox 30.0,when I include weinre in my html 5 page (for a hybrid mobile application), window.sessionStorage.setItem is suddenly not a function any more (or does not exists or something).
Remove weinre script, and all is fine again.
In the actual Android web container on the mobile device, it seems fine again.
So, not a train smash, but very annoying.
Probably best to create an issue on Jira, if this is still a problem.
I'd be happy to do that for you, but would like to have a better description of the problem; was an error thrown when you tried to access sessionStorage? Or did it happen even though you never tried to access sessionStorage?

setInterval in Android Default Browser on Galaxy S4 (Android 4.2.2)

We just got hold of a Samsung Galaxy S4 for testing our mobile website (running latest Touch-Wiz Android 4.2.2 - build JDQ39).
Straight away we noticed some major issues in our site. After some investigation, I discovered that this seems to be due to window.setInterval(fn, repeatInterval) not repeating, and only calling the passed function once.
Please note, there probably isn't a problem with our usage of setInterval, as our code works on all our other devices (lots), the chrome browser on the same device, and on desktop browsers.
I've searched, but can't find any mention of this problem. It seems bizarre to me that such a major bug would not have generated more noise.
My question is: Has anyone else seen this problem? Is it the default browser on 4.2.2, or a Touch-Wiz specific problem? Did you find an elegant work-around?
I've come up with a work-around using self-perpetuating setTimeout(s) but it's a bit nasty, and I'd rather not have to do it like that.
Turns out it wasn't actually setInterval's fault at all. Weirdly enough eval.call(window, 'some js'); seems to stop all intervals from working on this particular browser. Really don't understand how. This is the only phone we've seen it on - it doesn't happen on the stock browser on the S3 (Android 4.2.1).
P.S. The only reason we're doing eval.call is to allow make banner ads which use document.write to add scripts in a one page dynamic loading app. I'd much rather it wasn't there.

Categories

Resources