Let me first state that I do not know Java. I'm a .NET developer with solid C# skills, but I'm actually attempting to learn Java and the Android SDK at the same time (I know it's probably not ideal, but oh well, I'm adventurous :))
That said, my end goal is to write a streaming media player for Android that can accept Windows Media streams. I'm okay with restricting myself to Android 2.0 and greater if I need to. My current device is a Motorola Droid running Android 2.0.1. There is one online radio service I listen to religiously on my PC that only offers Windows Media streaming, and I'd like to transcode the stream so my Android device can play it.
Is such a thing possible? If so, would it be feasible (i.e., would it be too CPU intensive and kill the battery)? Should I be looking into doing this with the NDK in native code instead of Java? I'm not opposed to writing some sort of service in between that runs on a desktop computer (even in C#), but ideally I'd like to explore purely device-based options first. Where should I start?
Thanks in advance for any insight you can provide!
Having a proxy on your PC that captures windows audio output, encodes it, and sends it to your phone is perfectly possible. I had something like that 8 years ago on a linux-based PDA (sharp zaurus). The trick is that you're not trying to decode or access the XM radio stream directly, you're simply capturing what is being sent to the speakers on your desktop and re-sending it. There will be a minor hit in audio quality due to the re-encode, but shouldn't be too bad.
I've done cloud-to-phone transcoding using an alpha version of Android Cloud Services. The transcoding is transparently done on a server and the resulting stream is streamed on the phone. Might worth having a look. http://positivelydisruptive.blogspot.com/2010/08/streaming-m4a-files-using-android-cloud.html
Related
I recently purchased a Yuneec Breeze quad-copter drone that uses an Android and iOS app with its own WiFi connection as a controller.
I am looking to write a Java application that performs the functions of the Android app with Game Controller support (the Breeze Cam app uses the touchscreen which means my big thumbs cover the streaming video) but am running into a roadblock.
While being proficient in Java, including network functions, I find myself woefully uninformed as to how to capture and read the network traffic between my phone and my drone. Its simply a skill I never needed until now.
Any place to help me get started?
OR -
Since I'm writing this in Java would de-compiling and hacking away at the Android source be a more viable option?
If so what decompilers are recommended?
In my experience these apps tend to be written in proprietary code. Android may be an open-source project, but the apps written for it don't have to be. It's unlikely you'll be able to write your own code to control the drone unless Yuneec provides an API/SDK to do so.
A quick Google search yields this thread on their forums: https://yuneecpilots.com/threads/api-sdk.745/
It's not much info, but it looks like you're SOL. Sorry.
I am newbie in android developing, I have searched for this question but i didn't find my answer.
I want to know is there any ability to edit the sound calls in android?
I mean i want to add noise or change sounds of caller, Is it possible to change the sound in calls or adding a new sound to it?
TL DR : The answer is not yet.
And it's not like we've been waiting. The first entry i can find is from July 31 of 2009, the issue #3434 and, as of today (May 13 of 2015) it's still has not been assigned.
It's really hard to actually work on low-latency project, audio recording and of course, voices changers when you can't do low latency.
Not to say there's hasn't been any workarounds, you could emulate yourself the call, and add the voice effect sure (build your own dialer, and work with that), but let me warn you : you probably won't have any good perfs when it comes to real-time appliucations. No low-latency means no efficiency when it comes to audio recording.
You'll have to wait then.
Your question can be resolved partially depending your using model. the premises are :
you just want to eject some noise into your outgoing audio stream,
not into the incoming audio stream.
you may use a third-party VoIP application to make the phone call.
or simply say, you just want the peer to hear some modified voice. it is feasible.
Normal a native phone application on Android platform uses "Android audio system module" in the framework, the vendor provided audio libraries and Linux ALSA audio libraries to transmit/receive the audio data. These .so and .a files are under the read-only mode normally and could not be overwritten by user, so you can not inject data into this data chain.
But you have more capability to manipulate the data if you use a VoIP application to make the phone call, some VoIP applications can give a real phone number, like Fongo, you can receive a phone call to that number, the caller does not know you are using a VoIP application to speak.
So if I was assigned to do this project, here are my steps:
find a usable and open sourced VoIP client on Android.
find the code to sample the audio data from microphone ,add the code
to manipulate the raw PCM data and send the result to audio encoder.
build and run it on Android
register or apply a phone number for this VoIP client.
done.
Hope it help
I have a bit of am odd question that I am hoping someone here can help me with.
BACKGROUND: I am trying to design a system that will take in continuous-time data from a VLF antenna/preamp system which will take that data, do an FFT analysis of on it (magnitude versus time) and plot the resulting FFT data as a real-time spectrogram. The project is what is known as a "hum sniffer" but specifically to see signal interference in the 15 - 35 kHz range. I have purchased a couple of "teach yourself java" books and am in the process of reading them. I am an engineering student with limited experience with programming in Ansi-C and Matlab.
QUESTION: There are several applications on the Android market that will perform a similar function using the microphone as the input source and I have purchased all of them just to see how they operate. I have also purchased an Arduino Uno with USB Host shield from Sparkfun as well as a IOIO board from Sparkfun. I am really REALLY hoping that I can use a combination of those boards I have purchased in conjunction with the aforementioned antenna/preamp system to plot those real-time spectrograms in an Android program I have yet to create.
I am not looking for anyone to hold my hand through this process but if anyone has any experience with anything similar I would appreciate any insight. My major concern at this point is whether I need to design the external system to do the A/D conversion before feeding that data into the phone or if I might be able to send the CT signal data into Android directly and have the phone do both the A/D conversion and the FFT plots. Oh, and whether or not I can use the USB port to send data into the phone.
I am using my Nexus S 4G for all testing/applications.
Thanks in advance for any input.
Have you tried connecting your audio on the phone's headset microphone connection and using a sound recording app? Then you should get a file that you can read into Matlab and play around with to get an idea of the capabilities of the audio input on the phone.
If the audio input good enough then writing an app to do real-time FFT and plotting shouldn't be too tricky. That way you avoid dealing with Arduino and the Android USB accessory support.
IOIO hardware is capable of 500ksps. This is currently being limited in firmware to 1ksps per channel in order to bound the USB bandwidth being used. However, it is super easy to change (a single number, and a firmware rebuild) in case you know what you're doing and won't overflow the USB channel.
A single sample on a single channel will be a 3B message. At 40KHz, this would be 120KB/s, which is within the effective bandwidth that has been reached over ADB (the maximum is about 300KB/s).
If you need help rebuilding the firmware, the ioio-users list is your friend.
I'm thinking about making a physical controller (device?) with knobs, buttons, and LEDs. I'd like to interact with it using Java (respond to the knobs, light up LEDs, etc). The reason I mention Java is two-fold: first, I know Java well1. Second, I've written the rest of the program I need to interface with in Java (though there are ways to talk to the Java program from another language).
I would like the device to connect via USB and be (computer-)platform independent.
I haven't the slightest idea of where to start, except to start reading the Arduino website. Is this my best/only option? Is there something better suited for communicating with Java?
Note: I know that Arduino has something to do with Java (not sure what), but it seems like code must be written in a subset of C.
How would I get moving on this topic?
1 - No laughter, please.
The Arduino development environment is written in Java.
But the standard language you write a program for the Arduino platform is effectively C++.
The Arduino platform is based on an Atmel AVR chip. There is at least one Java VM for AVR chips. There are other languages available for the AVR such as Forth and BASIC (although I could only find commercial versions, so I'll if you want to find them, search for "AVR BASIC").
The Arduino uses a virtual COM port to communicate between the host computer and it. A virtual COM port emulates an old style serial line but is done with USB. You can use the Java communication API to then have a Java program running on the host computer communicate with your physical device.
For some encoders and buttons, you probably want to implement a USB HID device. If you're going to produce more than a couple of them, you'll want to do a custom board. Check out V-USB, an open-source library for making USB HID devices using Atmel microcontrollers. They have a bunch of examples of projects that use this library.
You could probably make this look like a HID joystick, using the encoders to produce X/Y axis information and having the buttons act like buttons. They you could use standard Java gaming APIs to read the joystick values.
Can you expand on your need for a custom device? It seems to me that designing hardware has a pretty high barrier to entry and that most applications I can think of would be better resolved by repurposing an existing piece of game controller hardware. If you really need new hardware, then i suggest you start by googling 'USB development kit' or
'USB development board' which will get you links like this, this and this.
As for working with USB hardware from Java, I've played around with the JUSB library a bit and it looks promising, but appears to be limited to Linux only because the Windows version of the native library half of the library hasn't been written. Alternatives can by found by googling 'HID java'.
Ok, computer-platform independant? What platforms are you targetting? That would depend on the driver and support for that said platform, what does the usb device do? Is it a mass storage device...You may have to look around and see if you can find a device driver that can talk to the device...
Hope this helps,
Best regards,
Tom.
I know for the serial port there were libraries that existed for interacting with it (rs232 library). Googling for java and USB returned several answers (the first was called jUSB). That would be the first type of thing I would be looking for.
sample for java usb connection to freescale microcontroller:
http://javausbapi.blogspot.com/
I want to create a C++ cross-platform (Windows and MacOS X) application that sends the screen as a video stream to a server.
The application is needed in the context of lecture capture. The end result will be a Flash based web page that plays back the lecture (presenter video and audio + slides/desktop).
I am currently exploring a few options:
Bundle the VLC (the Video Player) binary with my app and use its desktop streaming features.
Use the Qt Phonon library, but it doesn't seem to be powerful enough.
Send individual screenshots plus a timestamp to the server instead of a video stream. The server then would have to create the video stream.
Implement it in Java and use Xuggler (BigBlueButton uses it for their Desktop Sharing feature)
...?
I would greatly appreciate your insights/comments on how to approach this problem.
I think VNC is a great starting point for a software solution. Cross platform and well tested. I can think of a couple commercial projects that are derived from VNC - Co-pilot from Fog Creek springs to mind.
But concider tapping in to the projector hardware to capture slides instead of installing software on every computer brought in by lecturers. I.e. a splitter and then a computer to capture the slide video signal as well as the presenter video signal.
Where I worked lecturers brought in a plethora of laptops for their presentations and rather disliked the idear of installing anything moments before their presentation.
I'd go for a hardware solution - a Mac mini with Boinx.
There are a bunch of screen streaming and recording software available, On the Windows platform you can use Windows media encoder to do this and even broadcast a live mms:// stream
Capturing the screen is not hard to do ( unless the content on the screen is overlay video or fullscreen 3d graphics ). Streaming it live is complicated, encoding and recording it to disk is quite straightforward with most multimedia frameworks ( Directshow, gstreamer )
My solution was to write a simple GUI application in Qt that invokes a VLC process in the background. This works really well.