Tuesday, July 23, 2019
Tasker has finally made A2DP Volume obsolete
The latest Tasker update has finally brought the remaining features of A2DP Volume. See the article on XDA Developers. It looks like it is now capable of force connecting/disconnecting Bluetooth devices and responding to Bluetooth device connections. Tasker is a bit cryptic to setup so non-programmers may struggle but you can also share Tasker profiles pretty easily these days which should help that. Those users of A2DP Volume looking for more features should try Tasker.
Sunday, June 16, 2019
A2DP Connect going away as separate app
A2DP Connect (a.k.a. A2DP Connect2) is being replaced with widget integration into A2DP Volume. In order to make the widget icon change based on connection state I needed to track the connection state of Bluetooth devices. A2DP Volume already does this. Rather than have another background service, and now the required notification icons, I instead integrated the A2DP Connect widget into A2DP Volume. Now A2DP Volume has 2 widgets.
Saturday, February 23, 2019
Working on A2DP Connect2
I finally got around to dusting off the aging A2DP Connect2 widget and getting it updated to work on newer devices better. I have not yet pushed an update to the Play Store but I am putting signed APKs as I progress here. I also have the Github page for it here. I have it compiled for API 19 through the current API 28 (Pie). I cannot test it in emulators though so I have only tested on Android 7 and Android 8 right now.
The most requested issue, which is posted on the issues list, is to have an indication of the connection state. I have that somewhat working. I say somewhat since there is not an interface to get this. In Android you are supposed to use a background process to listen for Bluetooth connection changes. These are called Broadcast receivers. You register your receiver with filters to call back to your service when the connection changes. In the response, it will tell you details such as profiles that connected and of course the current connection state. This is how A2DP Volume does it. There is another back door approach that involves using reflection to access methods that are not exposed. To do that you must bind to a service that accesses an IADL. A2DP Volume and A2DP Connect2 use this to make the connect/disconnect happen. It's tricky and undocumented, and risky as they can change Android and break this with no warning. This happened back when Jelly Bean came out and the Bluetooth stack was replaced. I have made several attempts at using this method to get connection state but there are incompatibilities between widgets and binding services that I have not yet been successful.
Update: After hours of trying and failing, it finally seems to work. Opt in to the beta testers to get the test apk: https://play.google.com/apps/testing/a2dp.connect2. Let me know your feedback.
Update 3/9/2019: In order to make the icon change based on connection state, I needed to have a foreground service running which means having a notification icon active. I thought that was too much for a simple widget. So, I added a simple call from A2DP Volume (which already has the service running) to run an update service in A2DP Connect2 and update the icon when the state of the Bluetooth connection changes. This will be in version 2.12.12.5 of A2DP Volume.
The most requested issue, which is posted on the issues list, is to have an indication of the connection state. I have that somewhat working. I say somewhat since there is not an interface to get this. In Android you are supposed to use a background process to listen for Bluetooth connection changes. These are called Broadcast receivers. You register your receiver with filters to call back to your service when the connection changes. In the response, it will tell you details such as profiles that connected and of course the current connection state. This is how A2DP Volume does it. There is another back door approach that involves using reflection to access methods that are not exposed. To do that you must bind to a service that accesses an IADL. A2DP Volume and A2DP Connect2 use this to make the connect/disconnect happen. It's tricky and undocumented, and risky as they can change Android and break this with no warning. This happened back when Jelly Bean came out and the Bluetooth stack was replaced. I have made several attempts at using this method to get connection state but there are incompatibilities between widgets and binding services that I have not yet been successful.
Update: After hours of trying and failing, it finally seems to work. Opt in to the beta testers to get the test apk: https://play.google.com/apps/testing/a2dp.connect2. Let me know your feedback.
Update 3/9/2019: In order to make the icon change based on connection state, I needed to have a foreground service running which means having a notification icon active. I thought that was too much for a simple widget. So, I added a simple call from A2DP Volume (which already has the service running) to run an update service in A2DP Connect2 and update the icon when the state of the Bluetooth connection changes. This will be in version 2.12.12.5 of A2DP Volume.
Friday, February 8, 2019
Recent updates to A2DP Volume
I have been busy this winter finally getting around to fixing a bunch of broken stuff on A2DP Volume and making changes required to comply with Play Store policy changes. You can see the log of updates on Github. Here are some highlights:
- Removed a bunch of really old and unusable Pandora integration.
- Fixed the custom intent maker to actually work
- Fixed many issues around registering and unregistering broadcast receivers. This was the root cause of the notification reader reading messages twice. I also added a simple check to prevent the same message from being read twice.
- Fixed the media playback when using voice call stream. It works on Spotify now but not necessarily all players.
- Updated the minimum SDK (Android version) to 23 (or Android 6.0) and the target SDK to 28 (Android 9.0). This is far more work than it sounds as this requires many things to be re-implemented as older methods are deprecated. Play Store now requires the target SDK be 26 or higher.
- Many additional robustness improvements.
- Added many log file entries so people can use LogCat and see what is going on.
- Removed the SMS reader to comply with new Play Store policy. Now you have to use the notification reader to read SMS messages. This also removed a bunch of permissions including not just SMS but also contacts access.
- Added a shortcut from the preferences menu to set up your notifications and removed the internal app preferences for notifications. Basically Android now gives the user much more control over notifications so now you just use the configurations in Android for this. I added a wiki about this here.
- I removed the ability for A2DP Volume to set the media volume in Android 9 and up since Android 9 already has this built in to the OS. However, I got bad reviews and complaints about removing it so I added it back but made the default to not set media volume. It really is no longer needed and it may actually fight with the OS if you use it but I guess folks will need to learn that themselves. It is interesting that it took until Android 9 to finally implement this, making the feature this app was named for obsolete. Now I really should change the name.
- I made many improvements to the way the media volume before a device connects is captured. This ensures that an adjusted media volume is not captured instead.
- I added an additional check to open the notification access permissions settings in Android so users can enable A2DP Volume notification access to make it work. This was not very obvious and nobody seems to read the manuals so I hope this helps. Many bad reviews claiming the reader did not work.
Sunday, August 26, 2018
Android 9 (Pie) makes A2DP Volume original feature obselete
I presumed this would happen from the beginning but it sure took a long time. Android 9 finally has a feature to remember last used volume from connected Bluetooth devices. This means you no longer need A2DP Volume to manage the media volume for you (its original and primary feature). In fact, if you have Android 9 do not use the A2DP Volume media volume adjustment feature as it may fight with Android 9's own feature for this same purpose.
Here is an article explaining the Pie volume management feature: https://www.androidpolice.com/2018/08/07/android-p-will-remember-individual-volume-levels-bluetooth-device-connect/
Here is a brief statement about the feature: "Volume memory per Bluetooth device: Android 9 will now remember the last volume you set for each of your Bluetooth devices. No more blasting music too loudly when you reconnect to your car or headphones."
At this point A2DP Volume is an maintenance mode. I plan no new features for it and I expect over time it will quietly disappear as people get Android 9 and above.
See also issue 287: https://github.com/jroal/a2dpvolume/issues/287
Here is an article explaining the Pie volume management feature: https://www.androidpolice.com/2018/08/07/android-p-will-remember-individual-volume-levels-bluetooth-device-connect/
Here is a brief statement about the feature: "Volume memory per Bluetooth device: Android 9 will now remember the last volume you set for each of your Bluetooth devices. No more blasting music too loudly when you reconnect to your car or headphones."
At this point A2DP Volume is an maintenance mode. I plan no new features for it and I expect over time it will quietly disappear as people get Android 9 and above.
See also issue 287: https://github.com/jroal/a2dpvolume/issues/287
Saturday, January 21, 2017
Handling Android 6.0 permissions
I finally got around to handling the new Android 6.0 permissions properly. A2DP Volume requires many permissions which are explained here: https://github.com/jroal/a2dpvolume/wiki/Permissions-Explanation. Android 6 brings a new way to allow the users line item veto, at least to some degree which is explained here: https://developer.android.com/guide/topics/permissions/index.html. If you are on A2DP Volume version 2.12.8 or older, and you first installed A2DP Volume on a device with Android 6 or higher then you may run into problems with features not working or even app crashing. The temporary fix for this is to go to Android settings -> apps and select A2DP Volume. Then click the "permissions" button and enable all permissions. A2DP Volume 2.12.9 will fix this by explaining and requesting permissions when you first open the app.
Tuesday, June 16, 2015
All projects moved to GitHub
Since Google is closing their developer website I had to export all projects to GitHub. Here are the new homes:
A2DP Volume: https://github.com/jroal/a2dpvolume
A2DP Connect: https://github.com/jroal/a2dp-connect
A2DP Connect2: https://github.com/jroal/a2dp-connect2
You can see all my GitHub projects here: https://github.com/jroal
I will stop using the google code pages immediately. All activity will move to GitHub.
A2DP Volume: https://github.com/jroal/a2dpvolume
A2DP Connect: https://github.com/jroal/a2dp-connect
A2DP Connect2: https://github.com/jroal/a2dp-connect2
You can see all my GitHub projects here: https://github.com/jroal
I will stop using the google code pages immediately. All activity will move to GitHub.
Sunday, May 10, 2015
Android apps
Lately I have been busy and have not done anything with my Android apps. I am thinking I have lost interest. When I look at the reviews and the issues list it now feels more like work than fun. I did move it to github now since the Google developer site is going away. Today I made the required updates to the app ratings per play store requirements. It's surprising how much maintenance is required even when you aren't working on the app.
Friday, December 5, 2014
A2DP Volume and Android Lollipop (5)
As Lollipop is now starting to roll out to several devices people are asking if A2DP Volume is compatible. So far I have only run 2.11.11 in the Lollipop emulator. That does not test much functionality of this app really since Bluetooth is not supported in the emulator. However, A2DP Volume did run and all features I was able to test (or have tested so far anyway) worked. My test devices (newest is Droid Bionic with KitKat) are all old enough now they don't have a Lollipop build that I can find. My main phone is a Droid Maxx and it will be getting Lollipop soon. That will likely be the first time I can test the app on a device. Unfortunately it will likely be at least January before Lollipop lands on the Maxx and I will be in the middle of FIRST robotics build season then so I will have no time to work on the app. Because of this it will be second quarter sometime at the earliest that I can test and make any fixed needed for Lollipop. Until I do get Lollipop, feel free to post issues you find on the issues list. I work those issues when making a new release.
I am just one guy making this app in my "spare" time. I get help with translations from others but almost no coding help. I am also an amateur programmer. I make no money from this work. In fact, it costs me a bit to deploy to various app stores so my total profit from this and all my apps is actually negative. My apps have no ads or ad revenue. I am not collecting any data or making any money in any way. I make the apps for my own use and then I open source them and give them away free on the the Play Store and Amazon app store. For me it is a fun hobby. I get several offers to monetize my apps every week even though I have a statement in the Play store stating I have no intention to monetize my apps. Sadly, others such as Ksoft are taking my work and monetizing clones of it. I am not whining here but rather just trying to set expectations. Also, I would very much welcome some more developers to help with these apps.
I am just one guy making this app in my "spare" time. I get help with translations from others but almost no coding help. I am also an amateur programmer. I make no money from this work. In fact, it costs me a bit to deploy to various app stores so my total profit from this and all my apps is actually negative. My apps have no ads or ad revenue. I am not collecting any data or making any money in any way. I make the apps for my own use and then I open source them and give them away free on the the Play Store and Amazon app store. For me it is a fun hobby. I get several offers to monetize my apps every week even though I have a statement in the Play store stating I have no intention to monetize my apps. Sadly, others such as Ksoft are taking my work and monetizing clones of it. I am not whining here but rather just trying to set expectations. Also, I would very much welcome some more developers to help with these apps.
Friday, September 26, 2014
Motorola T605 install in a 2006 Porsche Cayman S
This is another T605 I did in my personal car. This time it is in my 2006 Porsche Cayman S with CDR24 head unit and Bose premium sound. This car has a MOST fiber optic stereo network making it more expensive to get the Bluetooth stereo into the cars factory system. Because of this I chose the FM modulator route but at least I used a wired in FM modulator which is less bad. Here are the parts I used.
Item 2 above is an adapter harness that plugs into the head unit to give power, ground, mute, and phone audio in to the T605. This is handy because it uses the phone capability of the factory CDR24 head unit to support the phone hands free functions. Even if the radio is OFF when a phone call comes in the radio will turn ON, show "PHONE" on the display, and use the factory speakers for the phone audio. The adapter harness may require some modification, as it did in my case. They supplied a green connector but my car has that connector slot already filled. I have to remove the 2 wires from the green connector and insert them into my existing connector.


