Detect mute (silent mode) in IOS6 - ios6

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!

Related

Codenameone: Adapting the app when iOS dark mode is activated

Does anybody know if there is a way in an CN1-App to find out, if the iOS dark mode is activated?
Not at this time. It's something we'd like to add in the future possibly as a cn1lib. You can probably implement this yourself using a native interface e.g. by using something like this: https://stackoverflow.com/a/59431185/756809

Codename One : check if phone is in silence mode

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.

Twilio WebRTC Video freezing on Mobile Web

I've implemented the Twilio Video quickstart code in my project using ReactJS and after a few tweaks, it all seems to work fine on chrome and firefox from my computer, but when I try to use either the preview or make a call with another client from my mobile web browser, the video does not move. It is stuck, but the video streams will work fine if I am moving the screen with my finger or if my finger is just on the screen, but will freeze on it's current frame the moment I stop moving the screen. I am not sure if this is an issue with the way Twilio attaches the video or if there is just something about mobile browsers that I don't understand when attaching video streams.
Thanks for the help
So there are a few things that could be going on here. Currently and also for the foreseeable future, Twilio Video will require the A6 system on chip, so older devices like an iPod Touch (5th gen) for example, would not supported.
https://www.twilio.com/docs/api/video/system-requirements
You might try to modify the bitrate indirectly through modifying the resolution. There is some sample code (in Swift) demonstrating this API:
https://github.com/twilio/video-sample-ios-capture-render/blob/master/VideoSampleCaptureRender/ViewController.swift#L205
Lastly, reporting of connection information through the conversation delegate does receive statistics:
https://media.twiliocdn.com/sdk/ios/conversations/releases/0.22.0/docs/Protocols/TWCConversationDelegate.html#//api/name/conversation:didReceiveTrackStatistics:
however there is not an automatic way to adjust the resolution based on these statistics.
Hope this helps to point you in the right direction. Please let me know in the comments what you find out.

AVAudioSessionDelegate beginInterruption is not called iOS 6.0.1

I am creating an iPhone application with music player. I used AVPlayer for creating music player. The issue is beginInterruption method is not called in iOS 6.0.1 when a phone call arrives. But endInterruptionWithFlags:flags called. In lesser versions of iOS it is working fine. And one more thing I noticed is, if a phone call come when the app is in background, beginInterruption method is called!! But not when the app is active.
When I searched, I found the same issue is noted by some other also, and they stated as it is the bug with apple. And the issue is fixed in iOS 6.1.
So, what should I do? Should I try to fix the issue manually or tell the users to update the OS? At the same time, why it is working when the app is background? Any idea? Please help.
Thanks in advance.

On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480?

On iPhone5 [[UISCreen mainScreen] bounds].size comes back as 320x480. Why. In all the posts I'm reading, people are saying that it returns the correct screen size. What is going on here? Am I missing something in the .plist file or something?
BTW I am hand coding the GUI, so there is no XIB.
Unless your app includes a Default-568h.png in it's bundle, it will run inside a 480 point high legacy screen sandbox on the iPhone 5, and can't draw or see any dimensions outside that sandbox.
Note that including this Default-568h.png is only allowed when building an app using Xcode 4.5 and the iOS 6 SDK (or, presumably, later) for submission to Apple's App store.
Added: When building with the iOS 8 SDK (or later) and running the app under iOS 8 (or later), a LaunchScreen.xib will also remove the 480 height sandbox.
It would appear that having a launch image in place is a prerequisite to [[UIScreen mainScreen] bounds] working properly on iPhone5. This is an issue for those of us dependent on design teams for our images. It looks like you just have to hack together a launch image and put it in place.
Is there really no better way? Anyone?

Resources