I am looking for a way of displaying an analog video stream on an android phone. On a pc/mac/etc you can achieve this using a cheap usb analog-digital converter such as a grabby: http://www.terratec.net/en/products/Grabby_82248.html, and then view on VLC, for example.
Would such a thing work (in theory) on android if the proper drivers were available? (ie. are there any hardware issues which make this impossible?)
Does anyone know if such a device with android drivers is available?
Ultimately I want to make an app which interfaces with the grabby (or similar device) and allows the user to view video on the android and capture and send short clips.
First of all the Android device needs to support USB Host. This limits your userbase significantly.
Then there is the problem with power. Some USB Host devices will be incompatible simply because an Android phone will not be able to push enough power through to port to get it running properly.
I'm not sure about the drivers, but I'm 99% sure it won't work "out of the box".
You should certainly take a look at THIS project. It is pretty similar to what you are trying to do. Maybe you should consider getting in touch with that person.
EDIT:
Based on what it took to get that DVB-T dongle running in the project i mentioned above the chances of creating an app that everyone will be able to simply download and use are EXTREMELY slim. Getting that dongle running required using a modified kernel and special scripts. Of course I could be wrong. You can continue the research yourself or wait for someone with more experience than me to reply.
Related
I'm stuck at home with a rather bad webcam. I was considering upgrading, but then it struck me: phones these days have really good cameras embedded in them. So why not use it as a webcam?
However, as I was researching this further I was really disappointed with the available apps for this. As far as I was able to find, we have Android apps that work roughly as follows:
Present phone camera as a network attached camera. Then you can use local software to use that feed as a webcam. See e.g., IP Webcam. This may be sufficient, but it's a complicated setup, and network latency makes this far from ideal.
The Android app sends the camera feed to an custom host application that in turn creates a virtual web camera. See e.g., DroidCam. This mostly solves the latency problem, but it is still rather complicated, and requiring us to install a specific third party application is troublesome in regard to user privacy. Especially since the applications are closed source.
So, I took the engineering approach and tried to see if it was even possible to improve the situation. As far as I was able to find, Android supports being used as a custom USB accessory. And looking over the USB video class documentation, it strikes me that it should be possible to create an Android app that presents the phone as a generic UVC webcam, such that we do not have to resort to tricks such as the ones above.
Ideally, I would have liked Android to add another USB device option ("Use USB connection as webcam") in addition to debug mode, file-transfer, etc. This seems quite unlikely to happen in the short term however.
So, my question is this: Does an application that does the above already exist? My searching thus far haven't yielded any results, but I might be missing something as googling for this turned out a bit harder than I expected.
Alternatively, am I wrong in my assumption above, such that there is some fundamental issue why an Android application cannot be made to work in that way?
There does not seem to be any complete app yet as of 2020-10, but the parts are mostly there:
https://github.com/tejado/android-usb-gadget has code to switch the Android device into gadget mode (but no UVC yet)
https://git.ideasonboard.org/uvc-gadget.git feeds v4l2 into the uvc gadget output
Sources:
http://www.davidhunt.ie/raspberry-pi-zero-with-pi-camera-as-usb-webcam/
https://www.raspberrypi.org/forums/viewtopic.php?t=148361
https://www.reddit.com/r/androiddev/comments/iabc2o/can_i_use_my_android_as_wired_camera_ie_as_a/g1nrijl/
It appears Google has started to take notice on this issue and are currently working on a "DeviceAsWebcam" service, which is exactly the solution to this problem, as seen in the Android review below:
https://android-review.googlesource.com/c/platform/system/sepolicy/+/2410788
Naturally though, this is a Android 14 feature, so it will like take a while before this is usable on a lot of devices. Hopefully, someone is able to backport this feature to older versions of Android.
If android / the version of Android that comes on your target phone provides / permits use of the USB gadget driver, then libguvc,
https://developer.ridgerun.com/wiki/index.php?title=USB_Video_Class_Gadget_Library_-_libguvc
can be used to "make an application appear as a USB webcam".
Potentially relevant to get you started would be https://stackoverflow.com/search?q=Android+USB+gadget (other SO references to the use of the USB gadget driver on Android).
Background
I'm planning to make an app that casts things (urls, content,...) to chromecast .
I've bought a ChromeCast dongle, and it worked fine using the samples of Google.
The problem
It's quite annoying to have 3 screens to look at while developing such apps, and I'd prefer to have the receiver on the PC side too.
Such a thing would also make it much easier to debug and test.
What I've tried
I've searched for this a lot, and found some Chrome plugins (like CR Cast), but they all have terrible bugs. I've even found a python based solution (here), but I failed to compile it.
I've noticed that there is a reciever side description of ChromeCast in the documentation. Does this have anything to do with a replacement of ChromeCast?
The question
I'd like to know if it's possible to do the testing on the computer itself, including all of the features that ChromeCast has.
Unfortunately there is no replacement for testing a Chromecast other then testing on a Chromecast been developing on CC for 3 years... (If someone knows how please enlighten me).
The receiver web application that is run on the CC references Google JS libraries that are dependent specifically on CC hardware and must run on the devices builtin browser.
I've been in the similar situation where while traveling I had no access to a TV and needed to fix a CC issue. In this case I would recommend just plugging the CC into USB (to power it) and leave the display out of it. The CC has no dependency on being plugged into a display to function and it will operate, stream, log events just the same. Then just access its remote debugger on the CC's IP address and port 9222. Every log regarding its operation will be there and you can inspect the HTML (But you probably know this).
The Chromecast connects to a TV via an HDMI port which is available on most monitors. You may simply connect, if your monitor has an HDMI port. Modern monitors support the latest HDMI protocol, so you will be able to get video and audio. I am currently using this setup using a NEC MultuSync EA275UHD. The output is visible by switching Inputs but there is also a PIP mode on the monitor that allows the screen to be slit to view the Chromecast and Desktop output side by side or with one of them scaled down and overlaid near a corner.
Now, if your computer screen does not have an HDMI port, you can get converters but sometimes you will lose features. A HDMI to DVI for example will be limited to Full HD and not transmit sound. DisplayPort adapters can handle 4K resolution and audio, but read the specs because not all do.
The last and more expensive option is an HDMI capture card or adapter. That will let you see the display on a laptop even. The advantage is that you can even record the output for demos, for example. Those costs from $80 to $400 USD, depending if they can capture 4K and at which refresh rate.
How do you effectively develop, debug, and test an android app that is based on Bluetooth.
I have been googling and searing stack overflow for the answer to this question and I am not getting a clear answer.
I understand that the emulators do not support Bluetooth. I also know of various guides explaining the functions, classes, and such, and I know people have mentioned that setting up a Bluetooth emulator is possible with Virtualbox. I even came across some old projects like BT-Sim that seemed like a way to create fake BT signals (though if my android emulator doesn't support BT, it doesn't help too much)
But no solid guide on how to get this going. It just likes a few scattered puzzle peaces that need to be stitched together. It makes me wonder how app developers reliably make BT enabled apps?
Are there any guides that dissect how to do this process? I imagine the steps to accomplish are:
Create a custom emulator on Virtualbox that can simulate Bluetooth?
Get the AVD Manager to talk to this emulator so my compiled Android code will work with it
Run a Bluetooth simulator to send BT signals over a port in your computer
(I don't really know how to do either of those 3 though!)
My overall goal is as follows:
Create an app that will collect data from a Bluetooth transmitter
But first, create a simulator on my computer that can talk to my android emulator as if it were the real thing
I'll be honest, I do find it odd that the Google folks don't allow Bluetooth emulation on their AVD. I understand not allowing real telephone calls, but I don't see how Bluetooth can be abused like that.
Anyway, any help in setting up Bluetooth would be greatly appreciated and hopefully help many others out there!
NOTE: I am using the standard Eclipse + Android SDK setup with AVD to do my Android development. Planning to use API 10. However, if I need to use a different set up, I am fine. As long as it comes with a step by step guide! That would be very nice.
Old question, but it's still unanswered. If you have a physical device, that seems easiest way to go. If, like me, you don't have a device it's still possible to develop with bluetooth and android.
Download an android x86 iso, load it into virtualbox with bridged network setting and install it.
Plug in your bluetooth dongle and select the device from the 'usb' menu, alternatively you can set a device filter in the vm's settings page.
Now just use adb and connect to it, you can find the ip by going to console (alt+f1) and typing netcfg or ifconfig eth0. You may also need to type adbd on the android console - I do, but I don't see many people mention it so seems it's not always needed.
It still works with eclipse, and is much faster than the emulator. Even when I'm not doing bluetooth dev I use the vm rather than the emulator.
I need to view the live screen of my Android mobile on a Windows PC. My Android phone has a mini-HDMI output. Is there any adapter/software that helps me to achieve this? The applications that I found after searching needs the device to be rooted to control it. I don't want to remotely control the device. I just need to get the live feed from the mobile.
Actually, there are some relatively affordable HDMI-DVI adapters on the market. Couple them with a mini-HDMI to full HDMI cable and you've got yourself a decent hardware setup.
Some notes:
HDMI carries audio and video, while DVI carries only video. However, the two have no difference in video quality, and they use the same encoding.
as Mgamerz said, support for the HDMI outputs on Android phones has been, thus far, dismal. Your phone might have the port, but your ROM might not support it. Furthermore, some apps won't even acknowledge the existence of the HDMI, again, because so few phones have them.
From a hardware and an encoding point of view, this is COMPLETELY possible, but from a software point of view, it is likely IMPOSSIBLE. If you figure out how to do what you're trying, definitely tell as many people as possible.
You're going to need HDMI mirroring, which means you'll need a high end device (most likely dual cores), and support for it is going to have to be built into the rom. I own an atrix, and developers have slaved for months to get HDMI mirroring on it, but only some progress has been made.
Otherwise, unless your device supports it, you won't be able to do it. It's dependent on hardware too.
Edit: There might be some apps to do it but I doubt they will achieve what you seek. HDMI mirroring typically doesn't go past 20fps either (on a dual core 1Ghz).
To use the HDMI port, you'd need something that can accept HDMI input.
Very few computers can do so (except possibly some smart-tv type boxes).
However, there's a good chance that the monitor connected to your computer can. It might even have a spare input.
In other words, displaying your phone's output "in a window" on your monitor is extremely difficult. But by pushing a button or swapping a cable, you may well be able to display your phone's output on the entire monitor, in place of the computer's.
Practically speaking, if you need it in a window, or the device doesn't have HDMI out, the most common solution seems to be a high-end webcam in a fixture to aim it at the device. I saw a presentation that was delivered this way, displaying on very large flatscreen TVs, and didn't even realize that the slides were coming from an Android tablet as seen by an overhead camera until the presenter picked up the tablet and slid a phone into it's place.
http://mymobiler.com/?cat=3
Try this app from mymobiler. it works on motorola atrx 2 with android 2.3.6 rooted.
The site lists only a few supported models but it seems working on other models too.
You can get the full access to the mobile screen in your windows application windows.
It can also capture screenshots and take video of the actions on the screen.
I am trying to do a demo on a android device, but the screen is too small so is kinda hard to do a demo let say in a meeting room with 12 people. Although I can pass the device around the table or just simple borrow or get more devices for the demo purposes.
I understand there are devies where you can buy special USB converter to do TV-out like in iPhone, and some specific devices on Android (e.g. Motorola Incredible?) But I have to demo on a specific device where it runs standard Android build.
I understand I can do it on Android emulator but the screen refresh rate is too slow, as it will send the wrong message to the audience that the app is slow. (Or there is a way to increase the screen refresh rate for emulator?) Furthermore the emulator doesn't support multitouch. (Or am I wrong?)
Not sure if anyone
You do not have many options.
You can use Droid#Screen, but the refresh rate on it is maybe 6fps. I am not aware of any other software projector that is faster.
You failed to mention the "specific device" that you are using, so I cannot comment on whether it has TV-out capability. The HTC DROID Incredible and the Samsung Galaxy S series support composite output -- I use the DROID Incredible for this purpose a fair bit. Most of the devices that have HDMI output only support it for certain built-in apps, such as the video player.
You can rent or purchase a device projector, like an ELMO. These are fairly expensive pieces of equipment purchased new, though I see a handful of used ones on eBay at interesting prices (though watch out -- many seem to lack the AC adapter).
If you can delay the demo several months, you may be able to use a Google TV.
And that's about it, AFAIK.
Or there is a way to increase the screen refresh rate for emulator?
Get a faster computer.
Furthermore the emulator doesn't support multitouch. (Or am I wrong?)
I am not aware of a way to simulate multitouch with an emulator, though I have not gone looking for a solution there.
If you have an Galaxy S3 Android mobile phone, you can use Mobizen. It's free and the screen refresh rate is relatively good. You can control you mobile phone from you computer using your mouse and your keyboard. It's working using USB, 3G or Wifi connection.
I have used this Android screencast tool: http://code.google.com/p/androidscreencast/ in past demos, but again the downside is the relatively slow refresh rate.
If you have a rooted device, you could try Droid VNC Server (it's on the market). The refresh rate isn't too bad, but I certainly wouldn't want to demo full motion video or an arcade game on it.
You could also get a webcam, rig it up with a tripod. Something like this. Downside is your hands will be in the way, maybe issues with lighting and/or focus. Upside is a decent refresh rate.