• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Dev] New "NavRadio+" ported to MTC devices

Search This thread

KoTiX2

Senior Member
Jul 10, 2010
1,659
861
Realme GT
Hi KoTiX2,

I've been reverted to use NavRadio, it seems it works good now with the Hal9k mod. I'm happy to see it, and I thank you for your continued development of the app!

Now, I also decided to reassign some physical keys to control my unit. Mostly they work as I want. My goal is to have the roller key on the steering wheel to change tracks/stations, and to have separate up/down keys on the dashboard to scroll apps in the Android Recent Apps list. This works perfectly for example when YT Music is playing - I can switch tracks from the wheel, and I can change apps in the Android tasks window, at the same time with no interference. But, when NavRadio is playing, it steals both the media keys and the cursor keys, so they also begin to switch stations. And I cannot scroll apps/windows. I have recorded key codes for the buttons - the roller emits codes 300/299 (up/down), and the cursor emits codes 260/268 (up/down).

So, it would be great if I could disable the cursor keys in NavRadio somehow, e.g. in the settings. I see it might be useful in other cars/units to react to the cursor keys as well, when media keys are absent, so I understand this dubbling is necessary. But not in my case, where it only makes other things broken.

Hope you see this problem in the same light as I do)
This is the code in my app and it's copied from the original radio app:

Code:
                case 260:
                case 299:
                    mContext.prevStation();
                    break;
                case 268:
                case 300:
                    mContext.nextStation();
                    break;

As you can see the 260/268 key codes ar enot handled at all.
Is the original app working as you need?
 

roomey

Member
Apr 9, 2009
43
19
Odesa
This is the code in my app and it's copied from the original radio app:

As you can see the 260/268 key codes ar enot handled at all.
Is the original app working as you need?
I see you coded it exactly as it behaves. Why do you say "not handled", when these codes go under the same case label? There is no break between 268 and 300 for example, so they both call nextStation(). Compare to what I suggest to do:

C:
case 260:    // Cursor Up
    if (settings.handleCursorKeys)
        mContext.prevStation();
    break;
case 299:    // Media Prev
    mContext.prevStation();
    break;
case 268:    // Cursor Down
    if (settings.handleCursorKeys)
        mContext.nextStation();
    break;
case 300:    // Media Next
    mContext.nextStation();
    break;
 
Last edited:

sandpita

Senior Member
Dec 5, 2011
76
18
The Garden State
Hi KoTiX2, after updating to the latest paid version 0.2.05 I am having an issue when my car lights are manually or automatically turns on the Navradio+ flickers and the screen looses all information on screen. I tested the standard radio app and it operates fine .
I have attached a photo of the screen operating as per normal and next screen when the cars lights are manually or automatically turns on.

Thanks.
 

Attachments

  • Screenshot_20210501-204941.png
    Screenshot_20210501-204941.png
    377 KB · Views: 51
  • Screenshot_20210501-204953.png
    Screenshot_20210501-204953.png
    362.8 KB · Views: 52

KoTiX2

Senior Member
Jul 10, 2010
1,659
861
Realme GT
Hi KoTiX2, after updating to the latest paid version 0.2.05 I am having an issue when my car lights are manually or automatically turns on the Navradio+ flickers and the screen looses all information on screen. I tested the standard radio app and it operates fine .
I have attached a photo of the screen operating as per normal and next screen when the cars lights are manually or automatically turns on.

Thanks.
Yes, it has been reported me by other guys too.
I'll try to fix it as soon as possible.
tnx for reporting it ;)
 
Last edited:
  • Like
Reactions: sandpita

KoTiX2

Senior Member
Jul 10, 2010
1,659
861
Realme GT
  • Like
Reactions: okij and _KoSTeK_

aerra2

New member
Feb 1, 2009
1
1
Hello! There is one thing which will be good to improve in Navradio app.
I use paid full version. My car is Ford Mondeo, radio - MTCE_GS Android 10.
Ford Mondeo and some other Ford cars 2007-2015 have the instrument cluster "Convers+" - it is a panel with big display showing different information including information from radio, sending through MM-CAN bus.
MCT radios with CanBus adapter can communicate with Convers+. When using radio app the frequency of station can be showed on Convers+.
To support this, radio app should send special messages to CanBusService (a part of MCT core). There are two broadcast intent messages:
1. com.microntek.canbusdisplay with extras:
string "type" = "radio-on"
2. com.microntek.canbusdisplay with extras:
string "type" = "radio"
int "group" = **
int "fre"= **
byte "index"= **
int "af"= **
int "ta"= **
int "pty"= **
int "tp"= **
int "st"= **
int "loc"= **
First one only indicates CanBusService that radio mode is switched on. It doesn't trigger sending any data to can bus. As it is dispatched in CanBusService:

} else if (type.equals("radio-on") && this.state != 9) { this.mDisIntent = intent; [B]this.state = 9;[/B] this.mSendCanChange = -1; }
The second one triggers sending radio info to can bus and is doing it only if mode is radio:
if (type.equals("radio") && [B]this.state == 9[/B]) { this.mDisIntent = intent; int group = intent.getIntExtra("group", 0); int fre = intent.getIntExtra("fre", 87500); byte index = intent.getByteExtra("index", (byte) 0); int af = intent.getIntExtra("af", 0); int ta = intent.getIntExtra("ta", 0); int pty = intent.getIntExtra("pty", 0); int tp = intent.getIntExtra("tp", 0); int st = intent.getIntExtra("st", 0); int loc = intent.getIntExtra("loc", 0); long change = (long) (group + fre + index + af + ta + pty + tp + st + loc); *********** [B]canBase.SendRadio(getGroup(group), fre, index, af, ta, pty, tp, st, loc);[/B] *********** }
So, to make Convers+ switching to radio mode correctly radio app should send firstly the first message, then the second. Native mct radio app does it. Bus seems that Navradio doesn't. It sends only second msg.
If generate com.microntek.canbusdisplay {"type" : "radio-on"} and then launch Navradio+ the things are ok. I emulated it in MTCDTools app.
KoTiX2 - I made video for you, i ll send link to your PM.
So, KoTiX2 - it will be good to improve it. It influences not only Ford owners - due to CanBusService code the data according radio can't be sent to CAN bus without "radio-on" in general.
 
Last edited:
  • Like
Reactions: sandpita

KoTiX2

Senior Member
Jul 10, 2010
1,659
861
Realme GT
Hello! There is one thing which will be good to improve in Navradio app.
I use paid full version. My car is Ford Mondeo, radio - MTCE_GS Android 10.
Ford Mondeo and some other Ford cars 2007-2015 have the instrument cluster "Convers+" - it is a panel with big display showing different information including information from radio, sending through MM-CAN bus.
MCT radios with CanBus adapter can communicate with Convers+. When using radio app the frequency of station can be showed on Convers+.
To support this, radio app should send special messages to CanBusService (a part of MCT core). There are two broadcast intent messages:
1. com.microntek.canbusdisplay with extras:
string "type" = "radio-on"
2. com.microntek.canbusdisplay with extras:
string "type" = "radio"
int "group" = **
int "fre"= **
byte "index"= **
int "af"= **
int "ta"= **
int "pty"= **
int "tp"= **
int "st"= **
int "loc"= **
First one only indicates CanBusService that radio mode is switched on. It doesn't trigger sending any data to can bus. As it is dispatched in CanBusService:

} else if (type.equals("radio-on") && this.state != 9) { this.mDisIntent = intent; [B]this.state = 9;[/B] this.mSendCanChange = -1; }
The second one triggers sending radio info to can bus and is doing it only if mode is radio:
if (type.equals("radio") && [B]this.state == 9[/B]) { this.mDisIntent = intent; int group = intent.getIntExtra("group", 0); int fre = intent.getIntExtra("fre", 87500); byte index = intent.getByteExtra("index", (byte) 0); int af = intent.getIntExtra("af", 0); int ta = intent.getIntExtra("ta", 0); int pty = intent.getIntExtra("pty", 0); int tp = intent.getIntExtra("tp", 0); int st = intent.getIntExtra("st", 0); int loc = intent.getIntExtra("loc", 0); long change = (long) (group + fre + index + af + ta + pty + tp + st + loc); *********** [B]canBase.SendRadio(getGroup(group), fre, index, af, ta, pty, tp, st, loc);[/B] *********** }
So, to make Convers+ switching to radio mode correctly radio app should send firstly the first message, then the second. Native mct radio app does it. Bus seems that Navradio doesn't. It sends only second msg.
If generate com.microntek.canbusdisplay {"type" : "radio-on"} and then launch Navradio+ the things are ok. I emulated it in MTCDTools app.
KoTiX2 - I made video for you, i ll send link to your PM.
So, KoTiX2 - it will be good to improve it. It influences not only Ford owners - due to CanBusService code the data according radio can't be sent to CAN bus without "radio-on" in general.
Ok, tnx for reporting these infos :)
I'll see what I can do about it...

Right now I'm busy fixing the Dark/Light themes.
I added some more options to handle the dark mode switching:
- off
- on
- Timed (you can set start and end period of light/dark)
- Automatic following system by headlights
 
  • Like
Reactions: sandpita

KoTiX2

Senior Member
Jul 10, 2010
1,659
861
Realme GT
Version 2.06 is coming out on playstore.
a small changelog:

-Fixed crash when switching lights for DarkMode
-Fixed Swc with codes 260 and 268
-Added Timed and Auto DarkMode (HeadLights)
-Fixed ListView in splitscreen
timedDarkMode.png
 

Timpuli

Senior Member
Mar 15, 2009
68
21
Updated to version 2.06... Should menus change to dark/ black theme when headlights are On and switched back to light theme when daylight running lights are swiched On? In my HU, if DarkMode is ON menus are always Dark, despite state of headlights.
Edit: UI Day/ Night themes will changed automatically acc. headlights, so this fuction will work propely in my HU.

HU: PX30_MTCE_MX, Android 9 (Hal9k 4.2.1)
 
Last edited:

KoTiX2

Senior Member
Jul 10, 2010
1,659
861
Realme GT
Updated to version 2.06... Should menus change to dark/ black theme when headlights are On and switched back to light theme when daylight running lights are swiched On? In my HU, if DarkMode is ON menus are always Dark, despite state of headlights.
Edit: UI Day/ Night themes will changed automatically acc. headlights, so this fuction will work propely in my HU.

HU: PX30_MTCE_MX, Android 9 (Hal9k 4.2.1)
Automatic with headlights work only on Android 10.
With android 9 you don't even see the option in the settings you have only:
-Always ON
-Always OFF
-Timed
The 4th option is for Android 10:
- Automatic
 
  • Like
Reactions: okij

okij

Senior Member
Oct 24, 2012
1,888
3,796
Düsseldorf
Automatic with headlights work only on Android 10.
With android 9 you don't even see the option in the settings you have only:
-Always ON
-Always OFF
-Timed
The 4th option is for Android 10:
- Automatic
My MTCE head unit is on Android 9 (Hal9k v4.2.1) and changes light and dark theme according to headlights, e.g. in stock HCT4 launcher, bluetooth dialer and stock radio app.

So the state of headlight must be shared somewhere in system, probably via broadcast intents.

Could you make Automatic mode work on these (very common and widespread) Android 9 units too with this information?
 

KoTiX2

Senior Member
Jul 10, 2010
1,659
861
Realme GT
My MTCE head unit is on Android 9 (Hal9k v4.2.1) and changes light and dark theme according to headlights, e.g. in stock HCT4 launcher, bluetooth dialer and stock radio app.

So the state of headlight must be shared somewhere in system, probably via broadcast intents.

Could you make Automatic mode work on these (very common and widespread) Android 9 units too with this information?
Ok I'll flash Hal rom and I'll see what I can do
 
  • Like
Reactions: roomey and okij

Timpuli

Senior Member
Mar 15, 2009
68
21
Automatic with headlights work only on Android 10.
With android 9 you don't even see the option in the settings you have only:
-Always ON
-Always OFF
-Timed
The 4th option is for Android 10:
- Automatic
Why automatic DarkMode is enabled only for Android 10 units? Can you enable it for Android 9 also, so we can try it, or is it tried already?
I have tryed HTC based laucher with Android 10 in my HU and Dark/ Light theme were changed according to the headlights, as it works also with Android 9. Is there something else which will prevent DarkMode use in NavRadio+ when Android 9 is used? I think Hal9k rom is not needed for dark/ Light theme to work in Android 9, at least it won't change anything for in this point of view...
 

lagos911

Senior Member
Jan 25, 2009
242
22
I just update to the last app this dark/light function.
I enable the automatic option at settings and is working fine.
The only problem is that the brightness go to low.
The only thing is happening with dark mode is the app to set the brightness to zero?
I mean this happens from the unit as well...
The point of day night function is to change the background to something light at the day and something dark at night... Same thing happens with fonts.
 

KoTiX2

Senior Member
Jul 10, 2010
1,659
861
Realme GT
I just update to the last app this dark/light function.
I enable the automatic option at settings and is working fine.
The only problem is that the brightness go to low.
The only thing is happening with dark mode is the app to set the brightness to zero?
I mean this happens from the unit as well...
The point of day night function is to change the background to something light at the day and something dark at night... Same thing happens with fonts.
Let me explain a couple of things:
- Night/day modes has been introduced definitely in android starting from android 10. Before 10 the code was there but it wasn't fully functional.
- android night mode is not the same thing of MTC night mode. While android change the colors of the entire system UI with predefined primary and secondary colors, the MTC apps use colors defined in the apps simply setting a theme.
In NavRadio i apply the android night/day mode, i don't set a theme like in MTC apps.
- NavRadio don't change the brightness. For that there is an MTC settings that let you define the brightness when lights are turned on.

I already noticed that there still some issues to fix so an update will surely come. Unfortunately I half/bricked one of my units trying to flash Hal rom so i have to fix it first. :(
 
  • Like
Reactions: okij

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    @KoTiX2 We have found an issue with NavRadio+ on the FCC Launcher thread that its dev @SpeedFire- identified as such:

    Could you please add the radio logo bitmap to notification as described by @SpeedFire-? Thanks in advance. :)
    I'll check it but I'm pretty sure that NavRadio radio already send the logo via player metadata as requested by FCC and all other launchers.
    I'll let you know if I find out something wrong. ;)
  • 17
    After releasing my NavRadio+ for Allwinner and IntelSc9853 devices in december, i finally ported it successfully to MTC/HCT based devices (PX3, PX5. PX6 and PX30).
    I paste here the first post of my other thread as a presentation of my work:

    I have been working since July 2019 this radio FM application originally created by Omega2008 (dipcore) from 4pda and I published it on playstore (with his permission of course) after some beta testing on allwinner and intel sc9853 units.

    A FREE VERSION FOR XDA USERS IS AVAILABLE TO ACCOMPLISH THE XDA RULES AND TO LET USERS TEST THE COMPATIBILITY BEFORE BUYING IT.
    YOU CAN FIND IT HERE: DOWNLOAD NAVRADIO FREE
    IT DIFFER FROM PAYED VERSION JUST IN TERMS OF USER CUSTOMIZATIONS OPTIONS AND NO LOGOS SUPPORT.

    If you are sure that your unit is compatible with the app you can get it on playstore, here:
    https://play.google.com/store/apps/details?id=com.navimods.radio

    Here you can see a sample video of my working progresses:
    Sample Video
    Here a demonstration video of the automatic assignment of Logos, station name and alternative frequencies:
    Demo
    and here a review from a friend:
    Review

    It's widely customizable in the graphics and layouts:
    - Wallpapers: Presets (about 30), system wallpaper, solid color, from personal images
    - Color themes (20 predefined or personal adjustments)
    - Night mode on / off, timed or automatic with car lights (MTC only)
    - Resizable text elements and Font choice
    - 3 view modes:
    Vertical List (Left/Right and5,6 or 6 buttons)
    Horizontal Grid (1x5, 2x3, 2x4, 2x5, 3x3, 3x4, 3x5)
    Fullscreen (double tap or timed)
    - Selectable inactivity timer for fullscreen activation
    - Toggable StatusBar in fullscreen mode
    - Toggable Clock and GPS speed in fullscreen
    - Toggable Frequency slider
    - Automatic and manual assignement of Logo images to the stored radio stations based on RDS id and station name scraping.
    - Logos can be downloaded from internet DIRECTLY IN THE APP or sideloaded.
    - Station lists can be sorted by name or frequency and saved/restored in a Json format
    - Improved RDS AF function with automatic storing and merging of alternative frequencies found
    - Notifications Toasts
    - Selectable Radio Region
    - Station editable elements : Position, Frequency, Name, Logo, Favorites
    - 2 Homepage Widgets, horizontal and vertical design
    - Floating widget
    - Autostart on boot option
    - Support 800x480, 1024x600, 1280x720 and 1920x1080 display resolutions
    - Resizable Texts elements
    - App full settings backup/restore function


    List of available Logos by nationality, in Bold the ones with automatic Logos assignement functionality (by RDS id):

    EUROPE: Albania, Andorra, Austria, Australia, Belgium, Bulgaria, Bosnia and Herzegovina, Belarus, Cyprus,Croatia, Czech Republic, Denmark, Estonia, Faroe Islands, Finland, France, Germany, Gibraltar, Greece, Hungary, Ireland, Iceland, Italy, Lithuania, Latvia, Liechtenstein, Luxembourg, Macedonia, Malta, Monaco, Moldova, Montenegro, Netherlands, Norway, Poland, Portugal, Romania, Russia, Serbia, Slovakia, Slovenia, Sweden, Switzerland, South Korea, Spain, Turkey, Taiwan, Ukraine, United Kingdom

    SOUTH AMERICA: Argentina, Brazil, Chile, Colombia, Mexico, Perù

    USA: Alabama, Alaska, Arizona, Arkansas, California, Canada, Colorado, Connecticut, Delaware, Florida, Georgia, Hawaii, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky, Louisiana, Maine, Maryland, Massachussets, Michigan, Minnesota, Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire, New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio, Oklahoma, Oregon, Pennsylvania, Puerto Rico, Rhode Island, South Carolina, South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Virgin Island, Washington, Washington DC, West Virginia, Winsconsin, Wyoming

    CHINA, JAPAN, MALAYSIA, PHILIPPINE
    MOROCCO, TUNISIA
    AUSTRALIA, NEW ZAELAND

    Some pictures:
    1S3mHPul.png
    GLZUaNcl.png
    BWakEZHl.png
    sSiu1Otl.png

    9ecxWEI.png
    iCr42okl.png
    vNqsB5zl.png
    0Nyk1grl.png
    zTteN75.png
    C6uCg0y.png
    NQ8eATB.png
    TOgJo5U.png


    NavRadio+ is now available on playstore here:
    [url]https://play.google.com/store/apps/details?id=com.navimods.radio[/URL]
    With full support for all MTC devices.
    13
    SOME TIPS:
    TOGGLE SCREEN NORMAL/FULL:
    - Double Click on the station information toggle fullscreen on/off.

    NORMAL SCREEN:
    - Long press on the station information popup the "ADD Station" dialog window if the station is not in your station list. If it's already in your list, it will focus the relative station button.
    - Long press on a station button bring up the "EDIT Station" dialog window
    - Single press on screen arrows <> does a small frequency step fwd/back
    - Long Press on screen arrows does a quick search fwd/back

    FULLSCREEN MODE:
    - A Single press of the arrows <> switch to next/previous station
    -A Long press on station information(center of the screen) bring up the "EDIT Station" dialog window.
    - In interface settings you can remove the big frequency in background if a logo is available.
    - In settings you can hide status bar, activate the clock and a speed gauge

    STEERING WHEELS CONTROLS:
    - The steering wheels commands act exactly in the same way as the fullscreen arrows, they just need to be setup in the correct way in carsettings application.

    FAVORITE LIST:
    - The FAV list is the result of merging FM and AM favorites, so you can have both frequencies in the same list.
    - FAV stations can be edited within the fav list but cannot be added. You need to be on fm or am list to add a station and set it to favs.
    - Deleting the FAV list will just remove the fav flag from the fm/am stations but will not delete them.
    - Deleting AM/FM list it will delete the FAV list too.

    LOGOS:
    - you can use your own station logos, you just need to know where you have them stored and browse for them when editing a station.
    - To get the stations Logos from the app you have to set the nationality of the logos in the interface menu, download and extract them.
    Once they are extracted you have to edit each saved station to assign the logo image to it.
    - The automatic assignment of the Logos is based on the RDS id of the radio stations (pi code) and the search of the logo by RDS name.
    The first method (by id) is faster and more precise but it needs that the name of the logo contain the picode of the station and for this purpose i renamed them for some of the available countries. Of course i cannot make them all and the functionality of this method depend of the availability of correctly named logo images for your country.
    The second method (by name) is less accurate and it work comparing the RDS name with all available logos. If the rsult of the comparison is 100% correct the logo is autoamatically assigned. If the result are more then one logo, a dialog window popup asking you to choose it.

    AF (Alternative Frequencies) handling: (Doubleclick to switch between stored AF)
    AF service allows the radio tuner to tune in to an alternative frequency when the signal becomes too weak. The minimum level signal can be set in factory settings (Auto Search Stop) and has been found
    that around 30 db is the best choice.
    To improve even more this service I added an automatic storing of the alternative frequencies so that every time a new frequency is received, it's added in a list.
    After an autoscan some radio stations can be found on different frequencies, NavRadio+ have an option (in Settings/radio) to automatically merge the frequencies in just one button populating the AF list
    The frequencies available in this list can be selected using the station editor or switched one by one DOUBLECLICKING on the station button.

    NOTES:
    I'm the only developer of the app and I work on it every single day for some hours a day.
    I try my best to develope the app at best of my possibilities and I wish at evey release that it is bug and crash free.
    This is very hard to achieve, even if I have some very good friends that help me testing it.
    I'm really thankful to them for their help and support.

    Thank everybody who beleive in my work and thanks for understanding. :)
    8
    Some more news for this week (the image should be self explanatory):
    x7TCQF9.png


    Then there some more countries with automatic logos:
    Belgium, Czech rep., France (tnx @Timpuli), Hungary, Croatia
    Italian logos are still worked out and I'm waiting for friends to prepare the German and Spanish logos (they are really too many).
    I'm fixing again Agama metadata for no RDS users and liveRDS.
    Other minor bugs are fixed too.
    Next week i'll concentrate on after sleep resuming and AF alternative frequencies.
    8
    Then please go ahead and write such app for yourself, if you think that it's so easy and cheap to do.

    There's nothing wrong with asking some money for a good software. Things don't have to be for free and I'm pretty sure that @KoTiX2 so far put more hours of work into this project than it payd back, if you look at it at a monitary basis. There surely also is a lot of enthusiasm in this project.
    7
    Ok guys, most of the requested fixes are coming out with v1.56 release:

    Fixed AudioFocus when using mic in navi app (this was a very old request)
    Fixed for MTC the problem that app wasn't killed after source change and with AF or TA enabled it was starting back on itslef (tnx @emre33 for report)
    Fixed widget controls unusable after 40sec (tnx @ Al Ferro)
    Added double click to switch between alternative frequencies of a station
    Changed statusbar Notifications with new icon and better layout (tnx @the-unknown)


    FCC integration will come probably next week or later, sorry ;)