Skip to content

add high res SDL logos (multiplexing) #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
defaultConfig {
applicationId "com.example.sdl_capabilities_android"
minSdk 21
targetSdk 31
targetSdk 30
versionCode 1
versionName "1.0"

Expand Down
9 changes: 9 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />

<queries>
<intent>
<action android:name="com.smartdevicelink.router.service" />
</intent>
<intent>
<action android:name="sdl.router.startservice" />
</intent>
</queries>

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.smartdevicelink.transport.SdlBroadcastReceiver;
import com.smartdevicelink.util.DebugTool;

public class MainActivity extends AppCompatActivity {
Expand All @@ -18,8 +19,9 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
DebugTool.enableDebugTool();
Intent intent = new Intent(this, ConfigActivity.class);
startActivityForResult(intent, CONFIGS_ACTIVITY_REQUEST_CODE);
//Intent intent = new Intent(this, ConfigActivity.class);
//startActivityForResult(intent, CONFIGS_ACTIVITY_REQUEST_CODE);
SdlBroadcastReceiver.queryForConnectedService(this);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCResponseListener;
import com.smartdevicelink.transport.MultiplexTransportConfig;
import com.smartdevicelink.transport.TCPTransportConfig;
import com.smartdevicelink.util.DebugTool;
import com.smartdevicelink.util.SystemInfo;
Expand Down Expand Up @@ -127,8 +128,10 @@ public void onDestroy() {
public int onStartCommand(Intent intent, int flags, int startId) {

if (sdlManager == null) {
//MultiplexTransportConfig transport = new MultiplexTransportConfig(this, APP_ID, MultiplexTransportConfig.FLAG_MULTI_SECURITY_OFF);
TCPTransportConfig transport = new TCPTransportConfig(Config.CORE_PORT, Config.CORE_IP, false);
MultiplexTransportConfig transport = new MultiplexTransportConfig(this, APP_ID, MultiplexTransportConfig.FLAG_MULTI_SECURITY_OFF);
transport.setRequiresAudioSupport(false);
transport.setRequiresHighBandwidth(false);
//TCPTransportConfig transport = new TCPTransportConfig(Config.CORE_PORT, Config.CORE_IP, false);

// The app type to be used
Vector<AppHMIType> appType = new Vector<>();
Expand Down Expand Up @@ -193,8 +196,8 @@ public boolean onSystemInfoReceived(SystemInfo systemInfo) {

return START_STICKY;
}
SdlArtwork artwork1 = new SdlArtwork("appIcon2.png", FileType.GRAPHIC_PNG, R.drawable.ic_sdl, false);
SdlArtwork artwork2 = new SdlArtwork("appIcon3.png", FileType.GRAPHIC_PNG, R.mipmap.icon_blanco, false);
SdlArtwork artwork1 = new SdlArtwork("appIcon2.png", FileType.GRAPHIC_PNG, R.drawable.sdl_logo_, false);
SdlArtwork artwork2 = new SdlArtwork("appIcon3.png", FileType.GRAPHIC_PNG, R.drawable.blanco_grande, false);

private void setMainScreen () {
TemplateConfiguration templateConfiguration = new TemplateConfiguration().setTemplate(PredefinedLayout.TEXT_WITH_GRAPHIC.toString());
Expand All @@ -206,7 +209,7 @@ private void setMainScreen () {
private void setMenu () {

// some arts
SdlArtwork livio = new SdlArtwork("livio.png", FileType.GRAPHIC_PNG, R.drawable.ic_sdl, false);
SdlArtwork livio = new SdlArtwork("livio.png", FileType.GRAPHIC_PNG, R.drawable.sdl_logo_, false);

// some voice commands
List<String> voice2 = Collections.singletonList("Cell two");
Expand Down
Binary file added app/src/main/res/drawable/blanco_grande.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/src/main/res/drawable/sdl_logo_.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.