Auto Bluetooth patch for FM Radio - Nexus One Android Development

Here I have another amazing thing, I made a patch for the FM Radio to turn bluetooth off if it wasn't turned on before starting the radio.
What does it do if:
you enabled Bluetooth yourself? FM Radio will use Bluetooth and if you stop FM Radio bluetooth will stay on.
Bluetooth was turned of before starting FM Radio? FM Radio will enable Bluetooth and will disable it when you stop listening to the radio.
you plug out the headphones while listening to the radio? FM Radio will disable bluetooth if it wasn't enabled before starting FM Radio.
Attached is the apk for CyanogenMod, don't know if the apk will work on MIUI to.
Patch: http://pastebin.com/9t5hgg70
Since I have no programming experience I'm pretty proud of myself. Don't know if it's coded nicely but I think it's not that bad.

This what i'm looking for and hope for..very useful, mate..SMART
Edit: i've tried, Radio works normal but why when i quit by turn off Radio, bluetooth not auto turn off also? still have to turn everything off manually ..

------------------

chrisvuong said:
This what i'm looking for and hope for..very useful, mate..SMART
Edit: i've tried, Radio works normal but why when i quit by turn off Radio, bluetooth not auto turn off also? still have to turn everything off manually ..
Click to expand...
Click to collapse
Are you sure you pushed it to /system/app/ ? Or did you enable bluetooth on your own. It only works if the radio starts bluetooth.
BChris71 said:
It's ok it works but there is some bugs, if you shut down the radio with the right button (it shuts down the bt ok) but if you try to reactivate the radio, it shows "enabling bt" but don't manage to do it (it's a loop), moreover if you are listening radio, you some back to desktop (adw) and come back to radio then shut down it, bt remains active.
But it's a nice work ! GJ
Click to expand...
Click to collapse
I tried it again now, bluetooth is disabled, starting FM Radio, listen to Music, go to homescreen (LPP), start Angry Birds, play one round, go back to homescreen, open FM Radio, push power button, it turns off and disables bluetooth. Turn it on again, it enables BT again and plays...

how to?can u be more specific?

g4rb4g3 said:
Are you sure you pushed it to /system/app/ ? Or did you enable bluetooth on your own. It only works if the radio starts bluetooth.
I tried it again now, bluetooth is disabled, starting FM Radio, listen to Music, go to homescreen (LPP), start Angry Birds, play one round, go back to homescreen, open FM Radio, push power button, it turns off and disables bluetooth. Turn it on again, it enables BT again and plays...
Click to expand...
Click to collapse
hi,
i have installed FM.apk and it works fine as you described
Sent from my Nexus One using XDA App

i can install the apk,but each time after restarting phone,it come back to stock Radio.dont know why.

------------------

Related

MW600 connection problems

Hi,
A couple of weeks ago, MW600 was working as expected. But at the moment, I've got connection problems. Is anyone experiencing anything similar, or do you have any tips?
I have tried restarting both the phone and the MW. The radio function works perfectly. I have tried renaming my phone.
Here's what I'm doing:
* Turn on MW
* Turn on bluetooth on phone
* Search for units -> pair the two units using code 0000 (starting from scratch, just in case)
* Phone states that MW is connected to phone and media sound
* If mediascape is playing, I hear ~1 second of media sound
* After 1-3 seconds, MW makes a sound (5 descending tones) -> the phone briefly states that MW is connected to media sound only -> the phone goes back to stating that the two units are paired (no connection)
What do you think?
Mine doesn't do that, so it's quite odd.. Do a full reset of the MW600 (manual here: turn off, press and hold down power until pairing indication appears, press power and call buttons simultaneously until headset turns off), delete it form the phone and try again. There's no reason for it to do that.
I found the battery life to be a bit short....10 minutes of streaming music and it shut off, all this after overnight charging.....I have repeat this 'issue' Friday night, Saturday and Sunday only to have MW600 dead at the office now
My runs 12-15 hours! Without any Problems.
Same, I can use mine for at least 4 days (about one and a half hours a day) before it needs recharging - are you using the right charger?
sergiu84 said:
Mine doesn't do that, so it's quite odd.. Do a full reset of the MW600 (manual here: turn off, press and hold down power until pairing indication appears, press power and call buttons simultaneously until headset turns off), delete it form the phone and try again. There's no reason for it to do that.
Click to expand...
Click to collapse
Thanks for this suggestion. A full reset solved the problem.
murmeljenta said:
Thanks for this suggestion. A full reset solved the problem.
Click to expand...
Click to collapse
Hi, how to perform it? I don't understand when I have to press call + power buttons!
Alleniv said:
Hi, how to perform it? I don't understand when I have to press call + power buttons!
Click to expand...
Click to collapse
You press the buttons on the MW600 itself, not on the phone. Read the manual that I linked to, it's all in there.
hmm anyone else have problem with the ringtone playing thru the mw600? when the phone rings. i can hear it ring on the bt headset. but it's like play a bit.. then i hear a beep.. then it plays a bit more.. and beep it's like intermittent
The beep means, that the headset is changing from the mediamode to the telephonemode.
Update... The problem above came back. If seems related to using bluetooth and wifi simultaneously. Whenever I'm using BT and enable wifi, BT gets a lot of problems and usually shuts down. Does this happen to anyone else?
Also, in the past I could use the buttons on the headset to change songs etc. That doesn't work anymore, even after resetting the headset etc. Is anyone else experiencing this?
-------------------------------------
Sent via the XDA Tapatalk App
I have problems with MW600 too.
Sometime stays connected for hours and sometime is disconnecting 3 times in 5 min.
I have wifi on 24h/day so, i didn't test without wifi.
i only get disconectet when i try to make a call ... looks like ist sw issue on the x10 since the mw600 dose not make this on other phone .. but that is an nother problem then you have.. BUT !!! i hade the exact same problem includet to what i have now befor i updatet the x10 to the .16 version
edit: my problem is solved. needet to reset it 2 times befor it workt
murmeljenta said:
Thanks for this suggestion. A full reset solved the problem.
Click to expand...
Click to collapse
Update... Problem keeps coming back. My supplier suggested that BT and wifi might interfere. I'd be very surprised if a "smartphone" cannot play music over bluetooth and surf using wifi at the same time. My supplier promised to check it out and get back to me... That was ~2 weeks ago.
Is ANYONE else experiencing the same problem? Can you listen to music over BT, then enable wifi, connect to a network, and keep listening to music over BT?
murmeljenta said:
Update... Problem keeps coming back. My supplier suggested that BT and wifi might interfere. I'd be very surprised if a "smartphone" cannot play music over bluetooth and surf using wifi at the same time. My supplier promised to check it out and get back to me... That was ~2 weeks ago.
Is ANYONE else experiencing the same problem? Can you listen to music over BT, then enable wifi, connect to a network, and keep listening to music over BT?
Click to expand...
Click to collapse
I have wifi on 24h/day and most of the time i don't have any problems but sometime they get disconnected and i have to turn off/on BT and everything runs fine after.
I will have to try without wifi
Bluetooth and Wireless LAN (WiFi) both uses the same frequency space (~2.5 GHz)
Most of the times Bluetooth should be smart enough to adjust the frequency to co-exist with WiFi devices.
If your area are crowded with other Bluetooth devices and WiFi access-points, the Bluetooth set might having trouble settle on one quiet frequency, and might just sit there trying to switch frequency all the time, never finding a good frequency to settle on.
To help those poor Bluetooth devices along the way, try to change the WiFi access-points channels to create a free channel where the Bluetooth devices can settle on.
Also check if your WiFi access-points have a "Co-exist with Bluetooth" option, and enable it. It will however reduce the frequency-width and therefore the bandwidth slightly on the WiFi, but Bluetooth devices should work with less interruptions.
Connection problem with s60
Hello!
I have an MW600 as well - using with an s60 symbian nokia (6650 fold).
It works corectly when using in bt mode and listening music from the phone, but it alwways lost connection when turm the handsfree to radio. When listening radio, zthere is no connection, no way to get the calls or answer.
Do somebady have the same problem or somebody know how to solve it?
I did reset on mw600 and paired again, but i have the same problem.
á
i haven't had any problems with my MW. i always stream music from my pc via wifi to my X10, then to my MW via BT, witch is connected to a Reciver for party.
have you tryed restarting your MW after pairing.
My problem with this headset is that it doesn't:
1) caller name not displayed on incoming calls
2) Music/Mp3 tags not displayed on lcd (using Poweramp)
3) why does the phones itself rings not the headset just some beeps. Embarrassing when phone rings and then answer on headset.
Resetted but not solved any problems.
Wildfire running Wildpuzzle 0.8 with kernel 4.1 overclocked
Ok I m using mw600 stereo bluetooth headset with CM 6.1.3 V4.4 rom for 2 days now. The pairing is easy but the issues that I am facing are;
* phone has crashed/rebooted couple of times while pairing/ unpairing.
* besides first fact, it pairs without any problems and very easily.
* I have used it with mixzing and doubletwist media players. In both cases the music lags and sometimes the lag/pause is about 2-3 seconds long.
* incoming call shows phone number only, no contact name.
* voice dialing works.
* when I m listening to music or not listening to music on incoming call the headset converts to phone mode fine but after the call is finished, the headset doesnt reverts back to media mode that is, the music doesn't plays again and I tried connecting and disconnecting again but only way to make it work again is restart the headset.
* battery is so far ok for the headset. Infact I runned out of my phone battery while I was trapped in underground and listening to music.lol
* even the headset is connected, if I play youtube video, the sound comes from the phone speaker. In order for it to come from headset I have to play some music from using my headset controls and then play the video and then pause the track. This also happens with music app aswell sometimes. Like the headset is connected and if I play the song using my phone, it will play through phone speaker and I have to pause it and play it using my headset controls in order to listen through my headset.
So far its oki but its annoying the laggy music thing. It only occours in music playback, I spoke to my mate on phone for couple of hours using this headset and both ends could listen loud and clear.
i also paired it with my inspiron duo tablet and its working flawlessly....so anyone have any work around of the above mentioned problems? anyone facing the same problems? is it because i am using custom ROM? i am ok with the headset not showing song tags and stuff but music being laggy is not acceptable...because thats what i bought it for!
Any help would be much appreciated?
thanks

FM radio program (with function to play through the speaker)

Ever wanted to play the radio through the loudspeaker or delete the original player and have the application of the FM radio and music player separate? Well, here I leave the FM radio apk motorola milestrone 2 which is functioning in the FlipOut PERFECTLY.
You can install it as a normal or leave apk system / apps and give the permissions as if it were an application of the original system, I hope you enjoy
PS: Sorry for my bad English
don´t work with my flipout..it wants to stick the headset in...normaly the handy uses the headset as an antenna.
no this program have the funcion to play the radio for the speaker but the headsets connected to the phone
Sorry for my bad English
no sry necessary...you didnt wrote anything using without antenna! so it was my mistake..
I don't know if others have the same problem but on my Flipout the station presets don't work as they should. I can save a radio station on a preset position and directly after that I get an error message. The preset list on the right displays the just saved radio station but as soon as I try to choose any preset station I always get an error message. So I have to switch between different radio stations only by using the frequency display or the arrow buttons.
Any ideas if this can be solved? Thanks.
Great!!!!!!!! thx
Very nice! Thank you very much!
I had no hope for a radio app as I read that the fm features are closed source and for this reason it is not possible (or very hard) to program a radio app. But to take one from another phone from motorola is ridiculous.
This app is better then the stock one.
Unfortunately it is also not compatible with Headset Button Controller. (an app to adjust the volume, next song etc. for one-button-headsets.) So changing volume/sender is still uncomfortable.
You can try the app - FM Radio Speaker is an easy-to-use tool that can turn on the speaker to play when the headphones are inserted.
https://play.google.com/store/apps/details?id=com.wikimediacom.fm.radio.speaker

