📜 ⬆️ ⬇️

Android Tablet instead of Auto Radio

Now, many car owners are faced with the problem of the wretchedness of staff and the cosmic high cost of good tape recorders with modern features. So I bought the car in 2010 could not get along with the CD player and hurried to put a tablet instead of it - the Tablet. The article describes aspects not covered in other sources of information. In particular, not how to physically embed the tablet into the car, but how to adjust everything so that it is pleasant and convenient to use.
image

Let's start from afar.

The problem of the lack of a modern radio has been worrying me a long time ago and in the last car I had to buy a 2din Chinese miracle box partially under the control of WinCE. I won’t describe how many hours or weeks I spent in colors to set everything up to whiter than working condition and as a result from useful functions: the bluetooth worked terribly wryly initially, so you could only use streaming music (and then no control) , a DVD got stuck in a disk, WinCe with GPS iGO started loading once out of 10. The rear view camera turned out to be the most reliable. And this is for 300 kopecks of dollars 6 years ago. And I have long started thinking about the android, but the prices for the only “decent” Android 2.3 Asteroid are transcendental 700 + $ and there are no decent options from the monsters of the mangitol market either. Dead end in general some.
And then I bought a relatively fresh car of 2010 release from the Japanese leader in a good configuration and got a poor CD / MP3 player raskoryachny so without a special ugly plugs anything else 1-2din there just did not stick. For my luck, part of its presale preparation included a front panel assembly curve (it is not clear why) so it was impossible to insert a disk. Unfortunately, the horse I bought in the teeth, I looked too late And this was the last straw. I ordered the Samsung Galaxy tab on ibei 7 ". After tormenting with it for a long time due to the fact that the Wi-Fi did not work, I ordered Nexus 7 1 gen 16gb in the heat of anger. At that moment I couldn’t even imagine that it didn’t microSD slots and without OTG I’ll have to be content with only built-in 16 gig. I couldn’t even expect such a setup from Google with Asus. But in general the second tablet turned out to be much more invigorating than the first and I don’t regret it. recorder on tablets around the world. I think primarily because of the prevalence of quality OPERATION AND price. More convenient contacts on the housing for the power and sound POGO PINS image So I began to read how to do everything under the car and, to my great surprise, I found a lot of information about how to stick a pill, and how to live with it almost zero. And so I started to pick up bits and pieces and step on a rake. The result was a very convenient system that you can see on the video.

Let's start with the connection.
I basically did not want to cut anything and even open the panel, so I hung the tablet on a hidden copper wire for the silicone case right over the top of the radio. And hooked up the cables. Power recommend immediately the human ones based on the KIS3R33S module to be powerful. With the Samsung one of the problems was the trick to enable fast charging. Those when the charging current is not the usual 300mA as from the USB ports of the computer, but at least 500 or better 1 ampere. Practice has shown that if you turn on the full brightness (sunny day), GPS, etc., then the tablet consumes more than charged from 300mA. This is how you understand the impasse. So I came with USB resistors and other shamanism for a long time with resistors, and it seems to be successful, until with the transition to Nexus, these problems did not disappear by themselves. We need right away a good (not micro in cigarette lighter) DC-DC adapter 14-> 5v, preferably 2-3 amps to power not only the tablet, but also the phone and other potential gadgets. I did not have the bluetooth in the car, so I had to make separate wiring from the headphone output to the AUX input of the head unit. Here, in general, and all with the connection.
At this, as it turned out, many and stop. But after all, using the usual android in the car, especially while driving, is not very convenient! Here I determined the range of tasks. For me, it has been reduced to playing music and GPS navigation. I already had a rear-view camera, but as it turned out in a nexus and this can be connected, read www.pccar.ru/showthread.php?t=18305 . Only 2 applications, but should be easy to use them and switch between them.
I have been looking for a convenient media player for a long time. There is a very big difference between using the tablet in hand and driving. Try driving multiple players and skins and choose one that suits you best. In ordinary life, I prefer Astro, but Google Music seemed to be the most convenient here. And here, too, there are nuances. The last 5th version is very white, inconvenient in navigation, especially in playlists. I use only playlists in m3u files created by the good old WinAmp and carefully thrown on the tablet. There, too, there is a nuance, and for some reason, if the playlist is not filled with all the tags, they are not scrolled to the end in WinAmp (until the times of all the songs are defined in the playlist window) and saved to disk only after that, Music does not see it. Music still has a problem with files with Russian names (names of files and not Tagi, there are no problems with tags), so everything had to be renamed to Latin using Multi File Translator or TagScanner and other tools. Although tagi Russian he displays excellent and large. The 3rd version is completely wretched and the backgrounds are not black and playlists are just a list, and the 4.1.512 version of the black was just right for the machine www.filedropper.com/tablet4car_1 . So it is necessary to roll back from the last to it w3bsit3-dns.com/forum/index.php?showtopic=237901 . If before installing the old version, the new Music cannot be removed by regular means, you need to use Titanium Backup (uninstall).
Google Music:




Everybody chooses a navigation program to his own taste. I like Garmin Navigon, especially since I use the Garmin HUD.

Suppose you chose your program and put it. Further problems arise:
- how to switch between the screens of music and one-touch navigation?
- How to use the full area of ​​the screen and not lose the control button?
- How to manage music (Pause, Sl song, etc. ..) without leaving the navigation application?

Only two Button Savior and full! Screen programs can solve this. play.google.com/store/apps/details?id=de.tsorn.FullScreen&hl=en . I struggled for a long time and even filed (I changed the icons of the icons so that I could navigate and navigate) Button Savior and in general I achieved some love and convenience from him (its icons / buttons in the form of a house, squares, maps and notes are fashionable to see in the right edge of the screen) www.filedropper.com/tablet4car_1 , but with full! screen everything is much more convenient and easier. In the end, I still use them both. full! screen gives, in addition to full-screen mode, the ability to have 2 miracles in the corners of the button, settings for 3 actions (press, Long press, swipe) each can be changed. Unlike Button Savior, where there are only two such buttons and they can only change their pressing actions. Moreover, in full! Screen (its icons / buttons can be seen in the right and left corners of the screen), you can assign not only Home, Menu, Back, but also playback control (Pause, Sl song, etc.), but also start / call the previous application It turns out such a kind of Alt + Tab, which Button Savior is not. Since we have only two main applications, this is exactly what we need. It would be possible to do this using Scenes in Tasker, but it would not have turned out so beautiful.

')
Then I fought for the battery. It turned out that if you don’t completely put an android to sleep then even without a Wi-Fi and GPS for a night or a day, it can eat several tens of percent of the charge. What is not acceptable. For the assurance of complete sleep, I set up a Deep Sleep Battery Saver which nailed all activities except for the rare exception in the sleeping state.



Now there was a problem of adequate changes in the brightness of the screen with different lighting. In the stock firmware, this can not be customized, so I put Lux + and adjusting it for different lighting, I got a good visibility of the screen in any situation.



Now the tastiest thing is Tasker!

Without this, Mega applications would not have done anything at all. This is a kind of automator for Android with the ability to catch external events and perform visually programmable actions. He is super flexible, super comfortable and omnipresent. A lot of plugins have already been written to it and there will be more roofing felts. I recommend to put it immediately and Secure Settings Pro and in it Secure Settings Helper.





The first simple task that we will solve with the help of Tasker is to properly fall asleep when the car is turned off (charging) and turned on when power appears. When you go to sleep, you must also disable the GPS, Bluetooth, turn off the screen and so on, but you also need to stop playing the music and remember what was playing and if it was playing, so that when you switch on again, continue from the same place. Also, when power is lost for several seconds, such as at the time of starting the starter on many machines, the power in the cigarette lighter disappears. If you do not specifically bother, the tablet will first turn on for a second when the key is turned, then turn off when the starter is running, and then turn on again and completely lost. In the provided script, this problem is solved and the problem is the opposite. Suppose you put in the key for a few seconds only to close the windows in the car and the tablet should not start singing and dancing.
For convenience, I put a good TTS iVona Russian and English. When turned on, my system greets me in a pleasant voice, wishes you a pleasant journey, says what time it is and says that it continues to play such and such a song. It is not only pleasant, but also convenient. Also, when switching to a new song, the system pronounces the names of the Artist and the Song. At the same time selects the correct language (English / Russian) in accordance with the character encoding in the MP3 Tag. And if the previous Composition was the same artist, then it says only the name of the Composition. And all these wonders using Tasker and Media Utilities plugin. Ok, by the way, it works not only with Google Music, but also with many other popular players.

In some cases, I used TaskKill plugin to nail applications.

Then I was puzzled by the change in volume in accordance with the speed. This function is in many machines, but not always available, so I wrote a task "Speed ​​Volume Control Plus" which does this in android. There are five volume levels and 5 speed ranges that need to be set according to your situation in Init Vars. In the end, it was not useful to me, but it can be useful to you.
All this and more is in the script github.com/chouckz/AndroidTasker4Car . You can file it for yourself or use it as is.





It is very important to uncheck the Enforce Task Order checkbox in the Power properties and preferably other profiles. Otherwise, the taskki will begin to wait for each other and harmonious and adequate work will fail.
If after a reboot, you get an annoying message / warning about loudness too high, “raise volume above safe level ....” it can be nailed as follows: forum.xda-developers.com/xposed/modules/mod-unsafe-volume-disable -safe-media-t2338474

Let's take a closer look at all the Profiles (triggers) And Tasks:

Profiles:
Power AC - starts the corresponding tasks (DC ON, DC OFF) when connecting and turning off the power. We mean that the tablet works only when there is food, and without it falls asleep.
Media Utilities State New Track - Calls the "Fill Track" when a new song starts playing.
Media Utilities State Is Playing - Calls the “Now Playing” when the song is played and “Now Not Playing” when the playback is stopped.
Device Boot - Calls the "Boot Startup" when the tablet boots. Almost not used yet. It may be useful in the winter when the battery is not enough to survive the lack of power. Many watchdogs from www.pccar.ru/showthread.php?t=18305 are advised to immediately disconnect and remove the battery. The experience of the Russian operation of the Nexus is very positive in many reviews. Life will show. I have no problems in the summer. In the winter we'll see. If you need to remove the battery, the benefit of all the procedures are described in detail.
Device Shutdown - Calls “Shutdown” when the tablet turns off. Almost not used yet. It may be useful in the winter when the battery is not enough to survive the lack of power.
Music - Calls "Set Active App To Music" when Music is on the screen and is the active application.
NAVIGON - Calls “Set Active App To Navigation” when NAVIGON is on the screen and is the active application.

Tasks:
DC ON - Sets the variable% DCPOWER to 1, wakes / wakes Lux Plug-in automatic dimmer and
launches task "On".
DC OFF - Sets the variable% DCPOWER to 0, and starts the “Off” task.
On - resumes playback if it was interrupted by a short power failure. Includes GPS, WiFi, Bluetooth. Sets the volume. He greets the voices and speaks Time. Launches the Navigation and Music Program (just in case they were nailed into a dream). If during the previous shutdown the music was played, then the name of the Song and the artist was pronounced and the playback resumed. Lux Plug-in automatic dimmer wakes up / wakes up again.
Off - Stops playing music. Turns off GPS, WiFi, Bluetooth. Nails in the navigation program. Falls asleep.
Resume Music - The name of the Song and artist is pronounced in the correct TTS language and playback resumes smoothly increasing the volume to the desired level.
Fill Track - Receives the artist name and compositions from Media Utilities and pre-determines the language of the text to use the correct TTS for reading. Also separately remembers the name of the previous artist in order not to repeat when pronouncing. Says the name of the artist (if not the same as the previous song) and the song.
Say Time - Fills in the correct system time.
Now Playing - Sets the variable% MPLAYING to 1. So Music is playing.
Now Not Playing - Sets the variable% MPLAYING to 0. This means that Music is not playing.
Boot Startup - while empty
Speed ​​Volume Control Plus - Spins in an eternal cycle and is engaged in changing the volume in accordance with the speed. This function is in many machines, but not always available, so I wrote a task that does this in android. There are five volume levels and 5 speed ranges that need to be set according to your situation in Init Vars.
Init Vars - initial initialization of some constants and variables
Shutdown - Perform Tax Off Off All




I couldn’t stop at this because I wasn’t given 5 buttons on the steering wheel (-, +, <,>, Mode) that control the head unit and it would be super convenient if the android understood them. Tun began the second phase of the project.
It all depends on the car and the type of signals from the buttons.
Either these are analog (different voltage levels) or CAN bus. For both, there are ready-made solutions.
theksmith.com/technology/hack-vehicle-bus-cheap-easy-part-1/
and
JoyCon

Both are still wired, but the bluetooth is not far off.
I had analog buttons.
I made myself an analogue of JoyCon Arduino mini Pro + Bluefruit EZ-Key It turned out without wires to the tablet. Bluefruit emulates a HID keyboard and sends standard commands to the akdroid. Managing music just had to do the rest through emulation of Search + Letter and then Quicklinks Shortcuts to Task and to Tasker. But everything works as seen in the video. There is a click and a long click. In the second part I will describe in detail.

Source: https://habr.com/ru/post/232357/


All Articles