R1 Harman Radio Setup

These instructions are intended to help you set up the R1 Harman Radio and deploy an app.

Page contents:

Prepare R1 Radio setup for Android app deployment
Start a project using Android Studio
Adding Custom (FCA/HARMAN) library (from SDK Add-on) to Android Studio
Deploy a sample Android App to R1 Radio

Prepare R1 Radio setup for Android app deployment


  1. Install Intel® USB Driver for Android Devices
  2. On R1 radio with proper Harness connected to power



  3. Connect USB cable Type-A to Type-A to USB host port (non-Blue tag port) as in the picture below.




  4. From the settings app, make sure to select (USB Client) option as in the picture below:




  5. Connect the other side of the USB cable to your PC that has the USB android driver and Android studio. you should see a new USB device is enumerated like this:




Start a project using Android Studio


  1. Open your project in Android Studio.
  2. Use a file browser to navigate to the folder containing the FCA-R1 SDK Add-on library.
  3. Fill out the fields:
    1. Application name: your app name
    2. Company domain: the qualifier for your app package name.
    3. Package name: this is the combination of the company domain and application name, which must be unique across all packages in the Android environment. Android generates this from the application name and company domain values.
    4. Project Location: the directory where your app is stored. You can use the default or specify another location, if desired.
  4. Click Next.



  5. Select the type of device you want to target, for example, Phone and Tablet.



  6. Select the Minimum SDK level you need to support the SDKs you’re using. In this example, select API 27. Click Next.
  7. Use the default Empty Activity type and click Next. For more about activities, see Android Activities.



  8. Use the default Activity Name and Layout Name and click Finish.



  9. For more about creating a project in Android Studio, see Creating projects.

Adding Custom (FCA/HARMAN) library (from SDK Add-on) to Android Studio

Note: This section is still under review.

To use a FCA-R1 SDK Add-on library in your app, you add the library files that are bundled with the SDK to your Android Studio project.

  1. Open your project in Android Studio.
  2. Use a file browser to navigate to the folder containing the FCA-R1 SDK Add-on library.



  3. Open the fca_sdk_addon_* folder, then open:
    1. Docs : to see what libraries and API methods are provided by the SDK
    2. Libs folder: to copy the libraries you want to use in your app



    3. Copy any *.jar file from libs folder that you want to add/copy for your Application project in Android Studio
  4. In your Android Studio project, top-left drop-down menu, change the Android view to Project.



  5. Right-click your app’s libs directory and select Paste.



  6. In the Copy dialog, click OK to paste the copied files into your project.



  7. The libraries now appear in your project under the libs folder:



  8. Right-click the libraries and select Add As Library.
  9. Select the module to add the library to. If your app contains several modules, ensure that you add the library to the appropriate module. Click OK.



  10. Your project now includes the SDK Add-on library you downloaded.

Deploy a sample Android App to R1 Radio


  1. Create a sample empty activity app project and add android-car.jar as anew lib to the project.
  2. Here is a code snip-it form Main Activity.java that uses some of android-car.jar.

                    package com.example.myapplication;
                    
                    import android.car.Car;
                    import android.car.CarInfoManager;
                    
                    import android.content.ComponentName;
                    import android.content.ServiceConnection;
                    import android.os.IBinder;
                    import android.support.v7.app.AppCompatActivity;
                    import android.os.Bundle;
                    import android.util.Log;
                    
                    public class MainActivity extends AppCompatActivity {
                        
                        android.car.Car myCar;
                        ServiceConnection myService = new ServiceConnection() {
                            @Override
                            public void onServiceConnected(ComponentName name, IBinder service) {
                                try
                                {
                                    CarInfoManager myCarInfoManager = (CarInfoManager) myCar.getCarManager(Car.INFO_SERVICE);
                                    Log.d("getVehicleId",myCarInfoManager.getVehicleId());
                                }
                                catch(Exception e)
                                {
                                    Log.d("Exception",e.getMessage());
                                }
                            }
                            
                            @Override
                            public void onServiceDisconnected(ComponentName name) {
                                
                            }
                        };
                        
                        @Override
                        protected void onCreate(Bundle savedInstanceState) {
                            super.onCreate(savedInstanceState);
                            setContentView(R.layout.activity_main);
                            myCar = android.car.Car.createCar(this,myService);
                            myCar.connect();
                        }
                                                            
                    }
                
  3. Make sure the project builds with no issues.



  4. Deploy the app and monitor the Logcat output, you should see this:






Updated: 04/17/2019

Top