I am rather new to Android development but I wish to receive audio and video content on my phone from a pc. I am trying to record gameplay on my pc, and do not have the money to buy the hardware recorder, and I can not do screen capture and maintain acceptable fps.
What I had in mind was to send my screen and audio to my phone like a second screen, where my phone will handle the saving process, reducing cpu load on my pc. I don't think android phones can receive hdmi output, but I can do this with the USB via the android adb library "pull" command. However this requires that the file already be saved.
I can't seem to find any other way to do this, can anyone recommend a library I could use?
No. USBs are slow. And there is no way to transfer what's on your computer screen to your android device without first recording it on the computer itself and then having to pass through the slow USB device and then slowly writing it to your phone's hard drive. You'll be recording at a solid 0.5fps by then.
Related
Following is the scenario:
Headphones with mic are connected to a mobile device.
What i want to achieve programmatically:
After a call is been initiated, audio from 3.5mm jack should (forcefully) be routed to mobile earpiece rather then headphone speakers, while the mic should be used of the headphones.
I have searched a lot on google but found methods only to forcefully turn on mobile external speakers.
Reference : how to turn speaker on/off programmatically in android 4.0
While, my goal is to turn on earpiece forcefully.
My research from google:
To achieve this there might be possibilities of system (root) permissions, which a third party application might need.
You may have to write a modified audio driver from sources ? As the functionality is based on the operating system.
If it is possible, can any one guide me on this ?
UPDATE
One more reference: Android - Getting audio to play through earpiece
But the above code does not work on all phones.
I have a project where I want to implement live audio stream from users with Android phones in my LAN Network and receive them in my laptop, off which I can filter, reduce noise, control volumes of each and write the audio to the speakers.
Please help. If possible Android and Java.
Before I even attempt to write this android app, I need to know if its possible to do the following with the standard Android SDK library or any known 3rd party library.
Output audio from multiple simultaneuosly playing files to both the wired headphone jack AND bluetooth A2DP at the same time.
Each file/output combination will have its own volume control in the app as well. So if the volume on file 1 is turned down on the headphones but not the bluetooth volume, it still can be heard on a bluetooth speaker but not in the headphones. Same would apply on file 2,3,4 etc
I'm trying to learn computer vision with OpenCV and i need camera to work with but the only camera that i have is on my android phone.
So im thinking about connecting it to my pc (via USB) and using it with my application. Is anything like that possible? Can i take information from camera connected via usb in real time?
I have no experience with something like this. I know i can just record video ,save it,put it on my pc, and use it as resource -bud i would prefer to have real time streaming of video while my application will work in background on my desktop computer.
Will i have to code some android application to get this working?Or can i simple ask for that data from my desktop application?
If you only want to experiment and learn to use OpenCV, you can get an IP Camera app for your phone and then read the image stream from your computer (here's an example of how to do that). That is the easiest "real time-ish" solution I can think of.
I found a simple way to use the a web cam (IP Webcam installed on my smartphone through Play Store) as camera using OpenCV and Java. Here is how: just copy the IP Webcam web link inside the Video Capture. Like this.
org.opencv.videoio.VideoCapture webSource = new VideoCapture("http://192.168.43.1:8080/video");
The smartphone and the laptop should be inside the same Wi-Fi.
My new project is to build an application to use the cell phone camera as the main camera from my PC.
How can I do this kind of stuff?
I thought of using bluetooth, but how my PC define the cell phone as the main camera?
Best reguards.
Depending on the camera phone and its features, you can do it. For my Bluetooth efforts, I've been using A7 hardware and a .NET library Blue Tools from Franson.
I've been able to:
pair devices in code
send/push images to the phone (probably the reverse would work, but I didn't try)
discover devices automagically
serial comm
network com
install as a network driver
Well on the Bluetooth side of things you might need a program running on you phone to forward the images. Or you might find that there's a Bluetooth program already running and providing that service, for instance the Bluetooth BASIC IMAGING PROFILE (BIP) (1) profile includes the usage scenario: "Use of a mobile phone to control the shutter of a digital still camera and immediately examine the result on the phone’s screen. In the present scenario, any other portable imaging device could play the role of the mobile phone."
So first you need to find if the phone supports BIP. You could for instance use the SdpBrowser sample application in my 32feet.NET .NET Bluetooth library to see what services the phone is advertising. Otherwise perhaps its documentation will tell you. You'd then have to find out whether the BIP service on your phone supports that scenario.
On the PC side you might need some driver level software to allow any application to use the remote camera. You might start by just allowing your own application alone to use the camera.