Skip to content
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

Add Currently Playing Media Image to MediaServiceData #1074

Merged
merged 3 commits into from
Jul 16, 2019

Conversation

joeygrover
Copy link
Member

@joeygrover joeygrover commented May 22, 2019

Fixes #1047

This PR is ready for review.

Risk

This PR makes minor API changes.

Testing Plan

Code snippet

                    final SdlArtwork mediaImage = new SdlArtwork("mediaImage.png", FileType.GRAPHIC_PNG, R.drawable.media_image, false);
                    sdlManager.getFileManager().uploadArtwork(mediaImage, new CompletionListener() {
                        @Override
                        public void onComplete(boolean success) {
                            Log.i(TAG, "onComplete: service published and file sent");
                            if(!success){
                                Log.e(TAG, "onComplete: file didn't send correctly");
                                return;
                            }
                            OnAppServiceData onAppServiceData = new OnAppServiceData();
                            MediaServiceData mediaServiceData = new MediaServiceData();
                            mediaServiceData.setMediaTitle("The title is media");
                            Image image = new Image();
                            image.setImageType(ImageType.DYNAMIC);
                            image.setIsTemplate(false);
                            image.setValue(mediaImage.getName());
                            mediaServiceData.setMediaImage(image);

                            AppServiceData appServiceData = new AppServiceData();
                            appServiceData.setServiceType(AppServiceType.MEDIA.toString());
                            appServiceData.setServiceID(serviceID);
                            appServiceData.setMediaServiceData(mediaServiceData);
                            onAppServiceData.setServiceData(appServiceData);

                            sdlManager.sendRPC(onAppServiceData);

Summary

  • Added the mediaImage param to MediaServiceData

Changelog

Enhancements
  • Added the mediaImage param to MediaServiceData

Tasks Remaining:

  • Add param to RPC class
  • Add tests

CLA

@joeygrover joeygrover changed the title [WIP] Add Currently Playing Media Image to MediaServiceData Add Currently Playing Media Image to MediaServiceData May 22, 2019
@codecov-io
Copy link

codecov-io commented May 22, 2019

Codecov Report

Merging #1074 into develop will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             develop   #1074      +/-   ##
============================================
+ Coverage      46.05%   46.1%   +0.04%     
- Complexity      3692    3694       +2     
============================================
  Files            433     433              
  Lines          20260   20263       +3     
  Branches        2190    2190              
============================================
+ Hits            9331    9342      +11     
+ Misses         10445   10435      -10     
- Partials         484     486       +2
Impacted Files Coverage Δ Complexity Δ
...om/smartdevicelink/proxy/rpc/MediaServiceData.java 100% <100%> (ø) 28 <2> (+2) ⬆️
...smartdevicelink/encoder/VirtualDisplayEncoder.java 28.97% <0%> (+4.54%) 8% <0%> (ø) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38b8d22...f20420d. Read the comment docs.

@bilal-alsharifi bilal-alsharifi merged commit 5541fae into develop Jul 16, 2019
@bilal-alsharifi bilal-alsharifi deleted the feature/media_service_image branch July 16, 2019 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants