Audio routing - Android Software Development

Has anyone gotten setRouting to work on eclair?
It is depreciated and I don't seem to be able to find an alternative function.

anwoo said:
Has anyone gotten setRouting to work on eclair?
It is depreciated and I don't seem to be able to find an alternative function.
Click to expand...
Click to collapse
The SDK specifies:
"This method is deprecated.
Do not set audio routing directly, use setSpeakerphoneOn(), setBluetoothScoOn() methods instead. "
What are you trying to do that these two methods can help you with?

Related

Upnp help

Hi!
I have been writing android programs for a while now, and I have decided to make a remote controller to control fooobar2000. I used to have one working which just ran command line arguments, but most of these are no longer supported (after foobar2000 version 0.8 something). I have checked out the foo_upnp plugin, which seems to work nice with some android apps (e.g. Andromote). The problem is, I cant seem to find any information on how to actually implement the remote controlling in the source code.
Does anyone know where to start looking?
I have already tried Google without satisfying results.
Thanks in advice!
//smaaland

API to programatically create wi-fi hotspot

All,
I'm new here. I've heard great things about these forums. I'm interested in developing an application that would require creating a wireless network from the device. I know this functionality is built into the OS, but I don't see an API to do this.
Can anyone point me in the right direction? If possible, I would like to have access to such features as SSID name, authentication type/password (I think I read WPA2 is the only one supported, which is fine) and channel.
I recall reading that Google would make public any API they use in their applications, so I imagine this would fall into that category (Froyo "hotspot" functionality).
Thanks in advance for your help.
Dan Bucholtz
Anybody? Bueller?
Theres no public API but you can use reflection.
Heres a class that does the job for you (also you can find an example Application there):
http://www.whitebyte.info/android/android-wifi-hotspot-manager-class
jypdTonga said:
Theres no public API but you can use reflection.
Heres a class that does the job for you (also you can find an example Application there):
http://www.whitebyte.info/android/android-wifi-hotspot-manager-class
Click to expand...
Click to collapse
This works perfectly, thanks so much for sharing!

Help- anyone with a rooted Tmo or sprint tab

