iOS - Allow my app to display information on lock screen? - ios

Is it possible to display information on the lock screen from within my app? For instance, a countdown timer? I know Apple's built in apps, like the clock, can do this. But is it public API available?
And no, I am not talking about Push or Local Notifications. I want to display and actual countdown timer for my purposes so that users can shut the app and get an update on the timer by glancing at the lock screen.

No, this is not possible as far as I know.
One way to access the lock screen is by playing audio and displaying media artwork, so I'm wondering if you could create a playlist that changes songs very fast and the album artwork is an image of the current time.. Probably this isn't even close to what you want, but I'm afraid no public API can do what you want.

Related

Flutter - How to have audio play when phone screen is off

I am building an app where there is a person is speaking, kinda like a podcast, and I would like the listener to be able to listen when the screen is off.
I am using Flutter, and the media player is complete, but if i turn the phone screen off, the media stops.
I have no idea how to treat this so when you turn off the screen, the media will still play.
You need to use a background services plugin. I recommend the audio_services plugin available here: https://pub.dev/packages/audio_service#-installing-tab-

Trying to create an Xcode Objective-C function that records a video capture of my UIView contents and saves to phone

I'm trying to create an Xcode Objective-C function that can be called from a button tap, that will record the contents of a UIView and its subviews (or a fixed section of the screen e.g. 320x320 in the center) and then allow the user to save the video to their iPhone camera roll. I also want to include the audio that is being played by the app at the time of the recording e.g background music and sound effects.
I'm having trouble finding any info on this as their seems to be a lot of people trying to record their running app for external purposes like the app store video preview. I need my video captured within the app, to be used as an app feature.
Does anyone know if this can be done or know a website or tutorial where I can learn what's needed? Thanks
I know this post is two years old, but for anybody who comes along who might need to record their iOS app's screens and save them to the phone's camera roll or even a specific URL, take a look at https://github.com/alskipp/ASScreenRecorder
I've tried it and it works! The frames per second aren't 60 so I don't know how well it would work if you were trying to record an action game, but it's still pretty awesome.
You can't do that with just one function, check that project:
https://github.com/coolstar/RecordMyScreen

Can we play sounds in the background at a particular intervals in the iPhone app?

In my app I need to play some sounds like beeps at a particular intervals of time (May not be uniform intervals), even the app is in the background. I have gone through the google and many suggested to use AV Foundation’s AVPlayer. I have gone through the following tutorial also.
http://www.raywenderlich.com/29948/backgrounding-for-ios
This tutorial explains how to play a queue of items.
But in my app there will not be any continuous music. Just we need to play some sounds while the app in foreground or background.
Simply i need to play sounds as RunKeeper does.
Please help me out.
You can try scheduling a local notification and providing a custom sound: https://developer.apple.com/library/ios/documentation/iphone/Reference/UILocalNotification_Class/Reference/Reference.html. This will also display an alert in notification centre / lock screen though.

Programmatically refresh screenshot in iOS7 multitasking screen?

I have a music player app which implements background audio. I’m trying to update the screenshot in the iOS7 multi-tasking switcher when the track changes. So, if I background the app during Song A, it finishes and Song B comes on, if I then go into the tray I’d like to see a screenshot showing Song B’s artwork, title, etc.
I’ve done some digging and not managed to find any way to tell iOS to update short of implementing Background Fetch and going all out with that. Is there another means of doing this, something I can call to tell it to refresh it when my tracks change?
Apple does not provide any means of doing this. Even iOS own media player does not have this ability.

Screen Capturing IN IOS

I have searched it on net many times but didn't get a proper solution. I want to implement screen recording video in IOS. Let me make it more clear. Suppose I am playing a game and after playing that game , I want to replay that game to check how well I have played the game. So ultimately I want to record every action performed on screen. Switching from one screen to another , coming back to root screen etc. Every action must be recorded. I am tiered of searching it on google. Can anybody tell me how to implement it ?
Any help will highly be appreciated.
Thanks in advance.
this might be helpful checkout
http://codethink.no-ip.org/wordpress/archives/673
Been there - just record the user actions and everything that affects the game. When you want to generate the video, just replay every user action in your world and instead of rendering the UI to the screen, generate video frames.
One of the typical problems is adding audio (music/sound effects) to the video but that would require a separate questions.
If you don't want to generate a video file but only replay the actions on your device, then you can just disable user interaction and replay the user actions directly.

Resources