-
Notifications
You must be signed in to change notification settings - Fork 25
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
Making the screen mirror size as big as the navigation map? #14
Comments
Very interesting, they generally have the same logic and so it should work the same. |
I have Xiaomi Redmi note 10 pro and the screen is 6.67inch (dimensions of the phone are 164 x 76.5 mm ) |
Hi, I have the same issue with a Evo idrive 5 and a Samsung Galaxy S10 |
same here, the red area is pure black, the green area is like dark gray, seems like idrive's background. apk downloaded from releases, commit: d0a0fa3 Redmi Note 12 Pro is a 6.67" device, with a 1080x2400 120Hz OLED display hmi.display-height: 480 |
I found some logs,
|
hardcode some numbers have the image size correct.
the position still needs turning. |
Cool could you post the updated APK? :) |
https://github.com/galenzhao/IDriveConnectAddons/releases/tag/v1 I'll descript how to custom settings later. first, is impossible to make a real full-screen mirror unless your phone screen is the same aspect ratio as HU's screen. I'll show the custom settings based on my phone and HU. phone screen: 2400x1080 custom mirror setting: when using the screen mirror function. the app creates a virtual screen to capture screenshot images, you can think it's an image buffer with rhmiWidth and rhmiHeight. then the phone screenshot image will be placed in the center of the image buffer with a fixed aspect ratio. then the image buffer will draw on HU with a default left and top padding. my phone's aspect ratio is 2400/1080, which makes the screenshot image covered a little by HU's top-right corner image( like this photo https://user-images.githubusercontent.com/3184101/237265225-524fa6a9-c99b-41e4-9dcb-2c3d7797c085.jpeg). in this case, I need to change the image buffer's height bigger, to make sure the HU's background is still covered which I can not change the padding-top value. but with a bigger image buffer height, the actual screenshot image will move down by 1/2 height increment. the final result is like this: so it is based on your phone and HU screen size and custom dimension setting to show a perfect screen mirror. |
and here's the code: https://github.com/galenzhao/IDriveConnectAddons/tree/customsettings it's maybe not beautiful, cuz I'm not an Android developer or understand Kotlin. for future dev, we may calc these settings by code, cuz we can get the phone's screen size by code. |
Thank you @galenzhao for looking into this! I hadn't been able to think of any explanations, so thank you for experimenting and trying to figure it out! AAIdrive's map module and the screen mirroring code use the same logic to figure out the size for the output widget in the car. My only guesses are that the problem is either in code to center the image in the car's display, or the aspect mismatch that you suspect. Now that you have code for UI settings, perhaps you could experiment with adding different stretch modes? Currently it just sets the virtual display to the same size as the car's output image should be, and the phone automatically adds black bars. Perhaps instead it should match the phone's aspect ratio and stretch the image manually. AAIdrive has an example of using Canvas operations to resize an image, and Matrix has a few different methods to create the resize matrix for different stretch modes. |
the mirror addon set a smaller virtual display: Line 50 in d0a0fa3
maybe HU does not scale a small image to a bigger one even if you are setting a bigger width value for the image and for the screenshot image resizing, I think we better keep it aspect and just calc a better position to place. |
Hello. I have maybe a noob question, but how to add addones to the application? |
You would install an APK from the repo's Releases page |
Thanks a lot 💪
wt., 23 maj 2023, 04:05 użytkownik Walter Huf ***@***.***>
napisał:
… You would install an APK from the repo's Releases page
<https://github.com/BimmerGestalt/IDriveConnectAddons/releases>
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAA5HCAKLYEDNH2VG6OZ6S3XHQSN5ANCNFSM6AAAAAARTQDWJU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Thanks a lot for reply. I have a question. Is this possible to add
information when dpf is regenerating?
wt., 23 maj 2023, 04:05 użytkownik Walter Huf ***@***.***>
napisał:
… You would install an APK from the repo's Releases page
<https://github.com/BimmerGestalt/IDriveConnectAddons/releases>
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAA5HCAKLYEDNH2VG6OZ6S3XHQSN5ANCNFSM6AAAAAARTQDWJU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I'm not sure what "dpf regenerating" is, in the context of screen mirroring or navigation. |
Dpf i mean Diesel Particulate Filter. This would be very useful to have
information when is regenerating process runing.
wt., 13 cze 2023, 15:42 użytkownik Walter Huf ***@***.***>
napisał:
… I'm not sure what "dpf regenerating" is, in the context of screen
mirroring or navigation.
If it's a piece of car information, the only options are in this api:
https://bimmergestalt.github.io/BMWConnectedAnalysis/cds/
—
Reply to this email directly, view it on GitHub
<#14 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BAA5HCA7FG5D6BRTCV6A27TXLB365ANCNFSM6AAAAAARTQDWJU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ah yes, that is not related to this bug report, about screen mirroring being smaller than navigation. |
Hello, I have i3 with NBT EVO with 940x580 resolution and Samsun Flip3 with 2400x1080. May be I am using wrong version of Screen mirror? |
Thank you for bringing the empty releases page to my attention! The build failed after a recent Readme update and I needed to fix it. |
Problems I described above was with version 1.1 from https://github.com/galenzhao/IDriveConnectAddons/releases/download/v1.1/screen_mirror-debug.apk, today I downloaded version 2.1 from https://github.com/galenzhao/IDriveConnectAddons/releases/download/v1.2/screen_mirror-debug.apk Which app version is the correct one, allowing to change screen size and position? |
I imagine that's the right version, @galenzhao would know better. You should describe what problem you are having, and why the dimension adjustments don't appear to work for you. |
the newer ver1.2 fixes some hardcode values, is there any difference on the screen after you change the value? |
Hello, I tried both 1.1 and 1.2 version, behaviour is the same. When I select screen mirroring in the car menu, I got this on the car screen and this on the phone It is not possible to change values on the phone before I grant permission, only after. And this does not change anything on the car screen, is always has blank areas on the right, see below |
Thank you for the screenshot of your phone being mirrored to the car! |
@hufman @galenzhao thank you for comments. I changed values in Screen Mirror app before granting permission and see now changes on the car screen. Now question is what should be right settings to fill whole screen. I followed above calculation for my phone ZFlip3 with 2640x1080 screen:
Map function shows full screen automatically, see below Where should I put 607, and what should be remaining parameters? |
@galenzhao wow that's very detailed, thanks a lot. Just two questions:
|
Are you sure about your rhmiWidth (you can check by setting AAIdrive to show Advanced options and looking in Car Information)? Are you able to enable the sidebar? It looks like you have a widescreen car, which would be 1440x540 (which I don't think i3 came in) or 1280x480. Both of which are a wider aspect ratio than your phone, which is why your phone isn't taking up the right side of the screen in your screenshot. |
This is the same method that the AAIdrive map uses, so it should fix #14. It definitely should help some tall-aspect phones show wider and take up the full vertical height
I just pushed a new build that reduces the visible margin on the right side. It doesn't change any aspect ratio, so the phone image will try to fill as much as possible but may still show black bars. |
I was not able to install new build from releases page, it says "application is not installed as it conflicts with other package". Was able before to install version 1.2 over 1.1. Checked and you are right, looks like my screen has 1280x480 resolution. What is maximum size of the screen I can have with my phone? |
Indeed, you would need to uninstall galenzhao's build to install the main build, Android disallows app updates for the same app name from different authors to prevent data from leaking or being incompatible. |
@hufman Walter, How can I modify image size and position in the code to make it perfect, not to disturb you further? Change any parameters in the code, recompile and try again? |
The code responsible for moving the image to the left is here. It uses some data about IDrive screen sizes, and so your screen was previously measured as being able to move the image 70 pixels to the left (paddingLeft) and having 64 pixels more on the left where the car doesn't allow the app to draw (marginLeft). You can see this in the map image you showed before. You are free to adjust the POSITION_X and recompile the app, of course, but the marginLeft will prevent the image from taking up the entire screen. @galenzhao's code makes the numbers easily editable, but it would want to be updated to use the new visibleWidth. I'm glad the new version works better, and matches the map size! |
This is the same method that the AAIdrive map uses, so it should fix BimmerGestalt#14. It definitely should help some tall-aspect phones show wider and take up the full vertical height
This is the same method that the AAIdrive map uses, so it should fix BimmerGestalt#14. It definitely should help some tall-aspect phones show wider and take up the full vertical height
This is the same method that the AAIdrive map uses, so it should fix BimmerGestalt#14. It definitely should help some tall-aspect phones show wider and take up the full vertical height
Hello,
First of all thanks for the app, i wanted to know is there a way to make the screen mirror size as big as the navigation map? As you can see in the pictures i will post, the screen mirror has a lot of bottom margins left without use while the navigation app is full screen and very beautiful.
If there is a way, if you could just give me a hint of which part of the code i have to change for this?
Thanks
The text was updated successfully, but these errors were encountered: