[APP][5.0+]OBD2 Plugin for Android Auto - Use Torque with AndroidAuto

Do you want the app to incorporate it's own stats (See post #1127)

  • Yes

    Votes: 18 90.0%
  • No

    Votes: 2 10.0%

  • Total voters
    20
  • Poll closed .
Search This thread

Emil Borconi

Recognized Developer
Feb 18, 2008
3,206
2,902
Tg. Secuiesc / Kezdivasarhely
Just a quick update to the issue I am having. Was using the originally released version successfully (other than the issue with the MPG jumping around when the value was over 100). I have a 2010 Prius and the custom PIDs worked fine.

I wiped my phone last night to try to address battery issues on my Nexus 6P, so I did a fresh install of both Torque Pro and OBD2AA 1.2 on the current non-beta version of Android O. I am now back to the issue where the custom PID values read zero, but the standard PID values work. I have the first 3 gauges set with custom values and the last 3 gauges use standard PIDs.

Puff...

I will probably need more details on that, I will email you on Sunday or Monday, calling it a day today and I'm out all day tomorrow.
 

spiff72

Senior Member
Apr 14, 2006
476
39
Puff...

I will probably need more details on that, I will email you on Sunday or Monday, calling it a day today and I'm out all day tomorrow.

If you like, I can create another bug report like I did previously. Part of me wonders if the order of the gauges makes a difference. When i submitted the report previously, I think I had the "standard" gauges first, and the customs last. And I think the ones that were missing are the ones that were getting data from the previous gauges. I am in no hurry for support - it is a holiday weekend here. I can always revert back to the old version.

Thanks again!
 

Emil Borconi

Recognized Developer
Feb 18, 2008
3,206
2,902
Tg. Secuiesc / Kezdivasarhely
If you like, I can create another bug report like I did previously. Part of me wonders if the order of the gauges makes a difference. When i submitted the report previously, I think I had the "standard" gauges first, and the customs last. And I think the ones that were missing are the ones that were getting data from the previous gauges. I am in no hurry for support - it is a holiday weekend here. I can always revert back to the old version.

Thanks again!
I'll like to finish with the next version, mainly because I do change a bit the things around (the way I pull data from torque) so I'm hoping that will fix your issue as well but if not we will need to dig deeper.

Thanks for bearing with me.
 
  • Like
Reactions: adfurgerson

spiff72

Senior Member
Apr 14, 2006
476
39
I'll like to finish with the next version, mainly because I do change a bit the things around (the way I pull data from torque) so I'm hoping that will fix your issue as well but if not we will need to dig deeper.

Thanks for bearing with me.

Sounds good - I will just sit tight then...

Thanks!
 

m00n61

Senior Member
Feb 13, 2008
530
167
Samsung Galaxy Tab S2
POCO M3
Hello Emil,
OBD2AA does not show in my list.
Here's my setup:
Lenovo Yoga3 tablet running latest HUR on Android 6
Samsung S8+ with Android 7 and latest versions of Torque and AA (Play Store both)
ELM327 v 2.1 BT
OBD2 adapter is seen by Torque OK
OBD2AA starts OK on the phone.
AA in developer mode
HUR works OK on tablet, no errors
Any idea where I should start?
 

Emil Borconi

Recognized Developer
Feb 18, 2008
3,206
2,902
Tg. Secuiesc / Kezdivasarhely
Hello Emil,
OBD2AA does not show in my list.
Here's my setup:
Lenovo Yoga3 tablet running latest HUR on Android 6
Samsung S8+ with Android 7 and latest versions of Torque and AA (Play Store both)
ELM327 v 2.1 BT
OBD2 adapter is seen by Torque OK
OBD2AA starts OK on the phone.
AA in developer mode
HUR works OK on tablet, no errors
Any idea where I should start?
In android Auto, under developer settings make sure you enable unknown sources.
 
  • Like
Reactions: m00n61

ardicli2000

