screen

Why cannot I read data from /dev/graphics/fb0?

℡╲_俬逩灬. 提交于 2019-12-07 21:34:16
问题 I am using the emulator. So definitely I have the root permission. I use command: adb pull /dev/graphics/fb0 d:/a and then use my program to read this file and generate a bmp. It is successful. But when I use pure java code to do this: Process process = Runtime.getRuntime().exec("su -c cat /dev/graphics/fb0"); process.waitFor(); InputStream is = process.getInputStream(); is.read(buffer, 0, width*height*2); The buffer can not get the correct data. All the data is 0, while the correct is 0xFF

Simulate smaller screen on a Tablet?

让人想犯罪 __ 提交于 2019-12-07 15:50:25
问题 I've developed an app using my Android tablet as a testing tool. I want to test it on smaller screens and I find the emulator damn slow. Is there a way I can configure my tablet to simulate a small screen - perhaps darken everything around and only display a small square? Like how in Windows we can change the display resolution in the settings screen...asking for too much? 回答1: ya it is possible.. if you done your design in the xml layout give the give root tag height and width as fix as your

Android / Java: Show GUI on “off-screen” (Always-On Display…)

回眸只為那壹抹淺笑 提交于 2019-12-07 15:29:24
问题 I saw new Android devices coming out, that show things (clock etc.) once the display "turns off". That feature is called an Always-On Display, and since my Samsung Galaxy S6 edge already features an AMOLED screen, and a night-clock, I believe there is a way, to make it show something, when the display is "turned off". Is there a way using Java on Android, to display something, once display is meant to turn off? (Like just a normal GUI, I could do the rest then.) Like, to tell your app, to

Qt: printscreen key in keyPressEvent

本秂侑毒 提交于 2019-12-07 12:16:12
问题 When I pressing keys, this code works, but not with Print Screen key. void KeyHooker::keyPressEvent(QKeyEvent *event) { qDebug() << event->key(); } Q. How can I grab Print Screen key? 回答1: The problem is that the OS grabs this before it reaches your code: http://qt-project.org/forums/viewthread/18610/#90901 You'll need to use Microsoft's LowLevelKeyboardProc in your code to do this: http://msdn.microsoft.com/en-us/library/ms644985%28v=VS.85%29.aspx 来源: https://stackoverflow.com/questions

Change the background color of dosbox console when executing a tasm program

眉间皱痕 提交于 2019-12-07 11:03:57
问题 I am trying to display x in the center of the screen and then change the background color of the console to blue. I have the following code that accomplishes everything except for changing the background color: TITLE screen1.ASM .MODEL SMALL .STACK 0100h .DATA .CODE start: MOV AX,@DATA MOV DS,AX MOV AX,0600h MOV BH,07h MOV CX,0000h MOV DX,184Fh INT 10h MOV AH,02h MOV BH,00h MOV DH,0Ch MOV DL,28h INT 10h MOV AH,02h MOV DL,'x' INT 21h MOV AX,4C00h INT 21h END start The code clears the screen,

Start activity when screen is off

♀尐吖头ヾ 提交于 2019-12-07 10:14:08
问题 I have set up an AlarmManager to start up an activity. This activity also plays a sound, similar to an alarm app or an incoming call. It works ok if the screen is on, even if the screen is locked. If the screen is off, it doesn't work at all. I tried using the following as the first thing in onCreate getWindow().setFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON, WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON); If the screenlock is not enabled, this turns on the screen and I can see my

Publishing multiple versions of one app on Google Market

删除回忆录丶 提交于 2019-12-07 08:58:46
问题 I have an Android app that I would like to display high quality images with. However there are many different screen sizes and ratios. I know there are filters to show apps in Market only for devices with small/medium/large screens. If I put images of both sizes in 1 app it will double the size of the app, right? Is it a good practice to make multiple versions for different screen sizes? I would like to make 1 app in 3 versions for such devices: medium screen mdpi medium screen hdpi + large

how to detect screen mirroring

被刻印的时光 ゝ 提交于 2019-12-07 08:34:19
问题 I have been wondering if there is any way in the android API (or any other lib/framework) that can help me to detect if my device screen is mirrored using WiDi,Miracast or MHL or basically any other technique for mirroring your screen. Br, Inx 回答1: You may navigate through the list of all device display and get flags on each for finding one with, maybe, VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR ? Not sure but a few trys should allow you to figure out which ones will do it. cf: DisplayManager and

how to prevent screen record in ios11

ぃ、小莉子 提交于 2019-12-07 08:20:17
问题 To some reasons, our APP dont't want people record screen, but in ios11 a new feature can let user record there iphone screen, so is there an API or notification indicate me user is recording now thank u very much 回答1: You can detect if the screen is being recorded with: UIScreen.main.isCaptured // True if this screen is being captured (e.g. recorded, AirPlayed, mirrored, etc.) You can't prevent it using project settings, but you could use a modal or something to request the user to disable

Android activity won't fill WVGA screen

瘦欲@ 提交于 2019-12-07 07:56:49
问题 I'm developing an Activity with a simple LinearLayout with a button. When I try the activity on my hardware (WVGA 480x800 screen) the activity only fills the standard size (480x320) while the OS itself fills the whole screen. What could be the issue. Thanks, <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#FFF