fix: get screen density of android devices#162
fix: get screen density of android devices#162hiking93 wants to merge 3 commits intomobile-next:mainfrom
Conversation
|
thanks. we are gonna check this soon |
|
@hiking93 This looks neat and is a very good patch. Only change I'll ask is that instead of throwing an exception (which is very unlikely to happen in our scenario, the device is working properly), let's assume the dpi is 160 so there's no scaling. It'll make the code simpler and remove an exception that needs to be tested. What do you think, should we make this change? |
|
@hiking93 I just realized something. my emulated device has value of 560, which means 560/160=3.5 I just need to test this thoroughly to make sure taps on screenshot coordinates dont get broken (they're not stable regardless because of the way LLMs work). Need to make sure imagemagick supports scaling down by 3.5 factor. |
Sure, I've updated the implementation: 8e4267c |
I tried a Pixel 9 Pro Fold emulator:
|
To my knowledge, |
|
Hi @gmegidish, are there any updates on this? |
Image compression is using
screenSize.scaleas the resize factor:mobile-mcp/src/server.ts
Line 439 in 4c026a6
But
scaleis currently hard-coded to1for Android, so while the file size is reduced, the resolution of the image won't be scaled, causing #140.