Flutter (Screen recorder) Securing Music stream App, IOS & Android - android

Is there a flutter solution to securing music app from screen recorder (Even the app runs in the background), like apple music app did, stop the music when you start screen recorder. We have tried windowmanager package & secure application but no one works in IOS.
We have a mobile app to stream music, the app implement in-app purchase, every song should be bought before listening, and the content is exclusive for the app. that's why we need to secure the app, we have searched a lot for flutter packages and native implementations but we haven’t find a solution for IOS specific .

You should implement this natively for iOS.
Use isCaptured property in UIScreen to know if screen recording is happening (you can do this for iOS 11+)
You can use Key-Value Observing to know when isCaptured changes
Apple says:
To prevent the system from recording the audio portion, observe the isCaptured property and take appropriate action in your app as described...
see the documentation
EDIT:
I've found this library flutter_forbidshot it is helpful, and I think it is suitable for this problem.

Related

Xamarin Forms allow music from another app on Android while playing Video

I am facing the issue, that my App Blocks Background Music when using a MediaElement for Video usage.
The bottom line is that I want to play a silent video and the user should still be able to listen to spotify and etc. in the background
In iOS the procedure to allow Background Music is pretty straight forward. On Android I cannot manage to get it working.
I already tried different xamarin.forms libraries where i set the video to mute or the volume to zero.
But nothing seemed to work. I tried for example octane, mediamanager and several other videoplayers.
For this reason, I would now like to try to implement it in the native Android code.
But I haven't found anything about it in various forums.
Xamarin Forms Version is 4.8
You could use a service to stream audio to play audio while your application is not visible or under the lock screen.
You could check the blog about this and download the source file from the Github. https://devblogs.microsoft.com/xamarin/background-audio-streaming-with-xamarin-android/
I test with the sample in the thread i done before to play the audio. libVLCsharp.forms can not play Android resource video file while iOS can
When i make the app which play music in the background, the music would play as well.

Do mobile apps always indicate when they record audio?

In iOS and in the latest Android version, there is always a persistent notification on the screen when apps access the microphone while running in the background. This makes perfect sense, since mobile users could be secretly eavesdropped on otherwise.
I am wondering whether apps that are active, i.e. in the foreground, are also required to visibly indicate when they are using the microphone. For example, the "rec" button in my recorder app turns red while it is recording. But could the app also use its mic permission and record audio without showing me any visible indication if it wanted to? Or is there anything in iOS or Android prohibiting this? I couldn't find anything in the documentation.
I believe once permission is granted in Android, app is able to record using mic without showing anything on the screen. Can't speak for iOS.

Android how to keep my music playing even when the phone is lock and sleep

am new in mobile app development, but have try do develop online radio app using Android Studio, but when the app is playing the sound from Icecast it use to stop when the phone is lock and sleep.
Also i find it difficult to set the accurate width that can march any app, the one that i set only work for Small Android Screen. The code full the width of small android phone with android 4.0 but on large screen android phone i can see some space beside and at the bottom of the screen.
Main XML Code
You should use MediaSession since its designed to help you control Media playing and controlling media playback. Check the reference and follow steps for using MediaSession.
Universal Android Music Player
This sample shows how to implement an audio media app that works across multiple form factors and provide a consistent user experience on Android phones, tablets, Android Auto, Android Wear, Android TV and Google Cast devices.
It also work on lock screen.
link to sample app and source code
hope this will help you.

Android App with Youtube API. Run the music while app is minimized or the phone in hold mode

I'm a noob in programming Android apps but I did my best and now I made an Android app with my own YouTube API. I am a little bit proud that I can run the app and listen to music. As you may know, if you listen to music with the YouTube app, the music stops when you minimize the App or you change into hold mode. I want my app to still play the music when I minimize it or put it in hold mode (disable the screen). As I am a beginner, I don't know how to do that. I looked at a lot of forums to get some clues but maybe somebody here can get me on a good track.
Any help are welcome and will be greatly appreciated. :)
As per Ibrahim's response in this SO post:
YouTube prohibits running videos in sleep mode, or in background.
However, I would still suggest that you please go through YouTube Terms of Service since YouTube may, in its sole discretion, modify or revise these Terms of Service and policies at any time.

Android 4.0+ RemoteControlClient MetadataEditor Bluetooth

When I bought my new car I noticed that it had a screen that showed metadata information about the music playing through the Bluetooth audio sink. It worked for some apps, but notably not with the app I primary use for listening to music. After some research, and reading posts from this site and some others I was able to determine that this works if the app implements the ICS lockscreen controls with RemoteControlClient and MetadataEditor.
Since the app I use is open source I was able to download the source code and see that the app did not use the RemoteControlClient. my next step was to look at the Google Sample code for Random Music Player and test this on my phone and car. This worked successfully and I proceeded to modify the existing source code for the app I am working on. I copied the RemoteControlClientCompat and RemoteControlHelper Classes into my project and copied the code using these classes into my project's code as best as possible.
Since doing this I have successfully implemented Audio Focus management, Media Button Controls, and the RemoteControlClient / MetadataEditor. The lock screen controls are working and functioning perfectly, however my car still does NOT show the Metadata. Again the BT metadata works with the sample code, but not with my app, and the lock screen controls work without issue on both apps.
Anyone out there have any idea as to why the lock screen controls would work, but the Bluetooth Metadata would not?
Thanks,
Ryan

Categories

Resources