19 questions
0
votes
0
answers
20
views
How does the "DeviceProductInfo" populates various fields?
DeviceProductInfo class holds the information about the display devices connected to the Android system.
Where is the constructor call to DeviceProductInfo done on an Android device?
0
votes
1
answer
192
views
Facing issue While making dynamic views using Relative layout
I'm using relative layout for building the views/grid dynamically...
ex: if there is 1 user then,
[grid with users 1]1
if there is 2 user then ,
[grid with users 2]2
if there is 3 user then,
[grid ...
0
votes
0
answers
178
views
How to control secondary screen with my app on primary screen in Android?
I am developing an application to control the secondary display using the buttons in my application. My app will run on the primary screen and I want to send the navigation and selection key events to ...
6
votes
1
answer
4k
views
How to detect screen mirroring in android when my mobile screen is shared using teams presentation?
For enhanced security of My Android App, I need to detect the screen mirrioring. I have implemented this below source code:
var display : DisplayManager = getSystemService(DISPLAY_SERVICE) as ...
0
votes
0
answers
109
views
How to kill or restart Activity in second display?
My app has two button, first button will show a new Activity on second screen, and second button will update that Activity with some data.
But once the second Activity started, I cannot startActivity ...
2
votes
3
answers
987
views
How to read current screen orientation on Android?
I would like to read current screen orientation on Android using Jetpack Compose.
I already tried following in a @Composable:
val o = LocalActivity.current.requestedOrientation
val o = LocalContext....
0
votes
0
answers
249
views
how to change display colour of android device in background?
I want to add blue light filter in my app but i dont know how can i implement that i am new in android develpment.
i want to change the colour of screen using seekbar.
i already tried to find a good ...
1
vote
0
answers
963
views
How to switch the secondary display back to the mirror mode after start an Activity
I configured a secondary display for my android device. By default, the secondary display will mirror the content of the main diaplsy.
Then I use DisplayManager.getDisplays(DisplayManager....
0
votes
0
answers
632
views
Mirror Android Secondary Display (Presentation API)
I develop an application that presents content to an external display using Presentation.
Now I want to mirror that to the phone screen or let say Twilio.
One solution is to capture views from within ...
1
vote
0
answers
1k
views
How to read display resolution thorugh HDMI? DisplayCompat fine on AndroidTV directly, but not on an AndroidTV Stick
Since AndroidTV scales down the UI for UHD/4K resolution TV devices, DisplayMetrics always return 1920x1080 for these higher resolution devices.
One workaround is DisplayCompat:
On many Android TV ...
1
vote
1
answer
2k
views
How to read the real native physical display resolution on Android TV?
I am trying to read the real physical display resolution on my Android TV device. I have two testing TVs:
FullHD with 1920 x 1080 resolution
UHD with 3840 x 2160 resolution
and 1 Android TV HDMI ...
0
votes
2
answers
620
views
How can you display screen size in Android Studio(simple way)?
I'm trying to display the screen width and height to logcat.
I have seen this stack overflow post: Getting screen width on API Level 30 (Android 11): getDefaultDisplay() and getMetrics() are now ...
1
vote
0
answers
44
views
From drawable canvas position to WindowManager matrix or Display matrix in Android?
I'm trying to make a blinker for my calculator app. I have created the blinker using a view that fades in and out. I can position the blinker where it needs to be in some device densities but not in ...
0
votes
0
answers
278
views
how can I sync second screen and make it clickable?
I am making an app for a dual display device for 1:1, face to face consulting.
Basically, the secondary screen is not clickable. So, what I need to do is implementing a presentation.
But some ...
1
vote
0
answers
142
views
How to divide activity view into two display/screen
I am working on android automotive,
I need to divide activity view into two parts like half view in primary display and another half view in RSE(Rear-Seat) display.
May i know how to do?
which ...
6
votes
0
answers
1k
views
Changing primary display resolution programmatically
I'm trying to change the display resolution of my primary display on Android 8.1. I get an event from the kernel (based on EDID) that tells me I need to change mode.
I then basically do:
sp<...
1
vote
0
answers
606
views
How to specify the layerStack for a VirtualDisplay created by DisplayManager?
According to android's official document:
virtual displays
Virtual displays may share the same set of layers as the main display (the layer stack) or have their own set.
It is known that ...
14
votes
0
answers
900
views
How Can We Get an Activity Shown Using setLaunchDisplayId() to be Landscape?
In this sample project, my MainActivity has code to launch a separate activity on an external display, using setLaunchDisplayId() on ActivityOptions:
class MainActivity : AppCompatActivity() {
...
3
votes
0
answers
393
views
How to display other app in surface view?
I would like to mirror e.g. Waze in my app SurfaceView:
Intent intent = getPackageManager().getLaunchIntentForPackage("com.waze"); //"com.waze"
Bundle opts = ActivityOptions
....