android-browser

background:cover not scaling on mobile browsers

▼魔方 西西 提交于 2019-12-13 01:29:59
问题 The project I'm working on is a 1 page website that is split up into sections, the first section is the masthead with a background image applied to it. My goal is to make this image responsive on resize, so I set the background-size property to cover When scaling the viewport on a desktop browser, the image scales accordingly. However on mobile clients (tested on iOS 7 and Andriod Froyo/Kitkat) the image seems to stay at it's full width/height, becoming very pixelated and distorted. example:

Android get browser's address

北战南征 提交于 2019-12-13 00:55:02
问题 Is there a way to get address from the browser that user is trying to open using some listener or something, and if the address is in the database and the address is banned, stop loading that address in the user's browser? 回答1: Android is a flavour of the Linux operating system and what you want to do is essentially create a firewall. To allow the creation of a firewall in Linux, Netfilter is provided: Netfilter is a set of hooks inside the Linux kernel that allows kernel modules to register

How to Dismiss Certificate Selection Popup Dialog in Android Chrome Browser permanently

99封情书 提交于 2019-12-13 00:54:10
问题 I am trying to open a webpage in Android Chrome Browser. I get a pop up Dialog with Choose Certificate Pop up in which I have set a certificate (I Have only One Certificate). Whenever I close the browser and open it again I get the same popup which I have to click either Allow or Deny . Its a pain if we try to run this selection whenever we re-visit. How can we avoid this (Dialog pop up set up set once and use the same certificate for future requests). Thanks in advance for sharing your

Android browser media player (stagefright?) displayed media name

与世无争的帅哥 提交于 2019-12-12 09:49:16
问题 When the Android browser opens a media file it can play, the built-in (stagefright?) media player opens up to stream it. A title for this media is displayed on the player dialog, based on the URL. The URL in this case was http://10.0.37.195/waug_mp3_128k . The media player simply uses the last part of the path as its title. Is it possible to change the displayed title? I have tried a Content-Disposition header, but it had no effect: Content-Disposition: inline; filename=Some Better Title 回答1:

How do I programmatically access bookmarks in Opera and Mozilla browsers for android?

左心房为你撑大大i 提交于 2019-12-12 02:33:32
问题 From what I read, I need the bookmarks URI from each browser: private final Uri CHROME_URI = Uri.parse("content://com.android.chrome.browser/bookmarks"); private final Uri MOZILLA_URI = Uri.parse("content://org.mozilla.firefox.db.browser/bookmarks"); private final Uri OPERA_URI = ?; I managed to find chrome's bookmarks uri, I have not tested mozilla's bookmarks uri yet, but that seems to be it and as far as opera I did not find anything. Any thoughts on what it might be? UPDATE: I'm using

Javascript: detect monochrome display

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 13:30:59
问题 I've been testing an HTML5 webapp on eReaders, and I got it mostly working, but the colors are all messed up (it's monochrome). My app uses lots of colors with an update every second. I need this to run on colored displays as well, so I need to detect if it's monochrome. The eReader that I'm using is made by Sony, and it reports screen.pixelDepth and screen.colorDepth as both 16, which IS different than most other devices I support (24 and 32 are common). My ideas so far are: Always display

SVG getIntersectionList returns null

那年仲夏 提交于 2019-12-11 08:47:58
问题 In the context of a SVG file, the following JavaScript: var svg = document.rootElement, hitRect, hits; hitRect = svg.createSVGRect(); hitRect.height = 1; hitRect.width = 1; hitRect.y = 100; hitRect.x = 100; hits = svg.getIntersectionList(hitRect, null); always assigns null to hits , regardless if there were any intersections at all (in the case of no intersections, it should've been an empty NodeList). Has anyone stumbled in to this problem? Is there a known workaround for hit-testing a SVG

Clear chrome browser history programmatically

↘锁芯ラ 提交于 2019-12-10 23:49:53
问题 I have tried using the following code but it doesn't work with chrome, only the old browser. Browser.clearHistory(getContentResolver()); 回答1: this code work for me private void clearHistoryChrome() { ContentResolver cr = getContentResolver(); if (canClearHistory(cr)) { deleteHistoryWhere(cr, null); } } private void deleteHistoryWhere(ContentResolver cr, String whereClause) { String CONTENT_URI = "content://com.android.chrome.browser/history"; Uri URI = Uri.parse(CONTENT_URI); Cursor cursor =

Twitter web page remains open after closing the app

二次信任 提交于 2019-12-08 09:26:57
问题 Twitter auth is working fine in my app.But when I tweet and close my app,the webpage of twitter is still open in browser.What is the problem? How to close this page(Browser). 回答1: After successful login is your application getting started. If no means callback url is not set properly and due to which this is happening. 来源: https://stackoverflow.com/questions/12889582/twitter-web-page-remains-open-after-closing-the-app

How to Avoid Loading Local Page in New Tab on Default Android Browser

≯℡__Kan透↙ 提交于 2019-12-08 08:39:07
问题 I want to do the opposite of this: Android Browser: open several URLs, each on new window/tab (programmatically) In there, the answer was to use b.putBoolean("new_window", true); but what is the equivalent for same tab or same window? For some reason I'm only having this issue on tablets (tested on 3.1 and 4.0.3). We open URLs correctly on the same window or same tab on phones. Please don't tell me to use a webview, what I'm trying to do is do things in the background while a user is browsing