smartphone

Cordova - Checking WIFI connection to internet

允我心安 提交于 2019-12-01 09:47:29
问题 I use Cordova to develop a smartphone application. In this app, I need to check the internet connection before send request to a server. In order to do that I use the Cordova Connection API, but in the case that the device is connected to a WIFI network with no Internet connection, this API say that we have WIFI connection, is there any way to check if internet is available on the WIFI network ? 回答1: Send an Dummy ajax request before you send the actual request, If you get and Error Code as

Detect whether the loading image is taken from camera directly, when using smartphones

主宰稳场 提交于 2019-12-01 09:47:23
问题 I am using html, tag: <input type = "file" /> On android and on many cellulars I have the ability to get the file directly by taking a picture and save it. How can I know (by javascript code) how did I get the picture (direcly by the camera, or by some files that on my cellular)? I did some workarround, and found exif (http://www.nihilogic.dk/labs/exif/exif.js), but I didn't succeed using it for images loading dynamically, as the site : http://exif-viewer.com/ Need some source code examples,

Recording stereo audio with a Motorola Moto G (or Moto X)

て烟熏妆下的殇ゞ 提交于 2019-11-30 23:52:22
I hope someone could help me with this issue. Some time ago I developed an application in order to record simultaneously the sound captured by the front mic and the back one in a smartphone. Basically, I make the next object like this: AudioRecord audioRecord = new AudioRecord( MediaRecorder.AudioSource.CAMCORDER , frequency , AudioFormat.CHANNEL_IN_STEREO , audio encoding , buffer size ); It worked perfectly for a Sony Xperia Neo V but not for a Motorola Moto G (or Moto X I guess). Taking a look at the documentation I saw the next for the CAMCORDER flag: Microphone audio source with same

Android Studio: what's causing logcat battery power supply logs?

百般思念 提交于 2019-11-30 18:28:39
I have an Android smartphone connected to my Mac using a USB cable. When running Android Studio, the following appears in the LOGCAT. These lines continually repeat, sometimes in a slightly different order. It's not clear to me what's causing this and how I can fix it... 08-09 16:17:31.554 2208-20167/? D/NetlinkSocketObserver: NeighborEvent{elapsedMs=11269730, 192.168.1.254, [5464D91A00EE], RTM_NEWNEIGH, NUD_STALE} 08-09 16:17:32.829 27970-27970/? E/NEW_BHD: Battery Power Supply logging Daemon start!!!!! 08-09 16:17:32.830 27970-27970/? E/NEW_BHD: Cannot run on production devices! 08-09 16:17

Developing an Android smartphone app - on which devices would YOU suggest to check the app? [closed]

冷暖自知 提交于 2019-11-30 13:34:25
问题 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 . before publishing a new app on the market, on which devices would you suggest to check whether it runs fine or not? What are your

Detect device and swap the CSS file - jQuery

坚强是说给别人听的谎言 提交于 2019-11-30 09:17:12
My web application target to major Smartphones and I need to change the CSS file according to device (if there are issues in the UI need to hit them), and I’m planning swap CSS using following jQuery. Just want to know whether is it a best practice and good in performance? <link rel="stylesheet" href="basic.css" type="text/css" class="cssLink" /> <link rel="stylesheet" href="general.css" type="text/css" /> <script type="text/javascript"> $(document).ready(function() { // css file based on the device var controlCss; // get the device agent and conver to lover case var deviceAgent = navigator

Developing an Android smartphone app - on which devices would YOU suggest to check the app? [closed]

本小妞迷上赌 提交于 2019-11-30 07:41:56
before publishing a new app on the market, on which devices would you suggest to check whether it runs fine or not? What are your experiences? How do you handle this? Are there some empirical values, for example, do applications that run smoothly on a HTC Desire behave similar on all HTC devices? Are there some devices on which the app should definately be checked? I like to picture myself releasing a high quality product instead of throwing some crap on the market. :) But I suppose I am not the only one who cannot buy like 5 or more devices just to ensure that the apps works fine on every

Android Studio: what's causing logcat battery power supply logs?

六月ゝ 毕业季﹏ 提交于 2019-11-30 02:59:01
问题 I have an Android smartphone connected to my Mac using a USB cable. When running Android Studio, the following appears in the LOGCAT. These lines continually repeat, sometimes in a slightly different order. It's not clear to me what's causing this and how I can fix it... 08-09 16:17:31.554 2208-20167/? D/NetlinkSocketObserver: NeighborEvent{elapsedMs=11269730, 192.168.1.254, [5464D91A00EE], RTM_NEWNEIGH, NUD_STALE} 08-09 16:17:32.829 27970-27970/? E/NEW_BHD: Battery Power Supply logging

Facebook page automatic “like” URL (for QR Code)

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-30 00:52:12
I was wondering if one could construct a URL for automatically liking a Facebook page. Then this URL could be converted to a QR Code so people can automatically "like" your page by reading it with their smartphone. I have been searching a lot, but all I could find so far are commercial services like Spotlike , Likify , Social QR Code etc. I don't want a solution that relies on such commercial services. I am starting to suspect that Facebook has not enabled this possibility for understandable reasons (abuse and such). Still, I was hoping it would be possible to do this somehow, even by just

Detect device and swap the CSS file - jQuery

元气小坏坏 提交于 2019-11-29 14:06:41
问题 My web application target to major Smartphones and I need to change the CSS file according to device (if there are issues in the UI need to hit them), and I’m planning swap CSS using following jQuery. Just want to know whether is it a best practice and good in performance? <link rel="stylesheet" href="basic.css" type="text/css" class="cssLink" /> <link rel="stylesheet" href="general.css" type="text/css" /> <script type="text/javascript"> $(document).ready(function() { // css file based on the