Skip to content

Commit efc9fdc

Browse files
committed
Merge branch 'release/4.7.0-rc1'
2 parents 42ef06b + c578331 commit efc9fdc

File tree

343 files changed

+34706
-3573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+34706
-3573
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ android:
1313
- build-tools-27.0.3
1414

1515
# The SDK version used to compile your project
16+
- android-28
1617
- android-27
1718
- android-26
1819
- android-22 #For emulator
@@ -44,7 +45,7 @@ before_script:
4445

4546
script:
4647
- android list target
47-
- ./gradlew connectedCheck
48+
- ./gradlew :sdl_android:connectedCheck
4849

4950
before_install:
5051
- echo yes | sdkmanager "build-tools;27.0.3"

CHANGELOG.md

Lines changed: 82 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,82 @@
1-
# 4.6.0 Release Notes
2-
3-
### API New Features & Breaking Changes
4-
- `RPCRequestFactory` has been deprecated. Please use the desired RPC's constructor instead.
5-
- The Android Annotations Library has been added to the project to better help and inform developers about the SDK.
6-
7-
### Enhancements
8-
- The router service foreground lifecycle is improved. The notification should no longer be seen when connecting to non-SDL devices.
9-
- The SDL notification now links to a webpage to explain what the notification is and how to hide it.
10-
- The required `intent-filter` entires for the `SdlBroadcastReceiver` has been reduced. It is now only listening for the SDL custom intent, ACL connect, and USB connection if using AOA.
11-
- RPC classes now contain constructors with the required parameters for that RPC.
12-
- Moved project to newer version of Gradle. Updated configurations including from `compile` to `api` and `implementation`.
13-
- `SdlProxyBuilder` was cleaned up to remove redundant variables between the `SdlProxyBuilder.Builder` object and the `SdlProxyBuilder` class.
14-
15-
### Bug Fixes
16-
- Fixed touch issues with the video streaming feature. A new module was added to handle touch events much more aligned with Android native views.
17-
- Fixed JavaDoc issue in `UnregisterAppInterface`.
18-
- Fixed JavaDoc issue in `AddCommand`.
19-
- Added tags to the string resource xml file to ignore translation
20-
- Temporary fix to the TCP transport to catch `NetworkOnTheMainThread` exceptions when the connection is closing.
21-
- Fix issue where the `SdlBroadcastReceiver` was attempting to send implicit intents to ping the `SdlRouterService`. They are now explicit.
22-
- Fix a potential NPE in the `SdlBroadcastReceiver` while an app is only using USB and does not include an instance of an `SdlRouterService`.
23-
- Removed reflection usage in bluetooth transports when operating on systems that are newer than Android Oreo in anticipation of Android P.
24-
- Fix an issue where the `SdlBroadcastReceiver` would throw a false positive regarding whether or not an app had included the correct `intent-filter` in their `SdlRouterService` manifest declaration.
1+
# 4.7.0 Release Notes
2+
3+
## Summary
4+
5+
- Manager APIs - The manager APIs will closely align with the iOS SDL Library managers, with a few exceptions to match the native platform.
6+
- Transport layer overhaul - The protocol layer and transport layer have been overhauled to properly match the stack in which they should exist. This also sets up three additional features
7+
- AOA multiplexing - SDL apps can now use the multiplexing transport with the AOA/USB transport. Multiple apps can then register on a single AOA connection to SDL Core.
8+
- Primary/Secondary transports - apps can now carry their session over multiple transports with the first transport being primary, and a later connected one being a secondary. This means apps can register over bluetooth, then connect over WiFi when necessary (video/audio streaming).
9+
- All apps should be using `MultiplexingConfig` at this point unless debugging with TCP.
10+
- Color Scheme for templates - App developers now have the ability to set color themes for the templates they use
11+
- New Remote Control modules
12+
- Additional vehicle data added
13+
- `SdlProxyALM` has been deprecated - The `SdlProxyALM` will still function for this release but it has now moved into maintenance mode and no new features will be added. The manager APIs should be used from this point forward.
14+
15+
16+
## New Features
17+
18+
- [Add enum for `predefinedlayout`](https://github.com/smartdevicelink/sdl_android/pull/851)
19+
- [Feature/Listen for responses and capability changes in ISdl](https://github.com/smartdevicelink/sdl_android/pull/828)
20+
- [Add ability for RPCs to be versioned/formatted](https://github.com/smartdevicelink/sdl_android/pull/839)
21+
- [[SDL 0159] Static SDL Icon Names Enum](https://github.com/smartdevicelink/sdl_android/issues/740)
22+
23+
#### Transport
24+
25+
- [[SDL 0141] Supporting simultaneous multiple transports](https://github.com/smartdevicelink/sdl_android/issues/714)
26+
- [[SDL 0194] Android Transport Layer Overhaul](https://github.com/smartdevicelink/sdl_android/issues/841)
27+
28+
#### Manager API
29+
30+
- [[SDL 0171] Android Manager APIs](https://github.com/smartdevicelink/sdl_android/issues/782)
31+
- [[SDL 0113] SDLAudioStreamManager](https://github.com/smartdevicelink/sdl_android/issues/654)
32+
33+
#### RPC Updates
34+
35+
- [Add PLAY_PAUSE to ButtonName enum](https://github.com/smartdevicelink/sdl_android/issues/228)
36+
- [[SDL 0014] Adding Audio File Playback to TTSChunk](https://github.com/smartdevicelink/sdl_android/issues/419)
37+
- [[SDL 0037] Expand Mobile `PutFile` RPC](https://github.com/smartdevicelink/sdl_android/issues/452)
38+
- [[SDL 0041] Provide AppIcon resumption across app registration requests](https://github.com/smartdevicelink/sdl_android/issues/453)
39+
- [[SDL 0062] Template images](https://github.com/smartdevicelink/sdl_android/issues/533)
40+
- [[SDL 0064] Choice-VR optional](https://github.com/smartdevicelink/sdl_android/issues/739)
41+
- [[SDL 0063] Display name parameter](https://github.com/smartdevicelink/sdl_android/issues/534)
42+
- [[SDL 0163] Make spaceAvailable field non-mandatory ](https://github.com/smartdevicelink/sdl_android/issues/860)
43+
- [[SDL 0083] Expandable Design for Proprietary Data Exchange](https://github.com/smartdevicelink/sdl_android/issues/594)
44+
- [[SDL 0085] SubMenu Icon](https://github.com/smartdevicelink/sdl_android/issues/603)
45+
- [[SDL 0109] SetAudioStreamingIndicator RPC](https://github.com/smartdevicelink/sdl_android/issues/710)
46+
- [[SDL 0147] Template Improvements: Color Scheme](https://github.com/smartdevicelink/sdl_android/issues/715)
47+
- [[SDL 0150] Enhancing onHMIStatus with a New Parameter for Video Streaming State](https://github.com/smartdevicelink/sdl_android/issues/734)
48+
- [[SDL 0151] ImageFieldName for SecondaryImage](https://github.com/smartdevicelink/sdl_android/issues/724)
49+
- [[SDL 0153] Support for Short and Full UUID App ID](https://github.com/smartdevicelink/sdl_android/issues/738)
50+
51+
#### Remote Control
52+
53+
- [[SDL 0099] New modules LIGHT, AUDIO, HMI_SETTINGS and parameter SIS Data](https://github.com/smartdevicelink/sdl_android/issues/624)
54+
- [[SDL 0105] New Seat module](https://github.com/smartdevicelink/sdl_android/issues/651)
55+
- [[SDL 0106] OnRCStatus notification](https://github.com/smartdevicelink/sdl_android/issues/657)
56+
- [[SDL 0160] Radio Parameter Update](https://github.com/smartdevicelink/sdl_android/issues/741)
57+
- [[SDL 0165] Lights modules - More Names and Status Values](https://github.com/smartdevicelink/sdl_android/issues/751)
58+
- [[SDL 0172] Update OnRCStatus with a new allowed parameter](https://github.com/smartdevicelink/sdl_android/issues/783)
59+
- [[SDL 0182] Audio Source AM/FM/XM/DAB](https://github.com/smartdevicelink/sdl_android/issues/809)
60+
61+
#### Vehicle Data
62+
63+
- [[SDL 0072] FuelRange](https://github.com/smartdevicelink/sdl_android/issues/552)
64+
- [[SDL 0082] EngineOilLife](https://github.com/smartdevicelink/sdl_android/issues/593)
65+
- [[SDL 0097] Tire pressure additions](https://github.com/smartdevicelink/sdl_android/issues/613)
66+
- [[SDL 0102] ElectronicParkBrakeStatus](https://github.com/smartdevicelink/sdl_android/issues/632)
67+
- [[SDL 0107] TurnSignal](https://github.com/smartdevicelink/sdl_android/issues/650)
68+
- [[SDL 0175] Updating DOP value range for GPS notification](https://github.com/smartdevicelink/sdl_android/issues/803)
69+
70+
71+
## Bug Fixes
72+
73+
- [SystemCapabilityManager false positive issue](https://github.com/smartdevicelink/sdl_android/issues/844)
74+
- [Optimize video streaming for still graphics](https://github.com/smartdevicelink/sdl_android/issues/806)
75+
- [sdl.router.startservice broadcast is sent twice unexpectedly](https://github.com/smartdevicelink/sdl_android/issues/884)
76+
- [maxBitrate in VIDEO_STREAMING capability is read in wrong unit](https://github.com/smartdevicelink/sdl_android/issues/882)
77+
78+
79+
## Documentation
80+
81+
- [Add third_party file](https://github.com/smartdevicelink/sdl_android/issues/865)
82+

hello_sdl_android/build.gradle

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 28
5+
defaultConfig {
6+
applicationId "com.sdl.hellosdlandroid"
7+
minSdkVersion 14
8+
targetSdkVersion 28
9+
versionCode 1
10+
versionName "1.0"
11+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
12+
}
13+
buildTypes {
14+
release {
15+
minifyEnabled false
16+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
17+
}
18+
}
19+
flavorDimensions "default"
20+
productFlavors{
21+
multi_sec_high {
22+
buildConfigField 'String', 'TRANSPORT', '"MULTI"'
23+
buildConfigField 'String', 'SECURITY', '"HIGH"'
24+
}
25+
multi_sec_med {
26+
buildConfigField 'String', 'TRANSPORT', '"MULTI"'
27+
buildConfigField 'String', 'SECURITY', '"MED"'
28+
}
29+
multi_sec_low {
30+
buildConfigField 'String', 'TRANSPORT', '"MULTI"'
31+
buildConfigField 'String', 'SECURITY', '"LOW"'
32+
}
33+
multi_sec_off {
34+
buildConfigField 'String', 'TRANSPORT', '"MULTI"'
35+
buildConfigField 'String', 'SECURITY', '"OFF"'
36+
}
37+
multi_high_bandwidth {
38+
buildConfigField 'String', 'TRANSPORT', '"MULTI_HB"'
39+
buildConfigField 'String', 'SECURITY', '"OFF"'
40+
}
41+
tcp {
42+
buildConfigField 'String', 'TRANSPORT', '"TCP"'
43+
buildConfigField 'String', 'SECURITY', '"OFF"'
44+
}
45+
}
46+
lintOptions {
47+
disable 'GoogleAppIndexingWarning'
48+
}
49+
}
50+
51+
52+
dependencies {
53+
implementation fileTree(dir: 'libs', include: ['*.jar'])
54+
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
55+
exclude group: 'com.android.support', module: 'support-annotations'
56+
})
57+
implementation 'com.android.support:appcompat-v7:28.0.0'
58+
implementation project(path: ':sdl_android')
59+
testImplementation 'junit:junit:4.12'
60+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Add project specific ProGuard rules here.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /Users/livio/Library/Android/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
6+
#
7+
# For more details, see
8+
# http://developer.android.com/guide/developing/tools/proguard.html
9+
10+
# Add any project specific keep options here:
11+
12+
# If your project uses WebView with JS, uncomment the following
13+
# and specify the fully qualified class name to the JavaScript interface
14+
# class:
15+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16+
# public *;
17+
#}
18+
19+
-keep class com.smartdevicelink.** { *; }
20+
-keep class com.livio.** { *; }
21+
22+
# Uncomment this to preserve the line number information for
23+
# debugging stack traces.
24+
#-keepattributes SourceFile,LineNumberTable
25+
26+
# If you keep the line number information, uncomment this to
27+
# hide the original source file name.
28+
#-renamesourcefileattribute SourceFile
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="com.sdl.hellosdlandroid">
5+
6+
<uses-permission android:name="android.permission.BLUETOOTH" />
7+
<uses-permission android:name="android.permission.INTERNET" />
8+
<!-- Required to check if WiFi is enabled -->
9+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
10+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
11+
12+
<!-- Required to use the USB Accessory mode -->
13+
<uses-feature android:name="android.hardware.usb.accessory" />
14+
15+
<application
16+
android:allowBackup="false"
17+
android:icon="@mipmap/ic_launcher"
18+
android:label="@string/app_name"
19+
android:theme="@style/AppTheme"
20+
tools:ignore="DeepLinks">
21+
<activity
22+
android:name=".MainActivity"
23+
android:label="@string/app_name" >
24+
<intent-filter>
25+
<action android:name="android.intent.action.MAIN" />
26+
27+
<category android:name="android.intent.category.LAUNCHER" />
28+
</intent-filter>
29+
</activity>
30+
31+
<activity android:name="com.smartdevicelink.transport.USBAccessoryAttachmentActivity"
32+
android:launchMode="singleTop">
33+
<intent-filter>
34+
<action android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED" />
35+
</intent-filter>
36+
37+
<meta-data
38+
android:name="android.hardware.usb.action.USB_ACCESSORY_ATTACHED"
39+
android:resource="@xml/accessory_filter" />
40+
</activity>
41+
42+
<service android:name="com.sdl.hellosdlandroid.SdlService" >
43+
</service>
44+
<service
45+
android:name=".SdlRouterService"
46+
android:exported="true"
47+
android:process="com.smartdevicelink.router">
48+
<intent-filter>
49+
<action android:name="com.smartdevicelink.router.service"/>
50+
</intent-filter>
51+
<meta-data android:name="@string/sdl_router_service_version_name" android:value="@integer/sdl_router_service_version_value" />
52+
</service>
53+
<receiver
54+
android:name=".SdlReceiver"
55+
android:enabled="true"
56+
android:exported="true"
57+
tools:ignore="ExportedReceiver">
58+
<intent-filter>
59+
<action android:name="com.smartdevicelink.USB_ACCESSORY_ATTACHED"/> <!--For AOA -->
60+
<action android:name="android.bluetooth.device.action.ACL_CONNECTED" />
61+
<action android:name="sdl.router.startservice" />
62+
</intent-filter>
63+
</receiver>
64+
<activity android:name="com.smartdevicelink.managers.lockscreen.SDLLockScreenActivity"
65+
android:launchMode="singleTop"/>
66+
</application>
67+
68+
</manifest>
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.sdl.hellosdlandroid;
2+
3+
import android.content.Intent;
4+
import android.os.Bundle;
5+
import android.support.v7.app.AppCompatActivity;
6+
import android.view.Menu;
7+
import android.view.MenuItem;
8+
9+
public class MainActivity extends AppCompatActivity {
10+
private static final String TAG = "MainActivity";
11+
12+
@Override
13+
protected void onCreate(Bundle savedInstanceState) {
14+
super.onCreate(savedInstanceState);
15+
setContentView(R.layout.activity_main);
16+
//If we are connected to a module we want to start our SdlService
17+
if(BuildConfig.TRANSPORT.equals("MULTI") || BuildConfig.TRANSPORT.equals("MULTI_HB")) {
18+
SdlReceiver.queryForConnectedService(this);
19+
}else if(BuildConfig.TRANSPORT.equals("TCP")) {
20+
Intent proxyIntent = new Intent(this, SdlService.class);
21+
startService(proxyIntent);
22+
}
23+
}
24+
25+
@Override
26+
public boolean onCreateOptionsMenu(Menu menu) {
27+
// Inflate the menu; this adds items to the action bar if it is present.
28+
getMenuInflater().inflate(R.menu.main, menu);
29+
return true;
30+
}
31+
32+
@Override
33+
public boolean onOptionsItemSelected(MenuItem item) {
34+
// Handle action bar item clicks here. The action bar will
35+
// automatically handle clicks on the Home/Up button, so long
36+
// as you specify a parent activity in AndroidManifest.xml.
37+
int id = item.getItemId();
38+
if (id == R.id.action_settings) {
39+
return true;
40+
}
41+
return super.onOptionsItemSelected(item);
42+
}
43+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package com.sdl.hellosdlandroid;
2+
3+
import android.content.Context;
4+
import android.content.Intent;
5+
import android.os.Build;
6+
import android.util.Log;
7+
8+
import com.smartdevicelink.transport.SdlBroadcastReceiver;
9+
import com.smartdevicelink.transport.SdlRouterService;
10+
import com.smartdevicelink.transport.TransportConstants;
11+
12+
public class SdlReceiver extends SdlBroadcastReceiver {
13+
private static final String TAG = "SdlBroadcastReciever";
14+
public static final String RECONNECT_LANG_CHANGE = "RECONNECT_LANG_CHANGE";
15+
16+
@Override
17+
public void onSdlEnabled(Context context, Intent intent) {
18+
Log.d(TAG, "SDL Enabled");
19+
intent.setClass(context, SdlService.class);
20+
21+
// SdlService needs to be foregrounded in Android O and above
22+
// This will prevent apps in the background from crashing when they try to start SdlService
23+
// Because Android O doesn't allow background apps to start background services
24+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
25+
context.startForegroundService(intent);
26+
} else {
27+
context.startService(intent);
28+
}
29+
}
30+
31+
@Override
32+
public Class<? extends SdlRouterService> defineLocalSdlRouterClass() {
33+
return com.sdl.hellosdlandroid.SdlRouterService.class;
34+
}
35+
36+
@Override
37+
public void onReceive(Context context, Intent intent) {
38+
super.onReceive(context, intent); // Required if overriding this method
39+
40+
if (intent != null) {
41+
String action = intent.getAction();
42+
if (action != null){
43+
if(action.equalsIgnoreCase(TransportConstants.START_ROUTER_SERVICE_ACTION)) {
44+
if (intent.getBooleanExtra(RECONNECT_LANG_CHANGE, false)) {
45+
onSdlEnabled(context, intent);
46+
}
47+
}
48+
}
49+
}
50+
}
51+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package com.sdl.hellosdlandroid;
2+
3+
4+
public class SdlRouterService extends com.smartdevicelink.transport.SdlRouterService {
5+
6+
7+
8+
}

0 commit comments

Comments
 (0)