mobile

Keyboard in Android physical device isn’t always hidden while using Appium

删除回忆录丶 提交于 2019-12-10 09:29:02
问题 When I want to hide the keyboard, (because if I don't hide it when I click into a button under keyboard a number from keyboard is pressed instead of the confirm button for example) some times it's hidden ok by the command driver.hidekeyboard(); and other times it's hidden automatically. Other times it tells me An unknown server-side error occurred while processing the command. (Original error: Soft keyboard not present, cannot hide keyboard) 回答1: Use adb command to check whether keyboard has

navigator.geolocation.GetCurrentPosition throws “The last location provider was disabled” error

依然范特西╮ 提交于 2019-12-10 07:46:39
问题 I am trying to create a very basic HTML5 page that grabs the geolocation, but I'm getting an error. Here's what I have inside my 'script' tags: function GetGeo() { if (!navigator.geolocation) { alert("Could not find geolocation"); } else { navigator.geolocation.getCurrentPosition(showMap, function (error) { alert("error encountered: " + error.message ); }); } } function showMap(position) { window.alert(position.coords.latitude + ", " + position.coords.longitude); } The page just has a button

Javascript read keypresses on tablet?

泄露秘密 提交于 2019-12-10 04:04:54
问题 I have this interesting problem - I would like to read keypresses using javascript, but not directed into a text field. This is straightforward on computers and I have that working (As long as the window has focus, the javascript can detect keypresses). However, on tablets running Android and iOS, the operating system ignores the keypresses. The javascript code only receives the keypress data if I am focused in a text field. Is there some way around this? I would like to read the keypresses

Looking for a recommendation for a lightweight mobile HTML5/JavaScript framework [closed]

蹲街弑〆低调 提交于 2019-12-10 03:50:07
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I know the headline is full of buzz words ;-). I am going to develop a web application targeting iOS and Android only (currently). It

Detect iOS5 within mobile Safari (javascript preferred)

我怕爱的太早我们不能终老 提交于 2019-12-10 03:38:50
问题 The new fixed positioning introduced in iOS5 corrupted my webapp and I need a way to detect iOS5 users. How can I detect iOS5? What is the browser agent string? JavaScript preferred. Thanks! 回答1: From the SO question: What is the iOS 5 user-agent string: iPhone: Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3 iPad: Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5

is there a “rails” way to redirect if mobile browser is detected?

不问归期 提交于 2019-12-10 02:43:30
问题 I want to run a user-agent check but only on my homepage (static_controller#home) I have taken a close look at the code: http://www.arctickiwi.com/blog/mobile-enable-your-ruby-on-rails-site-for-small-screens and it seems close but it never gets tied together, its just method creation... I am open to a jquery method but would prefer ruby/rails over js. I only really care about iphone and droid... 回答1: Check out this screencast. They suggest using the following for detecting a mobile device:

Make HTML5 input type=“number” accepting dashes

一笑奈何 提交于 2019-12-10 02:37:02
问题 I want to use the number input type for my HTML form. Unfortunately it only accepts real numbers, no dashes between. Is there a way to make the number input accepting numbers like "1234-123456789" ? 回答1: I recently had the same issue. I got around it by using type="tel" instead of type="text" or type="number". By using 'tel' I was able to get a numeric only keyboard on mobile devices and still be able to use my pattern="[0-9\-]+". Here is the code I used. I hope this is good enough for what

Text insertion cursor (caret) appears above other elements in mobile browser

試著忘記壹切 提交于 2019-12-10 01:02:27
问题 When giving focus to a text input in a mobile browser (tested on iOS Safari and Chrome), the text caret appears over the top of any div s placed on top. Here is a quick, simple example: http://jsfiddle.net/XQf8N/ Here is a screenshot of the effect: What would be the best way of working around this? I tried the answer here: JQuery Mobile: focused input text doesn't respect z-index, appearing above everything else but it did not work. UPDATE After some more digging I also tried to do $("input")

What kind of applications can be created using jquery mobile

故事扮演 提交于 2019-12-10 00:10:30
问题 i'm experienced with iOS application development and a little of Android development. But since most of my apps are asked to be platform independent(run on any mobile opertating system) i'm trying to find an alternate way to shorten development prosses. So, i decided to develope my app using JQueryMobile but i have some questions about it, for instance: Can we create a kind of barcode reader on jquery mobile? Are JQueryMobile apps just for web side or can be installed on device too? Is it

Multiple cell phone alarms, which one covers the other. Which alarm is preceded? How it works?

倾然丶 夕夏残阳落幕 提交于 2019-12-09 23:41:35
问题 Lets say i set up two alarms 09:00:00 (alarm1) 09:10:00 (alarm2) and every alarm can snooze for 10 minutes. Then alarm1 sounds and i snooze it at 09:00:10 so it must ring again at 09:10:10 BUT at time 09:10:00 already the alarm2 is ringing an i snooze it at 09:10:11. what will happen to the alarm1? when will the first alarm be replayed? 回答1: To me the following happened. When it was time for the alarm2 to be activated, the alarm1 actually activated. 1st experiment: I postponed alarm1 and the