nexus-4

Why does the main activity restart again after its called intent finished (Android 4.2.2)?

﹥>﹥吖頭↗ 提交于 2020-01-05 07:57:12
问题 The application works well in Android 2.3.5 But it does not work as desired in Nexus 4 (Android 4.2.2). The application is: In the onCreate of main activity, it calls another activity through intent. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final Intent launchIntent = new Intent(MainActivity.this, AndroidVideoCapture.class); launchIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP|Intent.FLAG_ACTIVITY_SINGLE_TOP)

Extreme camera lag on Nexus 4

拈花ヽ惹草 提交于 2019-12-23 10:26:11
问题 Using the following very simple camera preview activity (from a google example found here), the Nexus 4 camera is noticeably slower that the device's standard camera application: public class LiveCameraActivity extends Activity implements TextureView.SurfaceTextureListener { private Camera mCamera; private TextureView mTextureView; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mTextureView = new TextureView(this); mTextureView

setPreviewFpsRange not working despite values being within getPreviewFpsRange's range

限于喜欢 提交于 2019-12-18 13:37:47
问题 This simple code: Camera.Parameters params = currentCamera.getParameters(); params.setPreviewFpsRange( 10000, 15000 ); currentCamera.setParameters( params ); does not work on my Nexus 4 (or my Motorola Atrix), despite the allowed values being between in the allowed range of 5000 to 120000. When I try to use any min or max values different than 5000 and 120000, respectively, I get: setPreviewFpsRange(const android::QCameraParameters&): error: FPS range value not supported which is silly. Also,

getSupportedPictureSize() returns a value which is not actually supported by Nexus4

…衆ロ難τιáo~ 提交于 2019-12-18 01:20:27
问题 I have extended a SurfaceView for displaying the camera feed for a very simple camera application. To find the optimal preview size for each device, I used this sample code which is used in almost all the open source camera apps I have seen: List<Camera.Size> sizes = parameters.getSupportedPreviewSizes(); double minDiff = Double.MAX_VALUE; for (Camera.Size size : sizes) { if (Math.abs(size.width - width) < minDiff) { screenWidth = size.width; screenHeight = size.height; minDiff = Math.abs

Android Studio is installing old apk on device

好久不见. 提交于 2019-12-17 17:56:10
问题 I am developing an Android app using Android Studio (0.89 Build #AI-135.1404660, Built on Sept 3,2014) using both emulator and Nexus 4 device. I had the same issue with a version prior to that. The problem is that after I changed my code and resource files, I still get the old apk installed on the device or emulator. What do I need to do to get it to run current code? Is it a building config? Is it a known issue with Android Studio? Or with a Nexus 4 device? This is the second time it has

Do ATAGS get overwritten by the kernel?

隐身守侯 提交于 2019-12-11 12:19:24
问题 I have read that the ATAGS (used on arm processors to provide the Linux kernel with information such as the memory layout) are loaded to [SystemRAM base]+0x100. On the Nexus 4 the SystemRAM base is at 0x8020000. I also know that the kernel is loaded to 0x80208000. I have verified that is is the case by dumping the portion of memory using the command: dd if=/dev/mem bs=1 skip=$((0x80208000)) count=$((0x200)) of=kimage_hdr The header output file matches the expected header of an uncompressed

Bad performance when scrolling on Android 4.3 with Nexus 10

妖精的绣舞 提交于 2019-12-07 14:44:18
问题 My app, which has a list view with some scrolling, is performing very well (scrolling at 60fps) on all phones I have tested it with, Nexus One, Nexus 4 and Galaxy S3/4. But the performance is terrible on the Nexus 10, probably around 15fps or so. I have analysed it to be the Execute part of the graphics pipeline. I have attached a screenshot of a Nexus 10 and a Nexus 4, which are running Android 4.3 and no funny stuff. The UI is even drawn at the same size, with approx the same amount of

Nexus 4 camera flash doesn't fire when focus mode is set to continuous-picture

和自甴很熟 提交于 2019-12-07 05:02:18
问题 I've encountered a strange issue, specifically on a Nexus 4 (though it may exist on other devices), where the camera flash won't fire when the focus mode is set to FOCUS_MODE_CONTINUOUS_PICTURE . The same code works fine on a Galaxy Nexus running the same version of Android (4.2.1). Has anyone encountered this problem before? I can fix the issue by simply switching the focus mode to FOCUS_MODE_AUTO . I'm hoping there is an easy work around for this issue, since the continuous picture focus

Any idea why adb does not recognize my nexus 4 on mac

梦想与她 提交于 2019-12-07 03:34:03
问题 I can't figure out why my nexus 4 is absent from the list of adb devices. I've tried the following $ adb kill-server; adb devices $ echo 0x18d1 >> ~/.android/adb_usb.ini $ adb kill-server; adb devices Changed usb computer connection type to PTP instead of MTP Restarted the phone etc Adb is on my path. Nexus 4 shows up when I view System Information. I've tried asking on xda devs but no luck. Any suggestions on what I can try? Thanks in advance 回答1: Very weird, I switched to a cheap chinese

Adb shell getevent method returns twice the value for X and Y on Nexus 4

佐手、 提交于 2019-12-06 06:36:59
问题 I am currently trying to generate a complex gesture via the sendevent command of adb shell. In order to replay a gesture, I recorded the events via the getevent method of adb. Here is a sample of a simple tap on the bottom right of my Nexus 4 screen. /dev/input/event2: 0003 0039 00000059 /dev/input/event2: 0003 0035 000005ff /dev/input/event2: 0003 0036 000008e6 /dev/input/event2: 0003 003a 0000002d /dev/input/event2: 0000 0000 00000000 /dev/input/event2: 0003 0039 ffffffff /dev/input/event2: