Is it possible, in JavaScript, to detect when the screen is turned off in the Android & iOS browsers

There is few options to check it: Using Visibility API Using focus and blur events to detect browser tab visibility: window.addEventListener(“focus”, handleBrowserState.bind(context, true)); window.addEventListener(“blur”, handleBrowserState.bind(context, false)); function handleBrowserState(isActive){ // do something } Using timers, as mentioned above

Autostart html5 video using android 4 browser

It seems that Android 4+ changed the requirements for the play() method to require user interaction. If you trigger play() from within a user event handler (eg. touchstart or mousedown), then you can play the video as long as you run it inside the same event loop. This means that you shouldn’t use async triggers … Read more

can we get chrome browsing history/bookmarks in our android app

Yes it is very much possible. Use this uri: content://com.android.chrome.browser/bookmarks instead of Browser.BOOKMARKS_URI String[] proj = new String[] { Browser.BookmarkColumns.TITLE,Browser.BookmarkColumns.URL }; Uri uriCustom = Uri.parse(“content://com.android.chrome.browser/bookmarks”); String sel = Browser.BookmarkColumns.BOOKMARK + ” = 0″; // 0 = history, 1 = bookmark Cursor mCur = getContentResolver().query(uriCustom, proj, sel, null, null); mCur.moveToFirst(); @SuppressWarnings(“unused”) String title = “”; @SuppressWarnings(“unused”) … Read more

Android WebView VS Phone Browser

This article outlines your speculation about stock browser differences between manufacturers, that absolutely is true: 5 reality checks every team needs before working on Android webkit …which does cause trouble and mysterious/difficult to diagnose/solve problems. As far as your issues with your WebView implementation: Version of jquery-mobile may be an issue jquery-mobile loaded into an … Read more

WebView link click open default browser

I had to do the same thing today and I have found a very useful answer on StackOverflow that I want to share here in case someone else needs it. Source (from sven) webView.setWebViewClient(new WebViewClient(){ public boolean shouldOverrideUrlLoading(WebView view, String url) { if (url != null && (url.startsWith(“http://”) || url.startsWith(“https://”))) { view.getContext().startActivity( new Intent(Intent.ACTION_VIEW, Uri.parse(url))); … Read more