I tried looking into the issue of verizon tabs unable to connect with BT keyboards. With the help of Maris here, we identified that there is a file that is present on Tmo tabs that is not on verizons:
/dev/bthid
We're guessing this is the HID driver that verizon is lacking, since Tmo connects with BT keyboard just fine.
however, since his tab is not rooted, he cannot copy this file to me. Can someone with a rooted Tmo or sprint copy this file (using root explorer, free off the market) and upload it to any free space or message me and mail it to me?
thanks everyone, I'll let yal know if this leads to anywhere
(I checked in my samsung verizon fascinate, it lacks this file too, and cannot connect to bt keyboard too. funny.)
This file isn't going to help you on its own. The files in /dev are really just interfaces to the kernel (they're defined by their major and minor node numbers, and have no actual content).
The file you're looking for is (on my T-Mobile Tab) /lib/modules/bthid.ko. Once you have that, you can use terminal to 'mknod /dev/bthid c 10 224' to create the associated device file.
I'll try to remember to pull this off my tab tonight for you, though IIRC even the T-Mobile Tab has some problems with bluetooth headsets that are remedied by the European firmware.
Well, I have a verizon tab too and am trying to figure this out.
The bthid.ko already existing in that directory.
When I run the mknod, I get mknod: not found.
Do I need to run it from a particular directory (sorry, major noob to this)
You probably need to root your system and install busybox to be able to do that.
I have rooted, guess I need to find busybox.
Sent from my SCH-I800 using XDA App
Well, ran mknod and it said the file already existed. I never checked first, took hyann's word for it that it was missing. No go on the connection either.
Hyann, you friend have any other differences?
ResonanceZero said:
This file isn't going to help you on its own. The files in /dev are really just interfaces to the kernel (they're defined by their major and minor node numbers, and have no actual content).
The file you're looking for is (on my T-Mobile Tab) /lib/modules/bthid.ko. Once you have that, you can use terminal to 'mknod /dev/bthid c 10 224' to create the associated device file.
I'll try to remember to pull this off my tab tonight for you, though IIRC even the T-Mobile Tab has some problems with bluetooth headsets that are remedied by the European firmware.
Click to expand...
Click to collapse
Thanks my friend, at least its worth a shot since ppl with TMO and Sprint have successfully used BT keyboard, and verizon tabs have never succeeded.
robinsmy1 said:
Well, ran mknod and it said the file already existed. I never checked first, took hyann's word for it that it was missing. No go on the connection either.
Hyann, you friend have any other differences?
Click to expand...
Click to collapse
which file do you mean? in my post, me and my friends concluded that only dev/bthid was different between the verizon tab and Tmo tab.
We searched for the system files and came up with all the files that had the name "HID" in it. However, except dev/bthid, all the others were present in the verizon tab.
below is the list:
"
/system/bin shows:
bluetoothd
there is also a btld, not sure if that relates to this
the just one calld "hd" (no hid)
/system/lib had a folder bluez-plugin and inside it is:
audio
input
/system/lib has files:
libbluedroid
libbluetooth
libbluetoothhd
Then decided to do a search for HID and astro found the following (more promising?):
/system/usr/keylayout/Broadcom_Bluetooth_HID.kl
/system/usr/keychars/Broadcom_Bluetooth_HID.kcm.bin
/lib/modules/bthid.ko
/dev/bthid
"
I still think that if I could get the dev/bthid, whatever kind of file that is, maybe it is a shot. because verizon tab pairs successfully with the BT keyboard, we know the BT function is okay. Its just lacking something, either a command, a registry, or a reference file that allows keyboard input to come through by BT.
Funny thing is, on my samsung fascinate phone, I could also pair but not connect the BT keyboard too. I think verizon is purposely blocking this feature on their phones. What the heck would that serve I do not know.
I think you are right about Verizon.
I got the bthid to by there by following the advice above to run the mknod and it did not fix the problem.
I have also tried using the hidd from another post and got the error "Can't open HIDP control socket: protocol not supported"
I am afraid Verizon might have done something in the base Bluetooth support. I do not know enough to know if that is in the kernel or a support file.
Doing some more research into linux (I know, long shot), please have your friend look in their bluetooth configuration files for possible differences.
I found some in /etc/bluetooth there may be more elsewhere, this is all I have found so far.
In linux there is an HIDD_Enabled flag, maybe there is one here too.............wishful thinking!
hyann said:
We searched for the system files and came up with all the files that had the name "HID" in it. However, except dev/bthid, all the others were present in the verizon tab.
Click to expand...
Click to collapse
"Present" doesnt mean they are the same! If I were you i'd extract all these files from a working ROM and compare them.
Regards,
Dave
I've finally gotten around to pulling off the bthid.ko from a stock T-Mobile Galaxy Tab. It's available from:
http://www.resonant.org/android/lib/modules/bthid.ko
(There's no index, but I actually copied my entire modules directory there, if you need the other files as well.)
Hope it helps your experiments.
This looks like it is the same file as the one that came with this tab too. Might be a configuration thing (hopefully).
Any chance you can pull the conf files from the /etc/bluetooth directory too?
Thanks
Sent from my SCH-I800 using XDA App
robinsmy1 said:
This looks like it is the same file as the one that came with this tab too. Might be a configuration thing (hopefully).
Any chance you can pull the conf files from the /etc/bluetooth directory too?
Click to expand...
Click to collapse
Here you go:
http://www.resonant.org/android/etc/bluetooth.zip
Thanks I will take a look.
It is a long shot, but worth a look.
These are the same too.
I pulled a tmobile stock rom from xda....gonna try to see if I can find differences but I am starting to be convinced it is blocked from the Kernel.
Any Devs out there have any insight into where the BT HID is controlled. Any input would be greatly appreciated.
Think I found it
I have been looking through the Verizon source from the Samsung site, and they were kind enough to include an output file from their compiles called config.
It looks this the did hot include the hidp in the build of the kernel, which I believe is the HID protocol.
No the key would be to compile it as a module and try to install it. Not sure where since I cannot find it on the tmobile stock I downloaded, but they may have compiled it into the kernel instead of as a module, which from the kconfig, seems to be an option.
I do not have a linux box at work so I will not be able to try to compile it until tonight.
If someone else wants to try, I would be happy to hear the results.
Also, if there are any devs who read this who might be able to provide some insight I would love to hear it as I am flying by the seat of my pants here
Thanks
Oh man while you guys havent gotten this to work it still makes me SOOO HAPPY to see people working on it. I am extremly windows knowledgable and still getting into the android game so I cant help yet (although I really want to).
It just makes me happy to know people are just as peeved about this problem as I am
This is excellent news robinsmy1! I'm really thrilled to death!!!!
Um, do you want to post the config file or at least a link, so more people could look into it? I have very limited linux programming experience (used to maintain a UNIX system) so I dont think I can help much, but I would like to take a look. And in these days, almost everything is googleable
robinsmy1 said:
I have been looking through the Verizon source from the Samsung site, and they were kind enough to include an output file from their compiles called config.
It looks this the did hot include the hidp in the build of the kernel, which I believe is the HID protocol.
No the key would be to compile it as a module and try to install it. Not sure where since I cannot find it on the tmobile stock I downloaded, but they may have compiled it into the kernel instead of as a module, which from the kconfig, seems to be an option.
I do not have a linux box at work so I will not be able to try to compile it until tonight.
If someone else wants to try, I would be happy to hear the results.
Also, if there are any devs who read this who might be able to provide some insight I would love to hear it as I am flying by the seat of my pants here
Thanks
Click to expand...
Click to collapse
I don't really have a place to host it the file. If you pm me your email address, I can email it to you.
The config file is just a dump of their answers to the Kconfig questions from what I can tell and they did not include the HIDP profile.
I have programming experience, but nothing in Linux at all. I put a VM on my W7 box with ubuntu just so I could troubleshoot this issue.
I am going to try to find time tonight to compile the kernel with the HIDP as a module and see where it puts it and try to pull it out and shove it into the tab to see if that will get it to work.
robinsmy1 said:
I don't really have a place to host it the file. If you pm me your email address, I can email it to you.
The config file is just a dump of their answers to the Kconfig questions from what I can tell and they did not include the HIDP profile.
I have programming experience, but nothing in Linux at all. I put a VM on my W7 box with ubuntu just so I could troubleshoot this issue.
I am going to try to find time tonight to compile the kernel with the HIDP as a module and see where it puts it and try to pull it out and shove it into the tab to see if that will get it to work.
Click to expand...
Click to collapse
I PMed my email to you. Thanks man.
OK
Emailed the config...let us know what you think.
A second opinion is always welcome

[Q] Audio decode, recognize a keyword

Hello,
Constantly-on speech recognition listening for just one keyword.
I am trying to do is making my app constantly listen for one keyword that will fire an intent whenever the keyword is recognized.
I know that this will use a lot of battery. and I don't want to use google's speech recognition.
For example - you are talking with a person. Normal conversation. The phone is actively listening and recognizing every single said word and listening for the keyword.
Let's say the keyword is "cheese" in this instance.
Whenever you say "cheese," the application fires an intent that starts up another part of the app.
I tried to record myself saying "cheese" into wav file
And then comparing it to every word that was spoken..
my problem is finding the right tool that can help me perform this signal comparison in the simplest way so it can work on any device..
tried musicg library with fingerprint function but it does not work so well..
tried some other fft/cross-corelation/ect.. functions but I didn't get the result I expected..
any help (examples or some library would be best) that you can give me will be very appreciated ..
Thanks.
It looks like Java has its own speech recognition API (basic info about it here: http://en.wikipedia.org/wiki/Java_Speech_API).
I also found the official FAQ with instructions on how to download and use it etc. http://www.oracle.com/technetwork/java/jsapifaq-135248.html
Hopefully, it's pretty high quality and works well. Good luck!
marwan.kallal said:
It looks like Java has its own speech recognition API (basic info about it here: http://en.wikipedia.org/wiki/Java_Speech_API).
I also found the official FAQ with instructions on how to download and use it etc. http://www.oracle.com/technetwork/java/jsapifaq-135248.html
Hopefully, it's pretty high quality and works well. Good luck!
Click to expand...
Click to collapse
Thank you!!! I'll try it
Wow fantastic question,how about refering the sourse codes of google voice?So u can know what they have done....:thumbup:
.........................................
visit www.fb.com/softcrush
Just FYI, speech recognition is some complex stuff. I believe that Google uses some really advanced techniques such as deep neural networks for their speech recognition.
Here are some links if anyone's interested:
Wired Article
Google Research (Theory Based)

Control Xbox One Streaming with Mouse and Keyboard

Hello guys,
I was working on it yesterday with a bit of disappointment. Did anyone make this work yet?
I tried to do this with FreePIE, vJoy and X360CE.
I used X360CE to emulate an Xbox 360 Controller, since streaming should work with these. I hoped to be able to control streaming this way, but I don't know where to put the generated xinput1_3.dll. I was able to open the folder where the XboxApp.exe is, but I don't have write access there. Replacing xinput1_3.dll in system32 didn't help either. Somehow after some hours my FreePIE script stopped working, but that's an issue that I'll need to workaround later.
What I did so far:
- Writing a FreePIE script, that translates keyboard input to vJoy (controls for Minecraft, but can be easily changed)
- Configuring X360CE to understand vJoy (the easiest task)
If there is any interest in this, I can post Links and my script later.
Any ideas where I did go wrong? Anybody found a hint, where the Xbox App gets the inputs from? Does it even use Xinput or will we need to dig somewhere else?
Best regards
E4est said:
Hello guys,
I was working on it yesterday with a bit of disappointment. Did anyone make this work yet?
I tried to do this with FreePIE, vJoy and X360CE.
I used X360CE to emulate an Xbox 360 Controller, since streaming should work with these. I hoped to be able to control streaming this way, but I don't know where to put the generated xinput1_3.dll. I was able to open the folder where the XboxApp.exe is, but I don't have write access there. Replacing xinput1_3.dll in system32 didn't help either. Somehow after some hours my FreePIE script stopped working, but that's an issue that I'll need to workaround later.
What I did so far:
- Writing a FreePIE script, that translates keyboard input to vJoy (controls for Minecraft, but can be easily changed)
- Configuring X360CE to understand vJoy (the easiest task)
If there is any interest in this, I can post Links and my script later.
Any ideas where I did go wrong? Anybody found a hint, where the Xbox App gets the inputs from? Does it even use Xinput or will we need to dig somewhere else?
Best regards
Click to expand...
Click to collapse
Hey have you made any progress on this?! I've been trying to do the exact same thing. I want to use my keyboard and mouse to control the xbox one while streaming.
Ever make any progress on this? I tried something similar myself but couldn't get it to recognize any virtual controller. Anyone have any ideas?

Categories

Resources