Swift XCode 7 UI how to test camera is on and picture taken - xcode7

I am new to Swift and XCode, and building an app that uses the camera to take pictures.
I would like to test that the camera is on, and also that I have effectively taken a picture. How could I do that?
I am using XCode 7.3.1.

Related

Using GCController with tvOS Simulator

I don't have a new Apple TV, but am working on prototyping a game for it using the simulator. Unfortunately, I can't seem to get GCController to list the Siri remote as an available controller, as the tvOS docs indicate. My list of controllers is always 0 elements long, even if I call startWirelessControllerDiscoveryWithCompletionHandler().
Does anyone have any suggestion or sample code for getting input from the Siri remote?
The current version of the tvOS simulator apparently does not support this functionality. I was able to try my code on a friend's dev kit, and it registered the remote as a Game Controller as expected. For now, the answer appears to be "use real hardware" or "wait for an updated to the tvOS simulator".
You might take a look at https://github.com/csgulley/AppleTVSimulatorController. It is an implementation of Game Controller that I wrote to allow testing with the Apple TV simulator.

Playing online radio using BackgroundAudioPlayer on Windows Phone 8

I want to play songs from a online radio and for that i am using the BackgroundAudioPlayer for windows phone 8. Now i downloaded the sample app provided by MS and modified that a bit primarily to test whether the streaming link is working or not. So, my new AudioTrack object is looked like this one,
new AudioTrack(new Uri("http://live.abcradiobd.fm:8282/;listen.mp3", UriKind.Absolute),
"ABC Radio",
string.Empty,
string.Empty,
null)
This is not working at all. After sometimes it generates TimeOutException but the link is perfectly working in VLC player and other audio player out there.Any solution?
Solved:
Tried Phonesm and it's working perfectly. You can use that for both audio and video streaming. But before building that project make sure that you have downloaded the correct version for MPPF which is v1.2 from here and install as an extension to visual studio.

WP8 toast notification with custom sound

I'm currenly writing an app where I need to use custom sound for toast notifications (which is sent from cloud). MSDN states that the audio clip must be stored in the app's installation directory or local storage folder. So how is this done?
I tried the CopyToIsolatedStorage() code sample from How to play background audio for Windows Phone. It fetches the audio clip correctly but when the toast should be shown the device won't play any audio or even show the toast which indicates that it can't find the audio clip correctly. In the app, I have a method which shows contents of the push notification when the app is in foreground. From there I can see that the toast notification is sent and received correctly with toast.mp3 sound tag. So the problem must be in the app but I can't figure out what I did wrong.
Tl;dr version:
I want to change toast notification sound, my device is running WP8 with Update 3 and I have a 5 sec long mp3. I can't figure out how and where I should put the audio clip.
I dont think you need to copy the sound to isolated storage, just put it in your main project and set it as content. Then in your Push just reference it.
<wp:Sound>toast.mp3</wp:Sound>
Or if it is in the Assets folder in your project do
<wp:Sound>Assets/toast.mp3</wp:Sound>
Note: This only works for Windows Phone 8 Update 3 and later, works fine for all Windows Phone 8.1.
So the problem was that I blindly assumed one can reference to the audio clip with just <wp:Sound>toast.mp3</wp:Sound> or new Uri("toast.mp3", UriKind.RelativeOrAbsolute), as in the MSDN tutorial, when the file is copied to the root of the isolated storage but this isn't the case. You'll have to include the directory where the clip is in your project to the path, in my case Audio\. Thaks goes to WiredPrairie for pointing this out.
So to wrap things up:
Copy the audio clip which you want to use to the isolated storage with CopyToIsolatedStorage() from How to play background audio for Windows Phone and follow the instructions in Using custom sounds in toasts on Windows Phone 8 Update 3 . And remember to include the directory structure to the path of the clip or put the clip in the root of your project.

how to update my applications iOS7?

I am a iOS developer.I have to update my old applications for iOS7.I developed my old apps in iOS6 and XCode4.Now, I try to execute iOS7 ,but doesn't work iOS7.How to compile and execute my old apps in iOS7.How to use XCode5?Do you know any idea?
When you open the storyboard of your application in XCode 5, this will automatically convert the old storyboard with the new one compatible with iOS 7. Then you have to change the old iOS 6 api with the new iOS 7 api.
All information for translate and optimize your old project (code and inteface) are here:
https://developer.apple.com/library/prerelease/ios/navigation/
Apple Transition Guide

using camera class in android in flex

The default camera showing up is the back camera using Camera getCamera
I want to know how to switch to front camera.
Also Camera names length is showing only length as 1 and not 2 , but i am having a front and back camera on galaxy tab, so i think it should show 2 names.
Please let me know a way out to this.
I am using air 3.1 , which is the latest version at present.
and the application is built in Flex 4.6 version
Air for Android only supports the back facing camera -- at least that might have been the case until very recently.
I have downloaded and saved the AS3 API reference from Adobe. On my local copy of the docs, it says this about the Camera.names property:
On Android, only one camera is supported, even if the device has more than one camera devices. The name of the camera is always, "Default."
However, when I look at the docs online, that comment is no longer there. So maybe Air 3.2 (released yesterday) now supports both cameras on Android!
Online docs:
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Camera.html#names