How to capture video from my foreground service android? - java

I am writing a screen recording program like ZD soft Screen recorder
For this, I need to record video in the foreground service so that I can record video from all applications (outside my application environment).
How should I do this?
I tried different ways but did not get an answer

Related

How to Record Current Screen In Android, Not using Camera

I want to implement a function that simply records what is currently being viewed on my phone, rather than using the camera.
But most of the samples use MediaRecorder and camera in parallel, I don't think this is what I need at the moment.
I've seen the MediaProjection API, but it runs in an Activity . I want to implement a screen recording function for a live streaming app I am currently developing. And this should work inside a Service.
Can someone give me some help?

Is there any way in android through which i can play two audio at the same time in android ? one on my app and one on another background app

Is there any way in android through which i can play two audio at the same time in Android?
For example if a song is playing in background say on spotify and I have to play some audio in my app , then both should be played( maybe dimming spotify's audio) instead of pausing spotify ?
Normally what happens is if we play audio on one app , the other app's audio get's paused, how to make them play simultaneously.

Screen recorder android without notifications

I have an app, where I need to record screen. I used media recorder api, but i found out that it uses a buffer from gpu, so i cant capture part of the screen and hide notifications. It seems to me that it is possible to do this using ffmpeg, but I could not find information

Can you write an app that records the screen of a specific app in Android Java?

I'm try to make an android app that records specify app's screen and audio.
How can I record the screen?
Here's an example for using MediaProjection API for screen recording on Android: GoogleSource You can add Service class to run in a background check when a certain app package is opened. Here's an example to check an app running on Android. Stackoverflow Example

android-developing music player

I'm developing an Android music player and so my app should be able to detect volume key presses even when no Activity of my app is open and the screen is off(a background service is playing the media). I was thinking that it seems crystal clear that i should detect volume key presses from my service but as I searched the net, I got that it is impossible(e.g. as described here). so what should I do?!!!
You'll need to create a service, because activities don't run when screen is off
You need to run player in service. Also, you must set media type as music.

Categories