Android Chrome Website - javascript

Guys I build a website and when i am accessing it from the android browser(Default) A script that is very important on the functionality of my website is not being displayed. But when I am accessing it from the android google chrome browser the script is being displayed as I was expected to see.
My site is responsive, it adapted to the screen of the user.
I am using galaxy note 2 and the android version is 4.3.
I was thinking to build an android application such as a browser that is going to be always fullscreen and locked on my site but i do not what google chrome browser has and making my website as I want it to be.
Any help?

I'm not sure what you mean by Android Browser (default). Is there a Samsung Browser already preinstalled on the phone that isn't Chrome?
My guess, off the top of my head, is that JavaScript is disabled on this other browser. If you were to create your own browser with an Android WebView, JavaScript is disabled by default and must be manually set to true.
A quick Google search for 'Samsung Note JavaScript' doesn't return anything readily apparent, but here are a few different Samsung Models with directions on how to enable JavaScript on their browsers. I would imagine the process is similar for the Note 2.
http://support.t-mobile.com/docs/DOC-6782
http://www.droidista.com/2014/06/enabledisable-javascript-on-samsung.html
http://www.att.com/esupport/article.jsp?sid=KB117209&cv=820#fbid=omMGs_GnNUf

Related

Simulate a IOS environment for test website in safari

I'm developing an simples website using html, css/bootstrap and JS. I received feedback by Iphone user that some features not working in IOS mobile. Some Images not loading and counter-up not working too. In windows and android is working fine (chrome and Firefox). The question is, how I create a environment for simulate a IOS mobile for check how safari browser load my site? I tried install safari in windows but it not show equals execution in IOS. I think that browsershots not is a good ideia, because it works only with static content, and in the moment return 500 internal server error.
Microsoft BrowserStack provides a full test environment, however beyond the complimentary trial period it is not free. For errors related to pageload or reference, I would suggest you use device emulation and network throttling in a browser: Safari, Firefox, Chrome.
Some browsers are more forgiving of errors, so you may even have a typo. Is your trustworthy friend using an outdated browser while you require modern feature support? The scope of the problem seems undeserving of a bill for membership or tech support.

Debug an External Javascript against Documents inside Mobile Safari

This question is related to my earlier question How to Debug Javascript in IOS Action App Extension. Basically, I am developing an mobile safari extension, and part of the work is to develop a javascript (operating on top of "document" provided by mobile safari) to run inside the app extension.
However, I have not found a way to debug a javascript file inside an app extension. Now, I am trying to ask the question a bit differently - given mobile safari on a page, can I somehow run an external javascript on that page and debug this external javascript? I suppose that Safari Web Inspector could help with that? Thanks.
(This is a slightly customized answer from your other question)
The official documentation for this is [here][1].
It's not too hard, although recently I've had an issue with the page showing up when connected to the iOS simulator. In that case I just ended up using my phone directly. (Apparently you need to start desktop Safari after the iOS Simulator has started to inspect "remote" Simulator sessions)
Ensure that on the device Settings->Safari->Advanced->Web Inspector is on.
(Make sure you've Trusted the computer from the device)
Start MobileSafari on your device.
Start Safari on your desktop, make sure Show Develop menu in menu bar is on in Preferences.
In the Develop menu you will see your device name, say 'BSharer's iPhone'.
select the page name underneath your device name, say 'en.m.wikipedia.org - Wikipedia'.
You are now debugging that device's page on your desktop. The developer page will open and you can debug as if it was running on the desktop machine. You should now see all the JavaScript that is available to that page and set breakpoints.
(The app extension requires the debugger; statement because we don't see the javascript files injected by the app extension. You can still use the debugger statement but it's not usually necessary.)

Possible difference between "Safari on iPad" and "Safari on iPhone" on JavaScript

I have a project involving Google Maps API and some JavaScript codes. The page is build upon jQuery Mobile. I have the web page tested on Chrome, FireFox, Opera and IE on desktop, and on various mobile phones as well.
It doesn't work only on iPhone (4, nor 5). I mean, it's all good under Android, WP8, Chrome iPhone simulator, and even working perfectly on an iPad (Air, if matters).
It appears to be that Google Maps API is not loaded at all. It should be initialized after page load, and then show a map inside the page. But there's nothing. Also there's no alert about querying user's location, which does happen when using an iPad.
The safari on iPhone is the same version as that on my iPad, OS 7.0.4, Apple WebKit 537.51.1, Safari 9537.53. The devices are connected to the same WiFi network. Due to lack of a Mac I can't use the remote debugging function right now.
Any brief ideas about what's wrong with the application? I suspect it's inside JavaScript but I could be wrong.
Thanks.
I've found the problem and solved it.
It is because the location service is disabled for safari (by default), on iPhone. However it's enabled on my iPad (not sure if it's default) so that I get different reaction from the location service API.
I have to put an alert message for iOS users when detecting that location service is disabled. After it's enabled in the privacy settings on the device, the application works perfectly on all devices.
The patch code is here for those who need.

How to enable javascript console on Android 4.2.2

I'm trying to enable the JavaScript Console to debug a webpage in the stock Android browser on a Samsung Galaxy S4 running 4.2.2.
On the S3 I just type in about:debug in the address bar and it comes up but it doesn't work on the S4, it seems to do an autocomplete for chrome://debug.
Firstly it would be great to know how to get the console open and secondly why would Chrome's autocomplete be coming up for the stock browser?
Thanks
I don't know how to activate this console.
But I have used a tool that can allow you to remote debug any browser with limited changes to your web page (only add one script).
It is VorlonJS and you can find demo here: http://vorlonjs.com/#demo
try this link remote debugging chrome.
Well if are you developing on android greater than 4.0.3 you can type adb logcat and you would be able to catch your console.log or errors.
Or if you want chrome enables mobile screen to test the view.It depends if you are testing the functionality or the graphics

how to emulate a mobile (android) browser on desktop

I'm trying to debug a problem that only occurs when I access a mobile website from a mobile browser. I strongly suspect that the root cause of the problem is due to caching that occurs when you access the same page several times.
I can reproduce the problem consistently when I access the page from my Android phone, but if I use a desktop browser the problem never occurs.
Because I can't use any developer tools on my Android phone, I really need to reproduce the problem from a desktop browser, so that I've some way of debugging into it. I've already tried using both Firefox and Chrome with an appropriate setting of the User-Agent header (so that the mobile version of the site is displayed), but that doesn't work.
Is there a better way to emulate the behaviour of a mobile browser from the desktop, in a manner that allows the client-side code can be debugged? FWIW, I'm fairly confident that I could also reproduce the problem on an iPhone, but don't have one available.
You can use a debugger on your phone, using chrome debugger.
Nowadays, you can just navigate to chrome://inspect/#devices after plugging your device in.
If that doesn't work, you can use the old method:
Connect your mobile device to the host using a USB cable
On the mobile device, launch Chrome. Open Settings > Advanced > Developer tools and check the Enable USB Web debugging option
Issue the following command in the console on your host machine to enable port forwarding:
adb forward tcp:9222 localabstract:chrome_devtools_remote
Open desktop Chrome and navigate to localhost:9222
Choose the page you need to debug
You can now start debugging and profiling mobile content in the Developer Tools on your desktop

Categories