Senior Member
Sep 30, 2011
586
184
Do we also need a bt adaptor to ceonnect to the ECU? Since Torque app requires so.

Of thats the case pls update the OP and let people know exactly what they need. Cause all of us dont come from torque app site or somewhere else related with the isuue. Thanks.
 

Emil Borconi

Recognized Developer
Feb 18, 2008
3,206
2,902
Tg. Secuiesc / Kezdivasarhely
Do we also need a bt adaptor to ceonnect to the ECU? Since Torque app requires so.

Of thats the case pls update the OP and let people know exactly what they need. Cause all of us dont come from torque app site or somewhere else related with the isuue. Thanks.

Hi yes it does need an OBD2 adapter, and this is a quote from the OP:

This app requires Torque Pro in order to run as well as an OBD2 adapter. In case you do not have Torque Pro yet, please purchase make sure your purchase it from: Google Play
 

ardicli2000

Senior Member
Sep 30, 2011
586
184
Sorry I missed adapter part.

A requirement tab would be nice than. Like:

1. Torque app from play store (costs 3.55€)
2. OBD2 bt adapter (to be bought from market separately)
3. OBD2forAA to be bought from xda lab (costs 2€)
4. Applicable car display, etc.
 

MrShibby

Senior Member
Jul 26, 2012
83
15
Mosel
The bad:
- TomTom does not update the notification in services meaning I cannot read out the Speed Camera notifications :(
The Good:
- CamSam Plus does and I was able to integrate it quite nicely.

Next version is getting close, hopefully by the end of this week we can all enjoy the updated version...
The notification for blitzer.de is what i was looking for. Great Work!
 

FormelLMS

Retired Recognized Developer
Oct 28, 2009
2,647
376
Yes, me too. Sounds good.
@Emil: do you think, you can make an automatic startup from your app while starting Android auto?

So we could be sure, that your services are running every drive we do?
 

Emil Borconi

Recognized Developer
Feb 18, 2008
3,206
2,902
Tg. Secuiesc / Kezdivasarhely
Yes, me too. Sounds good.
@Emil: do you think, you can make an automatic startup from your app while starting Android auto?

So we could be sure, that your services are running every drive we do?
Not without root. CamSam does not export them but it has an option to start automatically when you connect to a Bluetooth device so that will do the trick.
 

FormelLMS

Retired Recognized Developer
Oct 28, 2009
2,647
376
Yes, thats true. I think I have to try those things out.

---------- Post added at 08:26 AM ---------- Previous post was at 08:22 AM ----------

One Problem I've encountered today: I've chosen the Pid for GPS height but its standing still at 100 meters the whole time. GPS speed is working.
 

ControlNode

Senior Member
Aug 25, 2011
86
17
Eastern NC, USA
Knock (PID 220404) gauge is just using the value of the gauge before it. I've had it after Vac/Boost (ff1202)and Timing Advance (0e).
IAT (0f) is showing values as C even though in Torque I've set temps to be F and OBD2AA even indicates it detected F from Torque by the F being in the gauge, but the value is still in C.
I still do not understand when you said the min/max comes from the ECU. If that is true how is it that in torque it is getting values outside the range in OBD2AA from the ECU if the ECU defined a max less than that? See Fuel Rail (23) in pictures.
Also, AFR(m) (ff1249) looks great in position 6, but in 3 it's like the max is much higher as instead of 14.7 being close to 12 o'clock it is at about 9 o'clock.

Car is 2016 Focus RS with Sync3 ver 2.2
OBD2 Adapter is PLX Kiwi BT
Phone is Pixel XL now on Android 8.0.0
 
Last edited:

Emil Borconi

Recognized Developer
Feb 18, 2008
3,206
2,902
Tg. Secuiesc / Kezdivasarhely
Knock (PID 220404) gauge is just using the value of the gauge before it. I've had it after Vac/Boost (ff1202)and Timing Advance (0e).
IAT (0f) is showing values as C even though in Torque I've set temps to be F and OBD2AA even indicates it detected F from Torque by the F being in the gauge, but the value is still in C.
I still do not understand when you said the min/max comes from the ECU. If that is true how is it that in torque it is getting values outside the range in OBD2AA from the ECU if the ECU defined a max less than that? See Fuel Rail (23) in pictures.

Car is 2016 Focus RS with Sync3 ver 2.2
OBD2 Adapter is PLX Kiwi BT
Phone is Pixel XL now on Android 8.0.0

- I have already fixed the temp conversion for next release.
- Also looking to get the issue with wrongly updated PIDS sorted.

This is the documentation for torque plugin: https://torque-bhp.com/api/ITorqueService.aidl

This is the method used to get the min/max values for pids:
Code:
 /**
    * Return all the PID information in a single transaction. This is the new preferred method to get data from PIDs
    *
    * The unit returned is the raw unit (used for getPIDValues) - you can get the users preferred unit by using the relevant API call 
    *
    * Format of returned string array:
    *  String[] {
    *       String "pid information in csv format"
    *       String "pid information in csv format"
    *       ...(etc)
    *    }
    *  
    *  Example:
    *
    *   String[] {
    *      "<longName>,<shortName>,<unit>,<maxValue>,<minValue>,<scale>",
    *      "Intake Manifold Pressure,Intake,kPa,255,0,1",
    *      "Accelerator Pedal Position E,Accel(E),%,100,0,1"
    *   }
    */
   String[] getPIDInformation(in String[] pidIDs);

And this is how I'm supposed to get the values:

Code:
  /**
     * Return the current value only for the PID (or PIDs if you pass more than one)
     *
     * Use this method to frequently get the value of PID(s).  Be aware that the more PIDs you request, the slower the update speed (as the OBD2 adapter will require to update more PIDs and this is the choke-point)
     * This method is asynchronous updates via the adapter
     */
    float[] getPIDValues(in String[] pidsToRetrieve);

This is all I know, but yes as you said values returned by this function sometimes do not match what is shown in Torque. I did try to get some help from the Torque developer but I haven't got a response till now.
Also the second method is supposed to return an array with the values for the PIDS in question, during debugging I did saw that the array sometimes returns same value for multiple pids which makes no sense to me. If there is no update or no value for a pid I will expect the function to return 0 or NULL or something like that, having multiple pids returning the same value doesn't help at all.

The only way I think I can overcome this is to fetch each pid separately instead of bulky but that has a performance hit cost, however that way I can at least control the returned data.

As for min/max I saw strange ones as well, Torque reported a max value of 100 when I got a report on the pid, but when I started fetching the data, it returned 700.... The lesson is that I cannot really trust what Torque is reporting. In the next version, if the fetched value is more than the max reported value, the app will adjust the max value of the gauge to match the newly fetched data... not ideal but better than now. I was under the impression that torque function which provides the information about a PID reads the data from the ECU, but I'm not so sure about it now.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    3.6a is the app. Run the apk.
  • 51
    App Requirement
    • Torque Pro
    • OBD2 Reader
    • Android Auto compatible headunit or at least a copy of the Headunit Reloaded App (see signature).


    This app will have limited functionality if you are using Android Auto on a your phone, the only functions you will be able to use is to see are notification about the speed cameras and street card!
    Gauges and torque data will NOT work!

    Previous XDA purchases can be reclaimed here: https://www.b3itlabs.com/download.php

    How to purchase:
    1. Visit: https://www.b3itlabs.com/prod.php?id=2

    Instructions on how to get it running:

    Option 1 - Will work on any phone & car/headunit combination, however the following features won't: - AutoPlay Music, 6 Tap limit remover, DPI change

    1. After installing the app from XDA Labs, sign up for beta testing here: https://play.google.com/apps/testing/uk.co.boconi.emil.obd2aa and update the app
    2. Once app is updated, make sure you disable auto-update in PlayStore then please uninstall it and reinstall it from XDA Labs.
    3. With your screen unlocked, plug in the phone to the car, when prompted which app to use make sure you select "Android Auto"


    Option 2 - Might NOT work on some device combination (for sure it won't work on Xiaomi phones), but if this method works all functions of the app are available
    1. Install
    2. Make sure you do not have any other 3rd party app Android Auto app installed.
    3. Open the app and hopefully it will be quite self explanatory on how to set it up (choose colours, set gauge number, etc)
    4. Open Android Auto (on the phone), go to About, tap the "About Android Auto" header 10 times, once you are a developer from the 3 dotted right corner menu select "Start Headunit Server" (ROOT users can skip this step!)
    5. Close Android Auto
    6. MAKE SURE YOUR SCREEN IS UNLOCKED and connect to the car, when prompted which app to use select "OBD2AA" and always (this needs to be done one time only) - If you are a HUR user select Android Auto and always! (If you do not see the prompt to chose, please go to settings -> apps -> all apps -> Google Play Services -> Clear Defaults and then try again)
    7. Select the last tab on the right, by pressing it again you should see an app selector and choose OBD2AA
    8. Give it a bit of time to start pulling the data from Torque.

    Change log
    Version 3.2 and 3.3 released 04/11/2018

    • Fix "drunk" map effect on Sync 3 units
    • Fixed rooted devices not being able to start headunit server.
    • Added option to change DPI for your screen!
    • Added option to auto play music on start
    • Added option to select default start screen.

    Version 3.1 releases 26/08/2018
    • Compatibility fix for Pie devices.
    • Tap limit remover now working on all device
    • Tap limit remover allows Maps to be searchable even when driving.
    • Can be used for those who have problem with the parking brake wire.
    • Freeze issues fixes.
    Important notes

    Version 3.0 releases 05/07/2018

    • Compatibility fix for AA 3.0 and above.
    • Added option for overriding 6 tap limits
    • Added option for Bluetooth Audio output.
    Important notes

    Thanks to @slash_m_a_x for the support offered on this.

    - Some users have reported choppy audio when using the app, this will mainly be due to the speed of the phone, the buffer on the car/headunit and other factors which are out of my control, if that is the case and you cannot use the app please feel free to contact me for a refund.
    - Bluetooth Audio output might not work on all devices, it does depend how the car/headunit handles the Bluetooth. There will be devices which completely disable A2DP/Bluetooth capabilities of the car when Android Auto is running. In this case all the sound will be heard from the phone speaker rather then the car speakers.
    - Tap limit will be disabled only for cars/headunits which are equipped with a GPS.
    - In rare cases it can happen that after unplugging the phone from the headunit you will see a message which says that you are still connected to Android Auto, simply Force Stop the Google Play Services.
    - You always need to make sure that Headunit Server is running on the phone (unless you have root), if the icon bothers you simply hide it.



    Change log
    Version 2.0 releases 17/01/2018

    • Added new layout option
    • Added styled gauged
    • Option for custom background on each gauge.
    • Option for custom needle on each gauge
    • Removed integration for CamSam/Blitzer.de (fully integrated now)
    • Possibility to change needle color
    • Possibility to adjust arch (indent, position, length) when using custom bg
    • Separated speed camera settings
    • Option to only download speed cam db over Wifi
    • Fixes for min/max value
    • Speed camera warnings over car speaker (Thanks @martoreto for the how-to)
    • Street info card
    • Added French translation (Credit to @fbike for doing the translation)
    • Added Danish (Credit to @Gunde for doing the translation)
    • Added Finnish (Credit to @Pyrres for doing the translation)
    • Added Spanish (Credit to @madabase for doing the translation)
    • Added Italian (Credit to @ilgaspa for doing the translation)


    Version 1.6a - releases 03/10/2017
    • Fixed negative input for min/max values
    • Code cleanup
    • Added Greek language (credit to @sosimple for translating)

    Version 1.6 - releases 29/09/2017
    • Fixes for custom PIDS
    • Fixes on Graphics rendering.
    • Fixed overlapping text
    • Fixed PSI/BAR conversion
    • Enhanced the gauge style.
    • Different approach for torque data pulling.
    • Moved to service should start work automatically when connected to the car
    • Added Supports PID alarms from Torque.
    • Added Toggle/Collapse layout for Pid settings.
    • Added Preview button with random data
    • Added Option to toggle units display
    • Added notification cleanup on exit
    • Added translation for DE,HU,RO (Credit to @FormelLMS for DE)
    • Added import/export setting option
    • Added option for colored text
    • Added TPMS option/screen
    • Added option to override car's headlights based on day/night
    • Added warning screen if nothing is configured to prevent black screen with no information.
    • Added more settings and move them to separate Settings options.
    • Added customizable background
    • Added search for PIDs
    • Added Support for Heads-Up notification
    • Added Speed camera warnings (powered by CamSam Plus)

    Supported settings/Features:
    • 3 x Colors for each gauge
    • Text color
    • Toggle needle, arch,units,scale,decimal and text for each gauge.
    • Variable number or gauges ( 1 - 15 )
    • Set warning limit for each gauge (percentage). This will be calculated relative to the given PID max value which is retrieved from Torque at runtime.
    • Possibility to set gauge in reverse mode. (example fuel tank)
    • Units will be converted automatically based on your Preferences in Torque
    • TPMS Screen (if you have PID's for TPMS data)
    • Possibility to use custom background/needle for each gauge
    • Low Fuel warning
    • Warm Engine warning
    • Speed Camera Heads Up Warning
    • Option to Overwrite Headlights state based on calculated sunset/sunrise


    How to use it?
    Open app and select each PID you want to display on your screen, adjust the number or gauges you want to see adjust the preference for each PID. If you want to use custom background/needle and interested on how to, please read HERE

    Locking Pid values
    On some PID's Torque reports wrong min/max values, by default if while using the application a reported value is higher/lower than the initially reported range, the app will adjust the range to the new values. However in some cases this is not desired and you will like to specify manually what is the min and max value for the give PID. In this case, simple edit the minimum/maximum for the pid and they will become locked, meaning the app won't make any adjustments.
    By editing, it means you have to change the min or max value, the lock is triggered by the first keypress on this input fields.
    The lock will be automatically removed when you select a different PID for the same gauge.

    Preferences menu
    • Alternative pulling - Only enable this option if you have difficulties getting gauges updated, it uses an old deprecated method of obtaining data so should not really be used.
    • Enable debugging - Only enable it if you have problems with the app and I requested you to collect a bug report, otherwise it will spam the logs for no reason.
    • Automatically start Torque on Android Auto - Nothing to explain here :)
    • Launch FartKontrol on start - launches a Danish Speed Camera app (useless outside Denmark)
    • Custom Background (any background you will like to use instead of the black color)
    • Demo - When enabled random data is generated for the PID's just to see how things will look (in case you do not have an OBD2 adapter), so don't enable it.
    • Pid Alarms section. You can set up a low level fuel warning (displayed as a heads up notification) and a notification when the engine is warmed up. There a several PID options for both of this, pretty self explanatory.

    TPMS Settings
    - You set up the 4 PID's for TPMS, this will be used to display the tyre pressure values on the TPMS screen inside Android Auto

    Speed Camera
    • Show current street card - Displays information about current street (name and speed limit if know). This information is updated once in 5 seconds and at a minimum distance of 200 meters so it's not 100% accurate it's more for general information.
    • Enable speed camera warnings - This will enable the app to display speed camera warning when driving, like any app which does this it relies on a database, which means it does NOT guarantee that it will warn you of all the cameras, and it might also produce false warnings. All options are pretty self explanatory.

    Export & Import
    - Allows you to export your current app configuration file which can later be imported (grate way of saving time of re-doing everything) after a clean install or so. The format use for Export & Import is JSON so if you want you can manually edit/adjust the values. Please see following post for more details about the sturcture/value/meanings


    Permissions
    • Read notification permission - Only required so the app can read the notifications from CamSam and display them on AA scren
    • Locations - Only required if you want the app to overwrite the day/night theme based on sunset/sunrise
    • Storage - Only needed if you want to use your personal image as a background and/or planning to import/export settings

    Can I create my own layout for the gauges?
    - Yes, see instructions below:

    Here is an example of the XML structure required, once you created the XML please send it over by email to [email protected] and I will include it in the next build.

    Code:
          <FrameLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:tag="wrapper_layout">
            <!-- Left column -->
    
            <View
                android:layout_width="226dp"
                android:layout_height="226dp"
                android:layout_gravity="center_vertical|start"
                android:tag="gauge_2"
                />
    
            <!-- Middle column -->
            <View
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_gravity="center"
                android:tag="gauge_1" />
    
            <!-- right column -->
    
            <View
                android:layout_width="226dp"
                android:layout_height="226dp"
                android:layout_gravity="center_vertical|end"
                android:tag="gauge_3" />
    
        </FrameLayout>

    Important
    • Each view must contain a tag, which is formated like in the example, where the number corresponds to the Gauge number from the setting screen.
    • The layout which wraps everything together must have a tag called: wrapper_layout
    You are free to use any Layout you want, except ScrollView.


    How to produce bug report?

    Step 1 you need to enabled debugging in OBD2AA app, then follow this instruction set:

    2. Enabling Developer Mode
    1. Open Settings > About phone.
    2. Scroll down to the Build number.
    3. Tap the Build number 7 times in quick succession until "You're now a developer" appears.
    4. Return to the Settings menu and select Developer options.
    5. At the top of the screen, make sure 'Developer options' is set to On (green).
    6. Scroll down to Debugging and enable both USB debugging and Bug Report Shortcut on (green).
    7. Tab on Logger buffer sizes: Default setting is 256K. Select 16M to help capture more information for debugging. Of note, it can affect the apps performance especially with lower spec phone, so change it back after you have finished submitting bug reports.

    3. Capturing a Bug Report
    It's very important to do this right after you experience the issue again, so your device can log at least one occurrence of the issue.
    1. Hold the Power button down until the menu appears.
    2. Select Take bug report. and wait for the device to capture the bug report.
    3. Tap the 'Bug report captured' notification when it appears.
    4. Share the bug report. (I recommend to email it to yourself.)
    5. Download the bug report to your computer.
    6. Send the bug report by email to [email protected]


    I have decided to open up my software, meaning I have made the source code available on GitHub, but it's only available for personal use, and you are not allowed (under any form) to redistribute your own version of the app. You can download and compile it yourself if you wish to do so, and you can implement your own changes for your own personal use, but you cannot create clones of the software which you redistribute under your own name. Source can be found here: https://github.com/borconi/obd2aa.
    Due to the fact that there are some irresponsible developers out there, who created video apps for moving cars, which was one of the main reasons Google blocked 3rd party apps, I won't be updating the code on github any more, to try to prevent those developers to use my technique to overcome the limits. If you are developing a 3rd party app and you will like to know more about how I have done this, you are always welcome to contact me. If your project is something useful, I will be more then happy to share things with you.

    This does not mean it is now a free app and apk can be freely shared!
    17
    Thanks all, this is what keeps me going :) don't worry I haven't given up, finally today I had my exams (passed both) so I will be hitting the road in a couple of hours (1600 miles or 2700km with a few stopovers) so I should be home by Tuesday evening. Once home I'm sure I will find some time for more development.
    17
    I made some really good progress, with the app.
    All you guys with non-rooted phone can expect a public beta this week.
    16
    Non-Root users a gimps of hope for you too as well, today I have managed to move forward from where I was stuck since February with the hack, so hopefully I will be able to make further progress and get it back online in the next couple of weeks for everybody.
    16
    Hi guys. Back in the UK and I'm working on it. Currently still stuck at the same point (SSL related) I will update you as soon as I can, at least testing is much easier now.
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone