Skip to content

Commit

Permalink
Merge pull request #1 from smartdevicelink/develop
Browse files Browse the repository at this point in the history
Lockscreen dismiss
  • Loading branch information
Tnnnguyen authored Jun 5, 2019
2 parents 9682b37 + 5b60f51 commit dafab74
Show file tree
Hide file tree
Showing 1,574 changed files with 111,205 additions and 44,289 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Delete any non-applicable sections, but we may ask for more information.]
[Delete any non-applicable sections, but we may ask for more information. Please reference the [SmartDeviceLink GitHub Best Practices](https://d83tozu1c8tt6.cloudfront.net/media/resources/SDL_GitHub_BestPractices.pdf) for further instructions on how to enter an issue.]

### Bug Report
[Summary]
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[Things to note: Pull Requests **must** fix an issue. Discussion about the feature / bug takes place in the issue, discussion of the implementation takes place in the PR. Please also see the [Contributing Guide](https://github.com/smartdevicelink/sdl_android/blob/master/.github/CONTRIBUTING.md) for information on branch naming and the CLA.
[Things to note: Pull Requests **must** fix an issue. Discussion about the feature / bug takes place in the issue, discussion of the implementation takes place in the PR. Please also see the [Contributing Guide](https://github.com/smartdevicelink/sdl_android/blob/master/.github/CONTRIBUTING.md) for information on branch naming and the CLA, and the [SmartDeviceLink GitHub Best Practices](https://d83tozu1c8tt6.cloudfront.net/media/resources/SDL_GitHub_BestPractices.pdf) document for more information on how to enter a pull request. Once this PR is ready for review, please request one from @joeygrover.

Delete the above section when you've read it.]

Expand Down Expand Up @@ -30,4 +30,4 @@ This PR makes **[no / minor / major]** API changes.
- [ ] [Task 2]

### CLA
- [ ] I have signed [the CLA](https://docs.google.com/forms/d/e/1FAIpQLSdsgJY33VByaX482zHzi-xUm49JNnmuJOyAM6uegPQ2LXYVfA/viewform)
- [ ] I have signed [the CLA](https://docs.google.com/forms/d/e/1FAIpQLSdsgJY33VByaX482zHzi-xUm49JNnmuJOyAM6uegPQ2LXYVfA/viewform)
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
##############################
# Project Specific
##############################
javaSE/out/
javaSE/build/
javaSE/local.properties
javaEE/out/
javaEE/build/
javaEE/local.properties
baseAndroid/windows/


##############################
Expand Down
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ android:
- ndk-bundle

# The BuildTools version used by your project
- build-tools-27.0.3
- build-tools-28.0.3

# The SDK version used to compile your project
- android-28
- android-27
- android-26
- android-22 #For emulator
# Specify at least one system image,
Expand Down Expand Up @@ -43,10 +45,14 @@ before_script:

script:
- android list target
- ./gradlew connectedCheck
- ./android/gradlew -p ./android :sdl_android:connectedCheck
- ./android/gradlew -p ./android :hello_sdl_android:test
- ./javaSE/gradlew -p ./javaSE test
- ./hello_sdl_java/gradlew -p ./hello_sdl_java test
- ./javaEE/gradlew -p ./javaEE test

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

after_success:
- bash <(curl -s https://codecov.io/bash)
29 changes: 7 additions & 22 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,9 @@
# 4.6.0 Release Notes
# 4.8.1 Release Notes

### API New Features & Breaking Changes
- `RPCRequestFactory` has been deprecated. Please use the desired RPC's constructor instead.
- The Android Annotations Library has been added to the project to better help and inform developers about the SDK.
### Hotfix

### Enhancements
- The router service foreground lifecycle is improved. The notification should no longer be seen when connecting to non-SDL devices.
- The SDL notification now links to a webpage to explain what the notification is and how to hide it.
- 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.
- RPC classes now contain constructors with the required parameters for that RPC.
- Moved project to newer version of Gradle. Updated configurations including from `compile` to `api` and `implementation`.
- `SdlProxyBuilder` was cleaned up to remove redundant variables between the `SdlProxyBuilder.Builder` object and the `SdlProxyBuilder` class.

### Bug Fixes
- Fixed touch issues with the video streaming feature. A new module was added to handle touch events much more aligned with Android native views.
- Fixed JavaDoc issue in `UnregisterAppInterface`.
- Fixed JavaDoc issue in `AddCommand`.
- Added tags to the string resource xml file to ignore translation
- Temporary fix to the TCP transport to catch `NetworkOnTheMainThread` exceptions when the connection is closing.
- Fix issue where the `SdlBroadcastReceiver` was attempting to send implicit intents to ping the `SdlRouterService`. They are now explicit.
- Fix a potential NPE in the `SdlBroadcastReceiver` while an app is only using USB and does not include an instance of an `SdlRouterService`.
- Removed reflection usage in bluetooth transports when operating on systems that are newer than Android Oreo in anticipation of Android P.
- 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.
- [NPE at SdlProtocol.java line 1132 #946](https://github.com/smartdevicelink/sdl_java_suite/issues/946)
- [SdlManager doesn't transition to shutdown state when dispose() is called #1052] (https://github.com/smartdevicelink/sdl_java_suite/issues/1052)
- [onLegacyModeEnabled no longer implemented #1051](https://github.com/smartdevicelink/sdl_java_suite/issues/1051)
- [I can't get the value by getPressureTellTale() #1057](https://github.com/smartdevicelink/sdl_java_suite/issues/1057)
- Fixed JavaEE Hello SDL app with correct constructor usage
Binary file added JavaSuiteFolderStructure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017 - 2018, SmartDeviceLink Consortium, Inc.
Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
100 changes: 90 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
[![Build Status](https://travis-ci.org/smartdevicelink/sdl_android.svg?branch=master)](https://travis-ci.org/smartdevicelink/sdl_android)
[![codecov](https://codecov.io/gh/smartdevicelink/sdl_android/branch/master/graph/badge.svg)](https://codecov.io/gh/smartdevicelink/sdl_android)
[![Build Status](https://travis-ci.org/smartdevicelink/sdl_android.svg?branch=master)](https://travis-ci.org/smartdevicelink/sdl_java_suite)
[![codecov](https://codecov.io/gh/smartdevicelink/sdl_android/branch/master/graph/badge.svg)](https://codecov.io/gh/smartdevicelink/sdl_java_suite)
[![Slack Status](http://sdlslack.herokuapp.com/badge.svg)](http://slack.smartdevicelink.com)
[ ![Download](https://api.bintray.com/packages/smartdevicelink/sdl_android/sdl_android/images/download.svg) ](https://bintray.com/smartdevicelink/sdl_android/sdl_android/_latestVersion)

# SmartDeviceLink (SDL)

SmartDeviceLink (SDL) is a standard set of protocols and messages that connect applications on a smartphone to a vehicle head unit. This messaging enables a consumer to interact with their application using common in-vehicle interfaces such as a touch screen display, embedded voice recognition, steering wheel controls and various vehicle knobs and buttons. There are three main components that make up the SDL ecosystem.

* The [Core](https://github.com/smartdevicelink/sdl_core) component is the software which Vehicle Manufacturers (OEMs) implement in their vehicle head units. Integrating this component into their head unit and HMI based on a set of guidelines and templates enables access to various smartphone applications.
* The optional [SDL Server](https://github.com/smartdevicelink/sdl_server) can be used by Vehicle OEMs to update application policies and gather usage information for connected applications.
* The [iOS](https://github.com/smartdevicelink/sdl_ios) and [Android](https://github.com/smartdevicelink/sdl_android) libraries are implemented by app developers into their applications to enable command and control via the connected head unit.

* The [iOS](https://github.com/smartdevicelink/sdl_ios) and [Android](https://github.com/smartdevicelink/sdl_java_suite) libraries are implemented by app developers into their applications to enable command and control via the connected head unit.
* The [JavaSE](https://github.com/smartdevicelink/sdl_java_suite) (Embedded) and [JavaEE](https://github.com/smartdevicelink/sdl_java_suite) (Cloud) libraries, written in Java, are implemented by app developers into their applications to enable command and control of a connected head unit.

Pull Requests Welcome!

To understand if a contribution should be entered as an Android Pull Request (or issue), or an SDL Evolution Proposal, please reference [this document](https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals_versus_issues.md).

<a href="http://www.youtube.com/watch?feature=player_embedded&v=AzdQdSCS24M" target="_blank"><img src="http://i.imgur.com/nm8UujD.png?1" alt="SmartDeviceLink" border="10" /></a>

## Mobile Proxy
## Client Proxy

The client libraries component of SDL is meant to run on the end user’s smart-device from within SDL enabled apps, as an embedded app, or connected to from the cloud. The libraries allows the apps to connect to SDL enabled head-units and hardware through bluetooth, USB, TCP for Android and cloud and embedded apps can connect through web sockets, Java Beans, and other custom transports. Once the library establishes a connection between the smart device and head-unit through the preferred method of transport, the two components are able to communicate using the SDL defined protocol. The app integrating this library project is then able to expose its functionality to the head-unit through text, media, and other interactive elements.

The mobile library component of SDL is meant to run on the end user’s smart-device from within SDL enabled apps. The library allows the apps to connect to SDL enabled head-units and hardware through bluetooth, USB, and TCP. Once the library establishes a connection between the smart device and head-unit through the preferred method of transport, the two components are able to communicate using the SDL defined protocol. The app integrating this library project is then able to expose its functionality to the head-unit through text, media, and other interactive elements.
# SmartDeviceLink Java Suite

## SmartDeviceLink Android
[ ![Download Android](https://api.bintray.com/packages/smartdevicelink/sdl_android/sdl_android/images/download.svg) ](https://bintray.com/smartdevicelink/sdl_android/sdl_android/_latestVersion)

We're still working on creating documentation for each of these individual repositories, but in the meantime, you can find more information about SmartDeviceLink [here](https://smartdevicelink.com)

Expand All @@ -32,7 +36,7 @@ You can also find some branches that have yet to be merged into this GitHub proj

To compile with the latest release of SDL Android, include the following in your app's `build.gradle` file,

```
```sh
repositories {
jcenter()
}
Expand All @@ -51,7 +55,83 @@ If you prefer not to use any of the aforementioned dependency managers, you can

Developers using Proguard to shrink and obfuscate their code should be sure to include the following lines in their proguard-rules.pro file:

```
```sh
-keep class com.smartdevicelink.** { *; }
-keep class com.livio.** { *; }
```
# Video streaming apps must add the following line
-keep class ** extends com.smartdevicelink.streaming.video.SdlRemoteDisplay { *; }
```

## SmartDeviceLink Java

### JavaSE

[ ![Download JavaSE](https://api.bintray.com/packages/smartdevicelink/sdl_java_se/sdl_java_se/images/download.svg) ](https://bintray.com/smartdevicelink/sdl_java_se/sdl_java_se/_latestVersion)

The JavaSE project is meant to allow SDL compatibility for embedded applications.

#### Dependency Managers

To compile with the latest release of SDL JavaSE, include the following in your app's `build.gradle` file,

```sh
repositories {
jcenter()
}
dependencies {
implementation 'com.smartdevicelink:sdl_java_se:4.+'
}
```

### JavaEE

[ ![Download JavaEE](https://api.bintray.com/packages/smartdevicelink/sdl_java_ee/sdl_java_ee/images/download.svg) ](https://bintray.com/smartdevicelink/sdl_java_ee/sdl_java_ee/_latestVersion)

The JavaEE project is meant to allow SDL compatibility for web applications.

#### Dependency Managers

To compile with the latest release of SDL JavaEE, include the following in your app's `build.gradle` file,

```sh
repositories {
jcenter()
}
dependencies {
implementation 'com.smartdevicelink:sdl_java_ee:4.+'
}
```

#### Manually building a JAR

If you prefer making a JAR, simply call:

```sh
gradle build
```
from within the project (JavaSE or JavaEE) and a JAR should be generated in the `build/libs` folder

## Java Suite Repo Structure

![Java Suite Folder Structure](JavaSuiteFolderStructure.png)

#### base Folder
The base folder contains the source set that is shared between all of the compilable projects. This folder does not contain a a compilable project.

#### baseAndroid Folder
The baseAndroid folder contains symbolic links to files and folders from the base folder. This has been included since the Java Suite refactor is a minor version release and the base folder contains breaking changes for the Android project. This folder does not contain a a compilable project.

#### android Folder
The android folder contains the SDL Android library as well as the sample project for Android. Both of those are compilable projects.

#### javaSE
The javaSE folder contains the SDL JavaSE Library. The base folder source set is added as a dependency. This project can be used for embedded or remote SDL applications. It uses a web socket transport by default but can be made to work with other transports via the `CustomTransport`.

###### JavaSE Sample App
The JavaSE sample app is in the hello_sdl_java folder. It demonstrates an efficient way to structure a Java app using the JavaSE library.

#### javaEE
The javaEE folder contains the SDL JavaEE library. The JavaSE folder is used as a source set and added as a dependency. This library is based off the JavaSE library and will contain specifics for the JavaEe platform.

###### JavaEE Sample App
The JavaEE sample app is in the hello_sdl_java_ee folder. Most of the code is commented out since the library and sample app do not include the dependencies of JavaEE due to licensing issues. However, the commented out code demonstrates how to build a Java based app into the JavaEE bean architecture.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.8.1
35 changes: 35 additions & 0 deletions android/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## SmartDeviceLink Android

We're still working on creating documentation for each of these individual repositories, but in the meantime, you can find more information about SmartDeviceLink [here](https://smartdevicelink.com)

### Installation

#### Dependency Managers

To compile with the latest release of SDL Android, include the following in your app's `build.gradle` file,

```
repositories {
jcenter()
}
dependencies {
implementation 'com.smartdevicelink:sdl_android:4.+'
}
```

For Maven or Ivy snippets please look at [Bintray](https://bintray.com/smartdevicelink/sdl_android/sdl_android)

#### Manually

If you prefer not to use any of the aforementioned dependency managers, you can integrate SDL Android into your project manually.

### Proguard Rules

Developers using Proguard to shrink and obfuscate their code should be sure to include the following lines in their proguard-rules.pro file:

```
-keep class com.smartdevicelink.** { *; }
-keep class com.livio.** { *; }
# Video streaming apps must add the following line
-keep class ** extends com.smartdevicelink.streaming.video.SdlRemoteDisplay { *; }
```
27 changes: 27 additions & 0 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
File renamed without changes.
File renamed without changes.
6 changes: 6 additions & 0 deletions android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#Sun Jan 20 22:30:48 EST 2019
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
File renamed without changes.
File renamed without changes.
60 changes: 60 additions & 0 deletions android/hello_sdl_android/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.sdl.hellosdlandroid"
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
flavorDimensions "default"
productFlavors{
multi_sec_high {
buildConfigField 'String', 'TRANSPORT', '"MULTI"'
buildConfigField 'String', 'SECURITY', '"HIGH"'
}
multi_sec_med {
buildConfigField 'String', 'TRANSPORT', '"MULTI"'
buildConfigField 'String', 'SECURITY', '"MED"'
}
multi_sec_low {
buildConfigField 'String', 'TRANSPORT', '"MULTI"'
buildConfigField 'String', 'SECURITY', '"LOW"'
}
multi_sec_off {
buildConfigField 'String', 'TRANSPORT', '"MULTI"'
buildConfigField 'String', 'SECURITY', '"OFF"'
}
multi_high_bandwidth {
buildConfigField 'String', 'TRANSPORT', '"MULTI_HB"'
buildConfigField 'String', 'SECURITY', '"OFF"'
}
tcp {
buildConfigField 'String', 'TRANSPORT', '"TCP"'
buildConfigField 'String', 'SECURITY', '"OFF"'
}
}
lintOptions {
disable 'GoogleAppIndexingWarning'
}
}


dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation project(path: ':sdl_android')
testImplementation 'junit:junit:4.12'
}
Loading

0 comments on commit dafab74

Please sign in to comment.