I would like my app not to vibrate if the phone is in silence mode. However I could not find any method in Display that tell you if the phone is in silence mode.
Is it possible and if so how can I do ?
Any help appreciated,
I'm not sure if this will work but when you play media you can query the volume and it might return 0. I would instead both play the media and vibrate which should solve that.
Related
Is there a way to detect Android's dark/night mode? Additionally, is there a way to inherit dark styles?
I see a build hint here android.theme that can be light or dark. Its description also says it might be dark in the future but no further explanation is given
Thanks
No. These are both things that we need to provide a better solution for on iOS and desktop too. I suggest filing an RFE for this.
That build hint is part of a legacy from the Android 2.x days and shouldn't be applicable.
I know that Apple does not provide a way to detect the state of the iPhone mute/silence switch in iOS 6. In fact, I only want to detect the state of the iPhone which is mute or not now. Does anyone have some method to detect it? Many thanks!
well i've made a responsive website which handles well in mobile devices. Now there are some Phonenumbers on the website which my cliƫnt would like to be clickable on any Phone so the visitor can call directly. I found that making a link of the phonenumbers works like so:
make a call
This triggers mobilephones to call the number. But it also triggers the webbrowser on any other device to follow the link, which results in "page can't be found"
I'm looking for a good anwser to tackle this problem. I've been searching for a while now but i'm getting a bit tired and frustrated.
I think i've come with a solution but i don't excactly know how to put this in the html.
There are several ways to conditional comment browsers in html. If i could do this with the link part and rule it out:
<!--[if any **none mobile** webrowsers: don't read:]>003164646464
And all mobile browsers read the link.
It seems to me, that this is the most easy way to do this, but i could be wrong...
I hope that someone can give me any pointers, I really appreciate your idea's and help!
THANKS!
There is no easy way to achieve this. You can use different approaches depending how accurate you want to be:
WURFL - most accurate, allows to check user-agent and get browser / device capabilities
You can try parsing user-agent by your own detecting OS - check this answer Detecting a mobile browser
Use css media queries to target devices with small screen
Unfortunately there is no silver bullet for this (at least I don't know one).
I have a problem playing .pls live streaming channel on windows phone 7 media element. i asked this question before as well and someone said that you need to parse the address inside .pls becuase .pls is a playlist format and you have link to play audio inside it but when i parse: http:// 69.175.103.226:8540/listen.pls i get http:// 69.175.103.226:8540
you can check this by typing this on browser http:// 69.175.103.226:8540/listen.pls and download .pls and open with notepad and it is not being played by windows phone
any idea how to do this? kindly help me i am stuck
Thanks
From what I can tell it is a 48kbps MP3 stream. I don't see why it wouldn't work unless you do something wrong with the way you are setting the media source.
Should be:
mediaElement.Source = new Uri("URL_TO_STREAM",UriKind.Absolute);
mediaElement.Play();
How to disable monitorOrientation property in sencha touch globally?
Please help.
If by disable you mean prevent the orientation from changing then it cannot be done in a clean way (at least on the iPhone platform).
You could (possibly) investigate the idea of re-oritentating the display when the orientation changes as described here, although I'm pretty sure iOS won't let you prevent it (you may have some luck with Android)
This thread poses a similar question.
You can disable, block the orientation in portrait/ landscape or other using :
For Android if you open with Eclipse: The AndroidManifest under your "Application Nodes" => Screen Orientation
For all system (IOS, Android, BlackBerry, WebOS ... ) : You can do this using Phonegap : it let you encapsule your app in a WebView using HTML5.
You just have to create a config.xml like this : https://build.phonegap.com/docs/config-xml
and add this : in the balise.
Next, you just have to compile your app using http://build.phonegap.com . It's free, easy and fast to use.
Hope this help you ;)