Hi guys,
I tried to find similar threads or answer but none specifically addressing this question.
I want to detect whether sound is being played on the device in general, then hijack that audio stream to find the BPM in a separate android application. This may or may not include decompressing the audio stream and measuring it based on peaks/troughs in the sound wave. But the general idea, so far as I can tell, is to reroute the IO stream from applications using the sound card and pipe it to another application.
I know this is theoretically possible using android libraries like BASS by XMPlay, but I've never seen this in practice (I assume there's a good reason).
My gut feeling is that when the sound device is in use, the thread is basically locked down and you can't do much to it. This is the case in many operating systems (but not all!, including Linux based os), so would not be surprised if this question is left unanswered or just not possible.
Also an fyi; I'm very new to Android development but I have a plethora of experience in Java and lower level languages. It's very possible that many of my assumptions are way of the mark here. Any input would be greatly appreciated.
Cheers,
Jopdan
Related
Hi all,
I'm looking for a tablet which is going to act as the user interface for my research project, but the technical nature means that I have some particular requirements which are pretty much impossible to ascertain from reviews or even some serious Google-fu. As there seem to be a number of experts in this forum I figured some people here might be able to lend some advice...
My main issue is that I need robust, ideally wired communication with a PC - presumably via USB. I have read that USB connections are possible with Android but I get conflicting reports about how easy it is, and no real information on the bandwidth of such a connection. Has anyone had any experience with this? I need to be streaming real-time images to the tablet, would this be suitable?
This sort of leads on to a second issue which is that it would really be preferable, from a development point of view, to have it running a Linux distro. I am wondering whether this might make USB connectivity easier, but again this information is very hard to come by. So, does anyone know of a tablet which I can put Ubuntu on and have full access to the USB port? Again, any sort of information or experience would be greatly appreciated.
As it's not my money I'm spending I really need to be sure that this will do what I want in advance, so any advice in general about doing this would be fantastic.
Thanks in advance
-Rob
Honeycomb 3.1 is a solid operating system which will be able to perform the actions you listed. However, steaming data seamlessly will require a device with suitable RAM and processor speed. One nice feature with android devices is the ability to overclock the processor. If you choose to go with android honeycomb a good device would be the Xoom or Acer
Sent from my HTC Vision using XDA Premium App
Intersting, thanks, I'd not seen that. It looks like this ticks off Android 3.1 as a suitable platform, in which case my final question is whether anyone knows of a tablet which can have a native Ubuntu installation, with full access to the USB, display device etc. It would be the ideal situation from a development point of view.
Thanks again.
Hey, XDA. This is a copy and paste of a post to '/r/wp7dev' on Reddit I made a few minutes ago, and I'm not yet able to post links sadly.
I took out my Toshiba Gigabeat S the other day, which I've pretty much abandoned when I got my Focus. I kind of missed the amazingness of Rockbox.
The short time that I had a loaner iPhone 3G, I had installed iDroid on it and the Rockbox for Android port too, and it worked well. (I was the first person to get Rockbox working on an iPhone, [kind of!])
So now, I'm thinking about how cool it'd be to have Rockbox on my shiny Windows Phone 7.5 Samsung Focus...
I'm not a programmer by any stretch of the term, aside from dabbling here and there, but I do have the whole VS2010 for WP7 and an official student dev unlocked phone and all that, and got to tinkering with the source from Rockbox's Android port (I had this linked, search for Rockbox Android port). (I figure it'd be the most sensible to try with their Android port than any of their device specific variants.)
Obviously, I have no idea what I'm doing. I was able to find a porting guide for Android to WP7 APIs (I had this linked, search for Windows Phone Android mapping) and it looks like a lot of the objects translate well, plus Java and C# are fairly similar to each other, and are translatable (also linked, search for Java C# comparison).
I'm aware of some of the limitations with file system access and native applications, etc. with WP7, so I know the whole porting process won't be a 1-2-3-done kind of deal. But it definitely looks doable.
It seems that something like this might need an Interop-unlocked device for it to fully run, but I figure anyone who'd even want Rockbox would already have that done.
Rockbox would be great for WP7 because:
- it supports gapless playback
- it supports a gigantic variety of file formats
- crossfading is lovely
- EQ controls are superb, as are compression controls and balance and whatnot
- it has an excellent set of plugins like oscilloscope, vu meter, etc.
- plus, it'll look really cool Metro-fied.
If anyone with interest is able to help out with this, let me know. Then who knows, support for streaming gapless from a media server could even be done down the line.
tl;dr: a Mango/Metro-fied WP7 Rockbox using the source code from the Android port could be a super amazing thing for the audio playback options for the platform. Any assistance in doing this would be spectacular!
Rockbox for Android is not something I'm familiar with; the last time I looked at RockBox it was a full ROM replacement. You could technically do that with an HTC phone, I guess, but it would be very difficult to create the ROM and a complete waste of the hardware's other capabilities.
Integrating Rockbox functionality into a WP7 ROM is probably closer to what you're thinging of, but it still won't be easy. WP7 doesn't allow apps to replace core functionality built into the OS, so you'd need to create a custom ROM that uses Rockbox in place of the built-in media player.
I don't know how hard this woul be, but don't assume it would be easy. Android is pretty much nothing like WP7 internally. Android uses a Linux core, and apps for it are written using a Java variant or various native programming languages available for Linux. WP7 uses a Windows CE core, and apps for it are written using managed code or Windows native C++. Typically speaking, to port an app between the two system you must completely re-write it.
I do know that Windows Phone 7 uses C#, which is structurally similar to java. At that point it'd be a matter of porting over the java to C#, then figuring out the API equivalents. Still though, I don't know how possible this'd all be without native access to the device.
I realize this is probably way out of left field, but I am curious about this. Searching the web doesn't really turn up much so I've decided to pose the question.
My new car stereo has an SD card reader, bluetooth, and a beautiful touch screen. It's backbone is probably either Unix or Java. Seems to me it would have all the ingredients to enable it to be hacked. I could think of a hundred things it could do which it can't in its current stock state (games, enhanced sound features, apps, and better phone interfacing: video playback on screen, display texts or emails on screen, utilize phone GPS, Talk to text, text playback, web browsing, google now, etc...)
I'm somewhat aware of the android based radios that are out there but it really seems that they are not ready for primetime yet. I suppose I'm more curious about those that have found a way to reprogram their current stereos (essentially rooting them) to install more feature filled roms.
If you think about it, many people have touchscreen/bluetooth capable radios in their cars nowadays. Also, a car stereo is something you are typically forced to live with a very long time (longer than your smartphone at least). When you get down to it, there have to be millions of people who all have the same stereo system and that is true for multiple different systems. Many could benefit from the advance capabilities that could come out of such an endeavor. As a novice, I suppose I don't see how it would be all that different than flashing your dreamcast or blu ray player with new roms (which is commonplace nowadays). Is anyone already working on this? Maybe I'm missing something here.
In case you are curious, I would love to learn how to hack my 2013 VW Jetta Premium VIII Audio device.
Well I doubt it runs on the Linux kernel so "rooting" wouldn't necessarily be possible per se. Java might be it, in which case it is probably not open source and it would be a pain to reverse engineer it.
You might think about just putting a Nexus 7 in dash and hooking it up to the aux input of your stereo or something like that.
edit:
just to add it might be possible,but probably fruitless to spend so much time hacking something so specific as that. Running homebrew on a Dreamcast is a bit of a different animal.
May be a dumd question, but I'm asking anyway. Why is Android so hardware specific?. or better yet, why can't you install any android system on any phone?
example: you can install windows or linux on any system, you don't have to have a certain set of chips. Is it a propitiatory type thing with these phone makers. is the whole android system so small, that the coding can't be added to make it installable on any phone.
I'm not a coder, or prgrammer, I do understand it enough to read what it is doing, but cannot write anything. Can someone shed some light on this
Thanks in advance
You've got this completely bass ackwards. Android is decidedly not hardware specific. Phones, tablets, computers, car stereos, home heating/AC, watches, TVs, etc. Android is open source, which means anybody can develop it to work on just about any platform they wish. I mean, you can get refrigerators and microwaves that run Android for Pete's sake.
If you're complaining that you can't get Android on an iPhone or a Nokia Lumia, then you're barking up the wrong tree.
To add some more "devices" to the list above on which android can be installed - cars! I'm working in that industry now
And the answer above is right - if your device is totally closed for others, then you will not be able to install anything on it, maybe, without really breaking into it. Android can be put mostly on any hardware - if the hardware manufacturer wants it. The short description is - Android is implemented on top of HALs (Hardware Abstraction Layer) which are then implemented by manufacturers specific to their devices and then Android works "out of the box".
I would like to create an IoT device by buying new, cheap android phones, strip them down and remove the screen, rebox into my own physical box, install a custom ROM without any bloatware (and that will boot without a screen!), and install my android app on the device to do stuff.
An example of a purpose for this could be a GPS tracker for a car. The box would be placed in the car, and record GPS and accelerometer readings, posting these readings back to a central server via the cellular network. (This is just a random example, so don't focus too much on the detail of this, but there are thousands of uses for a IoT board with the sensor, CPU, RAM, storage, and connectivity capabilities of a budget android smartphone)
The reason I want to use existing phones is that they are wonderful, mass produced, cheap devices with a variety of sensors I can use.
The reason I want to use Android is because it is because of the customization ability, and the mature development ecosystem.
To me, it seems an obvious thing to do, but I don't seem to be getting much joy trying to search for examples of this sort of thing (either here, or on the internet in general).
So some questions:
1. General thoughts? (Good idea? Am I missing some fundamental problem?)
2. What are the challenges of running Android without a screen connected?
3. Are there any custom ROMs you know of that specialize in this sort of thing?
(I've seen Google Brilo, but it still seems a bit early yet, and I really like the idea of just using the standard Android SDK to develop the app - and the abundance of help and information that comes with it)
Thanks!