-
Notifications
You must be signed in to change notification settings - Fork 469
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
DisplayAPI #595
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
you don't need an API.... Get screen resolutionscreen_size=$(dumpsys window | grep mUnrestrictedScreen | cut -d'=' -f2 | cut -d' ' -f1) |
if you want a program here is one in kootlin ''' |
get_screen_res.py def get_screen_resolution():
print(f"Screen resolution: {get_screen_resolution()}") |
Android 12.0 That command requires |
you are correct I was working from my rooted device none of my commands work non root I am seeing now.. I will attempt to find a work around but since dumpsys is at a level termux doesn't access without root I'm not seeing a straightforward or easy way to do this... possibly by implementing something with x11 where it tries to determine screen size before providing a gui instead just display the values... I'll play around with it al little bit later... there should be a way to display screen sizes and frame rates |
pkg i android-tools but the pairing+connecting process is a big pain. The pairing-port and the connection-port are different, and multi-window must be used for pairing.
That's an interesting approach! I have no idea how to use the x11 API, but I guess it'll work |
none of the approaches you guys mention does work in non-rooted devices, even dumpsys isn't available without root. |
Which Android version? Perhaps Google hardened the system again.
|
I have added a pull request to fix this issue. Would you like to test the packages from GitHub Actions artifacts of that pull request? Link https://github.com/termux/termux-api/actions/runs/10864561131 |
Feature description
API that would provide info about the display like screen size.
Reference implementation
Have you checked if the feature is accessible through the Android API?
Do you know of other open-source apps that has a similar feature as the one you want? (Provide links)
Output from the kaltura app:
The text was updated successfully, but these errors were encountered: