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
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.







Deploy a sample Android App to R1 Radio
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();
}
}



Updated: 04/17/2019