Codename One Capture Audio Permissions on iOS - ios

We are trying to capture voice notes on one of our app using the Capture.captureAudio() method.
On iOS, the recording starts before the permission prompt comes up resulting in a stuffed audio file.
Is there a way to prompt for the permission before the recording starts or are we doing something wrong.

Related

Screen recording when my iOS app is in background with ReplayKit

I have tried Broadcast Extension. I have added that extension via target. But, I don't know how to record when my app is in background.
Two ways I am trying to record:
Via Control center: I can see my app’s target name, after selecting that name, then I start to record by clicking Start Broadcast, next by clicking Stop Record, but my video not getting stored either in Camera Roll or in my app. Ref Link: ReplayKit's RPSystemBroadcastPickerView not showing preferredExtension
Via my app: Once press Start button, recording get started, I am trying to record background from my app by clicking home button, obviously recording has been stopped. Ref Link: https://medium.com/#giridharvc7/replaykit-screen-recording-8ee9a61dd762.
There is no "direct" way to store video in your app while it is in the background. ReplayKit version 2 allows you to get video sample buffer pieces in the app extensions that calls "Broadcast Upload Extension". When you say "Via Control center" it means that you start broadcast (not recording), and at the same time iOS finds your app-extension (not your application) and launch it, then begins send video sample buffers to the extension. On this step you need to decide what to do with these buffers.
I can propose two solutions for you:
you can try transfer buffers to the server (and download video when
main application will be launched)
you can try save buffers to the file using App Groups (to share
this data with the main application), you can find example
here.
But you need to know that broadcast extension has been designed for buffer transferring, not to store or re rendering or compress or recode buffers. Extension has a lot of limitations based on CPU time and Memory usage (±50 MB), you can try to do anything there but if it is "heavy" operation iOS will close the extension.

iOS Twilio place audio file during a call

Is it possible to play some audio files, one after the other, when the connection is already established? I'm writing the app for iOS. do outbound calls is working. the best way should be to play an audio file instead of the microphone input. the microphone will not be used for this app...

I Want to access iPhone in built app "Voice Memos"

In my app there is a recording option.
I written code to record the voice by using AVAudioRecorder it will work fine, but my client requirement is it opens the native Voice recorder in ios device that is "Voice Memos". As per my research so many answered that we are unable to access Voice Memos app. I am confused.
Can u please help me there is an any way to access Voice Memos.
Till date it is not allowed to access voice memos recorded by native ios recorder. The best option is to use AVAudioRecorder and let the user record their own memos in your app to upload to the server and access these to show the recorded memos.

Access to microphone for recording via code, iOS

In my App am using AVAudioRecorder for recording. There is no problem regarding the recording. When I play my app for the first time, the problem is that an alertview pop ups, regarding allow/dis allow the microphone to be used.
I want to have
1) control over this default alertview, so that my recording and timer (a label that is used to show the seconds, audio recorded) starts only when I click on Allow microphone,
OR
2) need to set microphones available for the app, so that It doesn't prompt the alertview asking to allow/dis allow microphone.
I searched internet, stackoverflow, but didnt get any thing related to this post.
Read some posts, but they were regarding displaying the status, that microphone is available for app or not, which is not of that much use for me.
As John mentioned in the comments it is default behaviour for the app to ask for permission to use the microphone and this cannot be changed. However you can however check to see if permission has been granted.
You should probably have a look through this question as it explains how to check and see if access has been granted to use the microphone. You can then start your recording once permission has been granted.
Detect microphone permission

Can I save a stream-only track locally for offline capability?

I am developing an iOS app that will play music from soundcloud. I want to give the user the option of an offline mode so he/she can play music even if there is no connection available.
it is technically possible to download the streamed mp3:s locally (I have already implemented it) but will Soundcloud allow me to do it? I have no intention of making these mp3:s accessible outside the app.
The problem of using a downloaded copy instead of the streamed track would be that the play would not count. Is there a way to register a play without actually playing the track?
I have tried to reach them through mail and twitter but I have got no reply yet.
Any thoughts?
Short summary of nickf:s comment above:
this is expressly disallowed

Resources