174

[Android 4.1+] HeadUnit Reloaded for Android Auto with Wifi

 2 years ago
source link: https://forum.xda-developers.com/t/android-4-1-headunit-reloaded-for-android-auto-with-wifi.3432348/page-337#post-85950001
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Top Liked Posts

This Threader is a Spin-off of the original: [Android 4.1+] Headunit for Android Auto - 160117 - Self Mode+ other fixes, x86, 720p by the late :crying: @mikereidis.

App links: https://www.b3itlabs.com/prod.php?id=1
PlayStore: https://play.google.com/store/apps/details?id=gb.xxy.hr

Previous XDA Lab purchases can be downloaded using: https://www.b3itlabs.com/download.php

Last edited: 07/02/2021
Version 6.3 Beta 1 released
- Re-wrote whole rendering process to use GLES20, in simple terms video render should use GPU
- Much better scaling approach
- Added support for native AA Wireless. This will only work on the units where the BT is accessible from the Android, as many of those android powered Chinese units, have a separate BT board. For devices which supports this, no headunit server or no WiFi Launcher is needed.
- Changed key mapping, user can now define their own buttons as they wish.

Last edited: 21/06/2020

Version 5.2 released
- Removed WiFi Direct
- Improved menu UI CREDIT and THANKS TO @sebaw
- Updated margin setting
- Added option to record audio using BT mic (motorcycle helmets)
- Added button to reconnect WiFi connection ( phone and unit depended won't work on all units, please read app forum for how to connect)
- Option to disable touchscreen
- Removed brightness adjustment (some users experienced problems adjusting brightness after using previous version, sadly they need to do a factory reset of the unit, and update to current version)

Version 5 released
- New UI CREDIT and THANKS TO @sebaw
- New over-scan approach allowing any resolution units to work properly (including portrait mode)
- New mic source (should help with speech recognition)
- Added option to keep status bar (user request)
- Added welcome setup
- Added possibility to use old USB driver (android built in one) in case you cannot get it connected with the new version
- Added option for Gain control on mic
- Added option to keep Wifi off (for USB use)
- Changed Wifi Direct implementation (you will need to install the Wifi Launcher for HUR on the phone to use Wifi Direct)
- Removed option to stretch full screen as this is not needed any more (it will always be full screen)
- Fixed Incoming mode not setting password for some devices
- Fixed app crash when Wifi toggled during app running
- Fixed night icon colors for devices running 4.x
- Fixed app freeze if permissions denied
- Fixed app crash after device unplugged when using native android USB driver.
- Fixed day/night calculation if share GPS turned off
- Code cleanup
- Other bug fixes.

Also a big THANK YOU to @ppietak for helping with code cleanup and bug fixes!

Version 4.5 released
- Fixes for USB shuttering
- New USB driver
- Fixes for reverse camera not resuming on some units
- Added support for incoming connection listener (automating Wifi) - Experimental, read below how to connect


Version 4.4 Released
Change log

  • Fixed broken touchscreen
  • Changes on WideScreen mode and HD
  • Fixes for Rotary
  • Potential fix for black screen for second connection over Wifi
  • Left/Right hand driving position option (for widescreen)
  • Buffer setting for mic (could help when Assistant does not hear what you're saying)
    Enjoy XDA Ad Free and check out:
Version 4.3 Released
Change log
  • Fixed double skip on Spotify when using SWC
  • No more decoder workaround needed (updated code for video playback)
  • Added support for rotary (arrow keys can be used for non-touch input)
  • Enhanced mic input (mic sampling rate can be adjusted in settings for better compatibility)
  • Added intent: "gb.xxy.hr.WifiP2P" for Wifi-Direct start
  • Added app color scheme (dark menu for night)
  • Mapped Key N to open Maps (N=Navigation)
  • Mapped Key L to open Multimedia (L = Listen)
  • Changed USB code, hoping to help those who suffered for USB disconnection problems
  • Fixed a serious bug in share GPS code
  • For some rooted android headunits the app can now disable the default call screen being overlayed when HUR is running (only if HUR is set as the navigation app!) This will require ROOT
Version 4.1 Released
Change log
  • Removed Google Play Services dependencies
  • Honda compatibility fixes
  • Some other small bug fixes
Version 4.0 Released

How to use the app?
USB Mode
  • Plug in the USB to your device (in case of tablet use an OTG cable), when prompted make sure you allow HUR to be the default app for the action and you check the always box.
  • If you are running the app on a device with Android 7.0 or higher, you might need to pull down the notification bar and select the connected USB device before the app starts (this is device dependent)
  • If the app does not start automatically when you plug in your phone, you can always open HUR, tap the USB button and select the phone from the list.
Wifi Mode
READ SECOND POST
Incoming connection Mode
READ SECOND POST
Self Mode (when Android Auto and HUR are running on the same device)
  • Open Android Auto on the phone, go to Settings and tap the Version 10 times to become a developer
  • Once you are a developer from the 3 dotted right corner select Start Headunit Server
  • Close Android Auto
  • Start HUR
  • Select SelfMode
FAQ / Troubleshoot

All I get is a black screen

- If you are using an Android powered headunit (Joying, Xtrons, etc) look for a setting on your device which allows Video Playback during drive
- Try changing HUR settings and enable Software decoding

HUR crashes after start
- Try changing HUR setting and disable "Media Workaround"

Wifi Autostart doesn't work
- Option will be removed as it's not deprecated. See intents below on how to achieve this.

What does the "Share GPS" do?
- Share GPS actually forwards the GPS data of your device to the phone, so phone will need to do less work, comes really handy if you have an Android powered headunit, with external GPS antenna, however, if you using a tablet which is built into the dashboard, it's possible that you want to turn off this feature, because your phone will have a more accurate GPS fix.

What is the Sink Audio
- This option enabled HUR to work as a speaker for your phone. If you disable this option, all the sounds will be outputted on your phone speaker (or if your phone is connected to a Bluetooth device, then they will be played back on that)

My carrier doesn't provide data allowance for Wifi, what can I do?
Wifi data used between phone and tablet is classed as intranet not internet so it won't count against your data usage, but do be careful if you have auto-updates enabled on the device running HUR those updates will be downloaded over the phone's Wifi hotspot and that will incur data costs.

I have audio-sink enabled but phone calls are coming from the phone speaker. Why?
Android Auto is designed to sink all the audio over USB (Wifi) except phone calls where it will ALWAYS use a Bluetooth headset, if none is connected it will just flip the phone to speaker mode.

Are any hardware keys supported?
  • Volume Up
  • Volume Down
  • Media Next
  • Media Prev
  • Media Play
  • Media Stop
  • Media Rewind
  • Phone answer key (In case of incoming call it will answer the call, in case of not being on a call it will take you to the dial pad
  • F key - Same as Phone Key
  • M Key - Mic
  • H Key - Takes you to home screen
What about intents?
  • gb.xxy.hr.WIFI_START Can be used to start HUR and try to connect using Wifi.
  • gb.xxy.hr.playpause Same as pressing the Play/Pause media button.
  • gb.xxy.hr.next Same as pressing the Next media button.
  • gb.xxy.hr.prev Same as pressing the Prev media button.
  • gb.xxy.hr.mic Triggers microphone input.
  • gb.xxy.hr.phone Same as pressing the dial key (answer phone call when ringing, takes you to dialer screen otherwise).
  • gb.xxy.hr.day Enables day theme.
  • gb.xxy.hr.night Enables night theme.
  • gb.xxy.hr.togglenight Switches between day and night theme.
I need more help.
- Feel free to ask a question on this thread, or you can always drop me an email to [email protected]

How do I collect a bug report / logcat

1. 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.
2. 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]
Setup demo


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK