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

[App][Custom MTCD Radio App [Update 0.9.9]

Search This thread

parisisal

Senior Member
Mar 1, 2017
75
10
Catania
Hi,
thank you for this work.
I'm working on a radio widget.
Currently I'm able to get and show the frequency and RDS data
Could I ask you, how to give commands to the radio system ?
I'd like to create buttons for:
- seekUp
- seekDown
- ON/OFF
- chUp
- chDown

Thank you,
Salvo
 

Top Liked Posts

  • There are no posts matching your filters.
  • 32
    Because I did not really like the stock radio app I have decided to write my own app from scratch.

    screenshot_2019-11-28_162416-jpg.4935329


    You can download the most recent version >>>here<<<.

    If you like the app, feel free to make a small donation to support further development:)


    I have made the app open source, feel free to reuse the source code for non-commercial purposes or help to improve the app, add features fix bugs...

    The GitLab repository is >>>here<<<.

    Changes in 0.9.9
    - Suppoer for (unrooted) Android 10
    - Configurable Info Areas
    - Minor Changes

    Changes in 0.9.8
    - Fix AF from 0.9.7 (jumped back to "Main" frequency immediately if a station was selected and AF changed the frequency
    - Add autoscan (still early stage)

    Issues in 0.9.8
    - RDS Info gets lost on an AF frequency change
    - TA is not working properly.
    - No information shown in Hal9k screensavver (sometimes it works)
    - Progress in autoscan dialog runs backwards

    Changes in 0.9.7
    - Add stereo indicator and enable / disable menu entry
    - Fixed crash when scrloling station
    - Improved AF Handling
    - Auto update known alternative frequencies (learn function)
    - Selected station is not changed when frequency is chnaged by AF (if frequency is known)
    - Current frequency of a station is used when radio is turned off and on again
    - Default frequency is used on normal station change by user
    - Manual selection of alternative frequency by double clicking a station button
    - Settings are stored in a custom file

    Issues in 0.9.6
    - RDS Info gets lost on an AF frequency change
    - TA is not working properly.
    - No information shown in Hal9k screensavver (sometimes it works)

    Current issues 0.9.5:
    - Breaks compatibility with bouquets saved in previous versions - sorry for the inconvenience :(
    - TA is not working properly.
    - No information shown in Hal9k screensavver (sometimes it works)
    - Saved Stations / Bouquets may get lost. You can backup the file /sdcard/bradio/bouqet.json an restore it if it gets deleted. This issue may already be solved - please let me know it this happened to you!

    Changes in 0.9.5
    - Fix: RDS texts were all upper case
    - Fix: Removing background image from theme made saving impossible
    - Fix theme save path
    - Save bouquets to json instead of using java serialization

    Changes in 0.9.4
    - Add theme dialog to edit colors / wallpaper
    - Fix layout issues, font sizes on smaller displays, make editor views scrollable

    Changes in 0.9.3:
    - Corrected font scaling
    - Add file support for images in themes
    - Switching two stations with one button press should be fixed
    - "Spotify" button bug should be fixed
    - Improved live RDS station name
    - Improved CAN display

    Changes in 0.9.2:
    - Reported to work on PX6, PX5, PX30, PX3 with Android Nougat
    - Storage permission is requested on startup
    - Add polish language (thanks to Blueqq2)
    - Fix steering wheel buttons (Seek, Channel Up / Down)
    - Add turn-on-delay to have better sync with stock app
    - Nwq bouquet name is displayed immediately
    - Add font scaling for (RDS Name and RDS Title)
    - Removed unnecessary bouquet saves
    - Replace some button texts by icons

    Changes in 0.9.1:
    - Fix save bouquets bug
    - Update bouquet / station remove handling
    - Add Italian language (Thanks to royalhawk2002)

    Features:
    - Display station icons on buttons
    - Unlimited number of bouquets (station lists)
    - Unlimited number of stations in one bouquet
    - Mix FM and AM in one bouquet
    - Fix encoding for radio text (middle european only by now)
    -Themeable

    The station icons have to be placed in /sdcard/bradio/logos/. The file extension of the logos must be .png.
    You can use your own station logos or download complete packages here:
    https://webspecial.volkswagen.de/vwinfotainment/ch/de/index/downloads#/

    Themes must be located in /sdcard/bradio/themes/.
    I‘ll write a tutorial for theming somewhen. Until then, just look at the available themes. They are in json format.
    Images have to be used in base64 format. You can use an online encoder like https://www.base64decode.org/ or any other , there are a lot online encoders / converters.

    To use icons and themes, you need to grant storage permission to the app.

    The app is still in an early state. I have had the app in everyday use for a while now and for me it is already working pretty well (at least for middle europe).
    If you discover bugs or have ideas for improvement please let me know.
    The app is developed on a PX5 headunit. I have legacy code for PX3 implemented but it is not tested. If someone would like to try it on a PX3 headunit, please let me know if it is working or if there are any bugs etc.
    On my headunit, I have disabled the stock radio app, but it should not be a problem to install ist besides the stock app. Both apps my get out of sync when running parallel (what should not be a problem at all).


    Future development:
    - Implement custom TA handling. Do not start tuning if TA gets lost for a while. Don‘t know if this is possible.
    - Implement custom AF handling. Alternative Frequencies could be added manually or maybe by a custom autossek implementation.
    - Improve Themes
    - Add display options for Outside temperature, stereo, frquency, live RDS...
    - Add settings dialog
    - Change settings and bouquet files to a human readable format (XML or json)

    Please let me if you have ideas for new features, improvements etc.

    ----------------------------------- Licenses -----------------------------------------------
    GMradio uses Quadflask Color Picker, which is released under the following license:

    Copyright 2014-2017 QuadFlask

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
    10
    It has been a long time since the last release, but today I will finally release Version 0.9.6.

    Most changes are related to AF, but there have also been som changes "under the hood", which will show up in the next releases - I hope it won't take too long ;)

    Changes in 0.9.6
    - Improved AF Handling
    - Auto update known alternative frequencies (learn function)
    - Selected station is not changed when frequency is chnaged by AF (if frequency is known)
    - Last used frequency of a station is used again when radio is turned off and on again
    - Default frequency is used on normal station change by user
    - Manual selection of alternative frequency by double clicking a station button
    - Settings are stored in a custom file

    Issues in 0.9.6
    - RDS Info gets lost on an AF frequency change
    - TA is not working properly.
    - No information shown in Hal9k screensavver (sometimes it works)
    7
    So here is the first version of the themeing tutorial. Themes are written in JSON and have the following layout.

    Code:
    {
        [COLOR="Red"]"Theme"[/COLOR]: {
            [COLOR="Red"]"Name"[/COLOR]: "[COLOR="SeaGreen"]Theme Name[/COLOR]",
           [COLOR="red"] "Colors"[/COLOR]: [
                { [COLOR="red"]"Key"[/COLOR]: "[COLOR="SeaGreen"]Identifier[/COLOR]", [COLOR="red"]"Value"[/COLOR]: "[COLOR="SeaGreen"]Color[/COLOR]" },
            ],
           [COLOR="red"] "Images":[/COLOR] [
                { [COLOR="red"]"Key"[/COLOR]: "[COLOR="seagreen"]Identifier[/COLOR]", [COLOR="red"]"Value"[/COLOR]: "[COLOR="seagreen"]Image[/COLOR]" }
            ]
        }
    }

    There is always one "Theme" element, which may include three sub-elements:
    • "Name": You can enter a theme name of you choice here. Currently, it is not used, but this may change in a future release.
    • "Colors": This is an array of color definitions. A color definition has the following elements:
      • "Key": Icludes the identifier used to identify the UI item which is colored.
      • "Value": Icludes the color value. This can be a HTML color name or an ARGB hex value.
      • "Alpha": This is optional. Icludes the alpha value (transparency) as a hex numer. The value mus be from 0 to 255.
    • "Images": Contains an array of images. Currently only one image (Wallpaper is supported). An image item has the following format.
      • "Key": Icludes the identifier used to identify the UI item which is used with the image. Currently only "Wallpaper" is a valid value.
      • "Type": This value is optional from release 0.9.3. If it is "File", "Value" is interpreted as a path to a file. Else the "Value" has to be the image as Base64 data.
      • "Value": Path to the image or Base64 data of the image, depending on the "Type" value.

    Valid values for Colors are:
    attachment.php


    • ColorAccent: Color of the lines at the top and bottom bar. The Default is red.
    • ColorSelected: Selected / Active color of station button frame, station page indicator, led on buttons. The default is red.
    • ColorNotSelected: Unselected / inactice color of the above. The default is dark red.
    • ColorBackground: Background color. Only visible if no wallpaper is used. The default is black.
    • ColorBackgroundLight: Background color of the top and bottom bar. The default is gray.
    • ColorStationButton: Background color of the station button when not selected. The default is white.
    • ColorStationButtonSelected: Background color of the station button when selected. The default is white.
    I'll add mot values from time to time, to be more flexible with theming.

    You can use an Android emulator (for example Genymotion) to develop and test themes. You can install GMRadio in the emulator (it starts, of course it has no function) then copy the themes and images via adb to the emulator.
    Themes have to be located in "/sdcard/bradio/themes/" and the file extension has to be ".json". The path to an image can be absolute or relative, so images can also be put into a subfolder.

    Here is a complete example of a theme. You can use it as a base to develop your own themes (it it the Skode green theme).
    Code:
    {
        "Theme": {
            "Name": "Skoda Theme",
            "Colors": [
                { "Key": "ColorAccent", "Value": "Green" },
                { "Key": "ColorSelected", "Value": "LightGreen" },
                { "Key": "ColorNotSelected", "Value": "Green" },
                { "Key": "ColorBackground", "Value": "Gray"},
                { "Key": "ColorBackgroundLight", "Value": "Black", "Alpha": "88" },
                { "Key": "ColorStationButton", "Value": "White", "Alpha": "88"},
                { "Key": "ColorStationButtonSelected", "Value": "White", "Alpha": "dd" }
            ],
            "Images": [
                { "Key": "Wallpaper", "Value": "skoda.png", "Type": "File"  }
            ]
        }
    }

    If you have made a cool theme please share it in the forum. I'll add a link here, then.

    apollo1976 has posted a nice theme here
    5
    Version 0.9.4 released
    release-0.9.4

    -Adds theme dialog to edit colors and wallpaper (Can be opened via "Settings --> Edit Theme")
    -Fixes layout / font size issues on smaller displays, makes editor scrollable