[Q][FLYER] how to keep BT radio alive?

I use A2DP with JABRA headset e.g. with Sygic + Navigon route planners.
Every time when a spoken instruction is started the BT radio is swithed on but appearently needs some time to go alive and you always miss the first part of the instruction on the headset.
I sincerely hoped (this is my main application for the flyer) that after the official FOTA of HC this would be somehow fixed but sadly it is not.
Does anyone know a workaround or a solution for this?
Is there a way to not switch off the BT radio with silence while BT is switched on? (nevermind the battery use!)
Thanks
Ronald
Clearly I need to find another forum for this issue.
Any suggestions where?
Clearly
Sent from my PG41200 using XDA App
Clearly,,,,
but its not the radio turning off, if the radio turned off, it would disconnect/ this happens on a lot of devices, especially hands-free car devices, they miss the first part of audio when its not continuously streaming. Happens on my Flyer and Moto and Samsung phones with my Moto BT car device. There's no solution available.

[Q] Liquid smooth 3.2 & Bluetooth

Scroll down I resolved other problem, but I have another now lol.
My 2012 Yaris stock radio bluetooth will not let me adjust the volume on my radio when I am streaming music.
When I use anything with sense on it, it is okay, but when I try using ASOP or anything without sense; it is not
Suggestions?
Did you try reflashing the ROM after a full wipe?
Thanks! That worked!
I just need to figure out why my car volume for music streaming through bluetooth isn't working
Would you know? ^_^?
EDIT: It was working with the HTC music player no problem, but when I switched to liquid; my phone uses google music now, so that could be a reason. Any ideas how I could switch to the HTC music player or some other one to set as default?
Do phone calls work through Bluetooth?
Typically when you flash/re-flash a ROM you have to re-pair the phone to the car. The car will most likely remember the phone but you would have to Allow the car to read data from the phone.
emptyshell said:
Do phone calls work through Bluetooth?
Typically when you flash/re-flash a ROM you have to re-pair the phone to the car. The car will most likely remember the phone but you would have to Allow the car to read data from the phone.
Click to expand...
Click to collapse
Yeah I re-paired it. Still no good
I have a 2012 Yaris with a stock radio that has bluetooth. I am going to try a ROM with sense on it and see what happens.
Going with InfectedROM eternity to see first.
EDIT: Okay with sense the streaming works no problem and my radio says streaming audio, but without sense or on liquid; my radio only says BTA
I don't know anyway around this I really like liquid too!
Okay, so I somewhat figured out the problem.
My phone running on liquid does not let me put the "pairing code", so this might be stopping my phone to directly connect to my car stereo.
Any suggestions on fix?

Issue with phone getting stuck on bluetooth for audio

Hi guys,
I've been having this weird issue for some time, and it seems to not be related to any roms that I run, since it has happened on multiple roms. Here is my issue: I connect to my car's bluetooth to use things like Pandora, Music, hands-free calling, etc. When I disconnect from my bluetooth, however, my audio still thinks it is connected to a bluetooth device, which I can tell by when I adjust the volume since it has the bluetooth icon instead of a speaker. I have tried turning bluetooth on/off and closing apps and whatnot with no luck. I even tried stopping the music app and turning off bluetooth before I shut my car off, still the same thing.
Do you guys have any suggestions, or has anyone else experienced this? Normally a reboot will fix this, but my current rom locks up sometimes when I reboot, which is a pain since I have one of those Neo Hybrid cases on my phone.
Thanks,
Steve
I had a similar issue with my s3 last year. I believe I fixed the problem by going to settings> application manager> all (2 swipes to the left), scroll down to "Bluetooth Share", then clear cache & data. Hope this helps. You'll have to pair your Bluetooth devices again.
Sent from my SCH-I545 using Tapatalk 4 Beta

Categories

Resources