I'm wondering if anyone has an example of a UPnP device scanner which I can import to eclipse. I would like this since I can understand how it works a lot easier when I see what it does in the emulator.
Thanks
I assume that by "device scanner" you mean "media controller" aka DMC. If you insist in having the DMC in Android emulator, then you can probably use Cling UPnPBrowser, which is basically a working example of how to use Cling in Android.
Observing and debugging in emulator is unnecessarily tedious too - if you want to learn UPnP, not as much Android. From the point of UPnP, the platform doesn't make any difference. A corresponding desktop app is completely equal (regarding UPnP internals) and way more comfortable to play with.
Also, instead of diving into the code, i would suggest starting with some basic documentation, so that you know what's the stuff that DMC is sending to the network and the other buzz on the wire even if DMC doesn't ask for anything.
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).
I am very unhappy with my Fossil Q hybrid watch (no screen, tracks activity & sleep and button functions) but honestly it looks good. The app keeps crashing though. I would like to make my own Android app to extract all kinds of data (for future analysis). Before investing a lot of time, I tried to do some research on how to access the watch. It operates obviously on BLE. But all the documentation is either about Wear OS or actual smartwatches with more advanced functionality. Search engines fail to distinguish between what I am looking for and most popular results.
I was wondering, if there are any known communication protocols between apps and smartwatches, where I can start experimenting?
BTW, HCI snoop log reports all traffic but it doesn't look like anything to me. But I can also try to hack it (if it is not encrypted...).
I remember that I have found once a info on dev site regarding the heart rate tracking but I cant find it.
Anyway I have found one thing that might help you:
https://developers.google.com/fit/android/ble-sensors
Unfortunately this is "fit" reference site, which data might be obsolete,
afaik the regular updates might come to API reference:
https://developers.google.com/android/reference/com/google/android/gms/fitness/SensorsApi
You can start by reading code and documentation of the GadgetBridge project: https://codeberg.org/Freeyourgadget/Gadgetbridge/
They support some of the "Q Hybrid" watches to some extent
I’m completely new to Qt mobile, I even don’t have a solid mobile dev experience, so sorry if I’m asking something obvious.
I need to develop a mobile app that should have the ability to receive a call like functionality (over internet, not GSM call). When answered, it should start streaming audio and video from our server. The call should be one way only, meaning, that stream goes from server to device, but never from device to server.
So my questions is:
Is this possible in Qt? I chose Qt because I’ familiar with it and I want to support desktop, android and ios. maybe windows phone later.
Is it possible to receive a call when the screen is shut off and my app is not running? I mean, this is a mobile device, the app won't be running all the time, it should be started only when a call is made from server to device. How can I achieve that? I think Viber, Skype and other messaging apps do that.
Many thanks in advance :)
1 - Well, sure it can, although it might not be as easy and straightforward as you'd want. Qt Multimedia does provide the necessary classes, but you do have to check how supported they are on the platforms you need to target.
However, the classes Qt provides are either too high level to serve any purpose but their intended purpose, or too low level, so you must implement pretty much everything by hand. In this aspect, the benefit of Qt being capable of producing portable apps may not outweigh the ease of using certain platform specific libraries that offer video streaming out of the box. In other words, it might be easier to write separate Android and iOS apps using Android and iOS libraries than a single Qt app that will work on both.
But just in case you decide to go with Qt, as I mentioned for the time being you are left with one option - do most of the work yourself. This means you should record audio using QAudioRecorder and capture frames periodically from a QCamera in a buffer of given length, compress that data (and preferably encrypt it if security is a concern), send it to the client over a QTcpSocket connection, decompress (and decrypt) the data and play it back in sync. It is certainly doable, but as already mentioned, it will be much harder since Android and iOS libraries offer pretty much "out of the box" solutions. Alternatively, you might decide to use a third party solution that offers support for all the platforms you target.
2 - whether your screen is on or off - that will be a call to a platform specific API, so are requests to turn it on or to keep in on for a given duration. Whether your app is running on the device or not, that is easy - just try a TCP connection with the client on the device, if it succeeds then the client is running. If you want to receive calls while your app is not running, you will have to implement a platform specific service that runs all the time instead and starts your application when a call is received.
QT Mobility does not have a a framework for supporting VoIP as you can see from the reference :
http://doc-snapshot.qt-project.org/qt-mobility/
You could create the VoIP framework of your app natively (which is going to require a good understanding of the various audio and video frameworks available) but another way to go
would be to use a VoIP SDK that supports both iOS and Android such as the Twilio mobile client
https://www.twilio.com/client/mobile
Qt mobile will help you in your application's UI, however you will have to write some native code for each platform you are going to use. Note that Qt is extending fast, you might need not to get your hands dirty with platform specific native code in upcoming versions of Qt.
Yes, you can receive a VoIP call when your application is closed by creating a background service (but as I know so far Qt doesn't do the job for you, you'll need to do it natively), it is the way Skype and Viber work.
As per I know new Blackberry10 OS using qt for developing. There is one source code available about VoiP Calling in qt. I am still searching about video call.
Check below link, May be helpful
1) Blackberry Developer Blog
(2) PjSip Blog
(3)Download Source Code
I don't know how to develop app in Android, ios, desktop using qt language.
But I am suggesting develop app in all native language instead qt.
I'm developping a video game on both pc and android using libgdx.
And i would like to connect them by Wifi or Bluetooth on a local network. The idea is to play in p2p, establishing this connection easily.
Please anyone can give help or source code for that, knowing that the connections can be : android/android but also PC/PC (since libgdx allows that)? I have absolutely no idea.
Thanks
Well because libgdx doesn't have good networking support you can write your own, but i've found that Kryonet is very good. It takes a lot of the hassle out of writing the network layer of your application and I've used it to connect mobile and desktop with no problems. Definably worth a quick view. It also has some good examples to get your up and running with a network game too.
I've also found this article by valve very usefull.
Networking is somewhat beyond the scope of Libgdx. There is some basic support for HTTP GET/POST/PUT, but it implies you already have a DNS name or IP address to connect to, which usually implies you have a relatively fixed "server" to connect to (not an arbitrary peer). Peer-to-peer networking is definitely beyond the scope of Libgdx.
On the upside, since Android and Desktop networking are already pretty close, you can use most any pure-Java networking infrastructure that supports peer-to-peer. See other Stack Overflow questions like: Peer-to-Peer communication options I think you'll discover that the really hard part of peer-to-peer networking is "discovery" (that is figuring the address of the peer you care about).
There is little to no documentation on it, but LibGDX does have a platform independant (Android, Desktop, iOS and GWT) socket class.
I'd link you to an example of it's usage, but as I stated; there's no written documentation/example.
However, I can give you this link as a good starting point.
http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/Net.html
libgdx-net looks good. https://github.com/pepedeab/libGDX-Net
Ive not yet tested it myself though.
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.