This was a bit tricky if you don't have the connector tools. I just cut the green connector housing and split it such that I could remove the terminals. Be careful you don't damage the terminals. Make sure you get them through the cover and blocker in the factory connector correctly before fully inserting them. You will find this information useful: http://www.pelicanparts.com/techarticles/Boxster_Tech/88-ELEC-Radio_Install/CDR_24_Pinout.pdf
Pay attention to the user settings to get the phone audio stream to work properly. See the CDR24 manual for instructions on setting the user settings.
Initially I attempted to intercept the stereo signals inside the CD changer before the MOST module. However, I could only find 1 circuit with audio. I suspect it is multiplexed. I also found at least 2 data links between the CD changed and the MOST module mounted on the back.
You can buy MOST interface modules but they are crazy expensive. I think the cheapest was $350 (http://www.installer.com/item/display_item.php?it=mostaux-por). Not really worth it. Longer term I plan to get a double DIN head unit that supports Android Auto. Those should be out next year and that looks like the way to go by far. When I do that, I will need to replace the factory stereo amplifier too as it uses MOST. That is a bummer since it has a great amp.
Here are some photos of the control pad.
It is in the visible area below the spoke of the steering wheel. This location works best as the T605 lights can be a bit bright at night. The control is easy to access too. I just used the double-sided foam tape to attach it. I used rubbing alcohol to clean the surface first of course. It does not stick real well but the tape is easy to change.
In order for the CDR24 to route the voice call sound through the cars speakers you must configure the telephone mute characteristics in the CDR24 menu. Hold the [Menue] button until the display changes to "User 1". Click (push in momentarily) the radio tuning knob (right knob) until you see "PH MUTE". Turn the tuning knob clockwise until the display says "AUDIO PH". Click the tuning knob once more. Wait a few seconds until the display returns to normal. Now your Bluetooth system should use the stereo speakers properly. See the CDR24 manual for more details.
Once the system is installed and the user setting configured to send the phone audio over the cars speakers, adjust the in-call volume. The following must all be done while the phone has an active call. Use the T605 volume buttons while in a call to give the proper level to the CDR24 to prevent distortion (T605 volume not too high) and background noise (T605 volume not too low). After you get that right, then adjust the CDR24 volume to the correct level. The CDR24 will remember the last used volume.
The system works very well. For an FM modulator the stereo sound is at least decent. It sounds as good as a local FM station. Unless you are an audiophile you will be content with it. Phone function is very good but the sound through the CDR24 phone audio stream (only used for phone calls and message reading) is a bit distorted. I use my A2DP Volume app with all my cars to optimize the value of this system.
8/2018 update: I recently replaced this and the CDR24 with an Android 8.0 head unit.
- Audiovox FM100A FM modulator. Cost $41.98 on Amazon.
- BT-BKR23M Bluetooth installation wiring harness from Discount Car Stereo. $19.98.
- Metra 40 to standard antenna adapter set. I bought this on eBay for $11.95. I have found them even cheaper before. Just search for "Metra 40 Radio Antenna Adapter Cable Kit".
- And of course a Motorola T605 Car Kit. You can get these on eBay, often as low as $25.
Item 2 above is an adapter harness that plugs into the head unit to give power, ground, mute, and phone audio in to the T605. This is handy because it uses the phone capability of the factory CDR24 head unit to support the phone hands free functions. Even if the radio is OFF when a phone call comes in the radio will turn ON, show "PHONE" on the display, and use the factory speakers for the phone audio. The adapter harness may require some modification, as it did in my case. They supplied a green connector but my car has that connector slot already filled. I have to remove the 2 wires from the green connector and insert them into my existing connector.
This was a bit tricky if you don't have the connector tools. I just cut the green connector housing and split it such that I could remove the terminals. Be careful you don't damage the terminals. Make sure you get them through the cover and blocker in the factory connector correctly before fully inserting them. You will find this information useful: http://www.pelicanparts.com/techarticles/Boxster_Tech/88-ELEC-Radio_Install/CDR_24_Pinout.pdf
Pay attention to the user settings to get the phone audio stream to work properly. See the CDR24 manual for instructions on setting the user settings.
Initially I attempted to intercept the stereo signals inside the CD changer before the MOST module. However, I could only find 1 circuit with audio. I suspect it is multiplexed. I also found at least 2 data links between the CD changed and the MOST module mounted on the back.
You can buy MOST interface modules but they are crazy expensive. I think the cheapest was $350 (http://www.installer.com/item/display_item.php?it=mostaux-por). Not really worth it. Longer term I plan to get a double DIN head unit that supports Android Auto. Those should be out next year and that looks like the way to go by far. When I do that, I will need to replace the factory stereo amplifier too as it uses MOST. That is a bummer since it has a great amp.
Here are some photos of the control pad.
It is in the visible area below the spoke of the steering wheel. This location works best as the T605 lights can be a bit bright at night. The control is easy to access too. I just used the double-sided foam tape to attach it. I used rubbing alcohol to clean the surface first of course. It does not stick real well but the tape is easy to change.
In order for the CDR24 to route the voice call sound through the cars speakers you must configure the telephone mute characteristics in the CDR24 menu. Hold the [Menue] button until the display changes to "User 1". Click (push in momentarily) the radio tuning knob (right knob) until you see "PH MUTE". Turn the tuning knob clockwise until the display says "AUDIO PH". Click the tuning knob once more. Wait a few seconds until the display returns to normal. Now your Bluetooth system should use the stereo speakers properly. See the CDR24 manual for more details.
Once the system is installed and the user setting configured to send the phone audio over the cars speakers, adjust the in-call volume. The following must all be done while the phone has an active call. Use the T605 volume buttons while in a call to give the proper level to the CDR24 to prevent distortion (T605 volume not too high) and background noise (T605 volume not too low). After you get that right, then adjust the CDR24 volume to the correct level. The CDR24 will remember the last used volume.
The system works very well. For an FM modulator the stereo sound is at least decent. It sounds as good as a local FM station. Unless you are an audiophile you will be content with it. Phone function is very good but the sound through the CDR24 phone audio stream (only used for phone calls and message reading) is a bit distorted. I use my A2DP Volume app with all my cars to optimize the value of this system.
8/2018 update: I recently replaced this and the CDR24 with an Android 8.0 head unit.
Subscribe to:
Posts (Atom)


