Codename One How to disable cookies in BrowserComponent - codenameone

I have added a payment method (called fawry) in my app by using HTML code in browser component and all things are working fine in simulator but when testing that on a real device, i faced this problem:
How I can fix this problem?

It looks like Google changed the way cookies are handled in the WebView in newer versions according to this answer: https://stackoverflow.com/a/47868677/756809
I made a fix for this so cookies will be on by default in this commit: https://github.com/codenameone/CodenameOne/commit/7d65d9ee0e20035b6d86807ec1cb1bfc077446af

Related

React app doesn't load onsenui css files on chromium

I've got a really weird bug in a create-react-app application. Onsenui is used as a css framework. But when I try to run the app, either in production or on localhost on a chromium based browser, the framework doesn't get loaded. Both css and js aren't loaded. (Only the OnsenUI ones, other css and js is loaded correclty) I then have to refresh the page multiple times to make it work. It loads correctly on Firefox and Safari.
The problem persists on both my MacBook and my Windows PC. I'm not the original creator of the repo and it's already a few years old. I have however updated onsenui, react-onsenui, react to the newest version.
Unfortunately, I can't share the link to the page.
So, in the end, it's been all because of a pop-up blocking extension I had installed. I can't believe I haven't thought of it and I've been refreshing the page multiple times/had to use other browsers just because of this.
So if anyone ever sees this is the future with a similar problem, double check all your active extensions.

Error http module of Angular 2

I'm developing an application for LG WebOS using Angular2, in Chrome and Firefox works fine but in TV embedded browser not works. This problem reproducing only when I using HTTP module
enter image description here
any solution?, Thanks.
Edited:
LG WebOS not support cookies, my solution was disable cookies from HTTP module of Angular2.
According to the image that you provided the cookie in the browser cannot be read. The issue might be that cookies are disabled in the embedded browser, or you are trying to access a module like localStorage that might not be available in the embedded browser.
This would explain why the calls do not work in all browsers.

AngularJS app is not loading on Safari (iOS 5.1.1) back button. Any suggestions?

I've ran into an issue with Safari on iOS 5.1.1 and Angular where I am doing paginated results. After I decide to leave the page that is hosting the app, and then come back to the page by using the browser's history back button.
The application is not initialized so as I scroll again, the pagination functionality is not triggered.
Since 5.1.1 doesn't provide a web inspector, I had to rely on console.log to print events that I want to see that it's executing. On initial load, I see everything ok, but when I am back through the back button nothing fires.
My usual ways of fixing this are not working. Here are the things I've tried:
Used manual bootstrapping of Angular app
Made the page not support caching and expire the page as soon as it's rendered.
Neither of these helped, which is why I am here asking for some suggestions. Unfortunately it's not a very easy thing to replicate through a Fiddle or a hosted HTML file so I am unable to provide one. Hoping that some of you may have experienced this before.
Thanks in advance for any help.
Answer is quite late and I hope you found a solution already but it might be useful for others.
Unfortunately I won't be able to answer why the app is not initialized (due to the lack of code) but I can give you some tools/tips to ease the debugging (assuming you have the iOS simulator).
Debuging on mobile safari can be done either :
with weinre and get the features of the web concole,
or by enabling remote debugging in Mobile Safari itself, see here
Yea, same problem here with iOS 7. It must send the DOM structure over before running any javascript. Kinda pointless...
Since the problem is with mobile safari and since it supports popstate event, you can use this event to detect when the user is back in combination with $location.path(), for example:
$(window).bind("popstate", function () {
alert(location.pathname + $location.path());
});

EXtJS 4.2 and Android browser

I have a bunch of components that I am calling setValue on, everything is working fine in all browsers except the Android web browser and google chrome for android. Has anyone seen this behavior or knows how to solve it? I don't know where to really begin.
Ok you have to enable Javascipt for the Web View as android disables JS by default due to security reasons
YourWebView.getSettings().setJavaScriptEnabled(true);
YourWebView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
That should so the trick
if your app has secure data you probably don't want 3rd party software running JS in your app
Hope this helps

IBM worklight and Dojo mobile

I am new to IBM worklight.I have created a application using Dojo mobile,Dragged and dropped the widgets into Rich Page Editor but when I run the app or check the result in preview,the widgets are not getting displayed
Technically it shouldn't create any issue unless until something goes wrong, try to open the browser console, there must be something fishy which creating the issue.
If possible share the code to debug the issue otherwise it's tough to provide any pointers without having use case.
Open your mobile app in a JavaScript Debug Environment (Firebug) and look for errors!!!
It could also be possible that the dojo.parser is not running. You can trigger that manually by doing the following:
Configure your application that dojo-parser wont get invoked automatically.
<script type="text/javascript" src="dojo/dojo.js"
data-dojo-config="parseOnLoad: false">
</script>
Trigger parser after dom-ready event got fired.
require(["dojo/parser", "dojo/ready"], function(parser, ready){
ready(function(){
parser.parse();
});
});
In dojo, it won't render in the preview (not correctly if it does). Try to download the Android SDK and run it on the emulator. I have had the same issue with the browser simulator and Dojo mobile in a few apps. I don't use it often, but I haven seen the issue.

Resources