nexus-5

Working Directory : null environment when running Process.Builder on android

蓝咒 提交于 2020-01-11 12:44:28
问题 I am using two phones, Galaxy Nexus(JellyBean) and Nexus 5(KitKat). I am trying to execute a script which exists in /data/folder/scripts/run.sh I use Process.Builder to build the command. This command is built by getting Environment.getDataDirectory().toString() + "/folder/scripts/run.sh" There are no issues running this on the Galaxy Nexus but when I run it on the Nexus 5, I catch an exception when I run the process.start(). The output which I get contains: Error running exec(). Command: [

Android camera saves photo without ExIf

可紊 提交于 2020-01-04 19:06:56
问题 I want to take photo using MediaStore.ACTION_IMAGE_CAPTURE intent, and save with MediaStore.EXTRA_OUTPUT. My code is same as this link: http://developer.android.com/training/camera/photobasics.html However, saved photo has no exif. It has only size information. Here is my log: TAG_APERTURE: null TAG_DATETIME: null TAG_EXPOSURE_TIME: null TAG_FLASH: null TAG_FOCAL_LENGTH: null TAG_GPS_ALTITUDE: null TAG_GPS_ALTITUDE_REF: null TAG_GPS_DATESTAMP: null TAG_GPS_LATITUDE: null TAG_GPS_LATITUDE_REF:

MediaPlayer.prepare() throws IllegalStateException on Android L

有些话、适合烂在心里 提交于 2020-01-02 05:12:14
问题 I have code that plays mp3 file from assets directory: MediaPlayer mediaPlayer = new MediaPlayer(); descriptor = context.getAssets().openFd("beep.mp3"); mediaPlayer.setDataSource(descriptor.getFileDescriptor(), descriptor.getStartOffset(), descriptor.getLength()); mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC); mediaPlayer.setVolume(soundLevel, soundLevel); descriptor.close(); mediaPlayer.setLooping(false); mediaPlayer.prepare(); mediaPlayer.start(); This code was working fine on

DDMS Debugging: Android app (I'm developing) causes device (ONLY Nexus 5) to hang and must restart when using ZXING and Dialog

痴心易碎 提交于 2019-12-25 05:17:10
问题 I'm developing an android app. I'm using ZXING fragment open source barcode scanning. I have an option to manually input the barcode. So when the user press the manual input button I open a dialog with edit text. Before the dialog appears I pause the camera and scanning. This causes the device to hang, the top bar multiples it self adding it self more and more times until it fills the display. The only way to get out of this situation is to restart the device. This bug only reproduce in Nexus

Overlap background (and overlap image) on Nexus 5

℡╲_俬逩灬. 提交于 2019-12-25 01:55:27
问题 This is the Overlap Background (or Overlap Image) problem which I only get it on Nexus 5 Emulator while testing. I have not tested on Nexus 5 Device, but I think the Emulator should show quite correct. This is my coding indicated how to support multiple screen, it works for the others device, not for Nexus 5 emulator . Followed the answer in here also but it not works. In my application, I used Fragment to transfer among pages . It happened when I transfer from first page (red words in image)

LG Nexus 5X can't see in Android Studio on Windows 10

心已入冬 提交于 2019-12-24 16:34:10
问题 I have a LG Nexus 5x smartphone, I would like to use to on device debugging in Android Studio on my Windows 10 Computer. I turn on the dubugger options on my phone, but the Android Studio can't see that. From where can I downlod the USB driver, that fixs my problem? 回答1: Install Google USB Drivers on SDK Tools Enable Debugging Mode on Developer Settings. Go to Device Manager and check drivers status. (Probably you can see warning icon on ADB Interface Driver.) Select ADB Interface driver and

Android 4.4 won't allow me to save a picture when captured using adb commands

大憨熊 提交于 2019-12-22 06:52:52
问题 My objective is to automate the process of capturing and saving a picture, with both front and back facing cameras. I am using a Nexus 5 running Android version 4.4.2 and I have not rooted it. I use the following commands to open the front and rear facing camera respectively: >adb shell am start -a android.media.action.IMAGE_CAPTURE --ei android.intent.extras.CAMERA_FACING 1 >adb shell am start -a android.media.action.IMAGE_CAPTURE --ei android.intent.extras.CAMERA_FACING 0 (I found these

Flash Torch on Google Nexus 5

北慕城南 提交于 2019-12-21 19:56:15
问题 after reading all the posts of the other users with the same problem I was able to create a simple working app for turning on flash light on my Nexus 5, this is the "OnCreate()" method: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); Camera mCamera; SurfaceView preview; mCamera = Camera.open(); Parameters params = mCamera.getParameters(); params.setFlashMode(Parameters.FLASH_MODE_TORCH); mCamera

AOSP 6.0 Build for hammerhead - proprietary binaries

倖福魔咒の 提交于 2019-12-19 10:16:09
问题 I just built AOSP 6.0 for hammerhead and attempted to flash it. My phone froze at the Google logo and refused to boot. I'm assuming I need to use the proprietary binaries found here https://developers.google.com/android/nexus/drivers How would I extract these and put them in to my build? Thanks. 回答1: Be certain to download the Nexus 5 binaries that match the version of AOSP that you're building. For example, if you're building the most recent version of AOSP, when you initialized your repo

VP8 Encoding Nexus 5 returns empty/0-Frames

依然范特西╮ 提交于 2019-12-18 07:18:12
问题 I'm trying to encode my camera feed to VP8. The problem is: when I get the frame from the output buffer, the byte array is always different size but all entries are 0. Here's the code where I grab the frame and print it: while (true) { try { encoderIndex = mEncoder.dequeueOutputBuffer(encoderOutputInfo, timeOut); } catch (Exception e) { e.printStackTrace(); } switch (encoderIndex) { case MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED: // something break; case MediaCodec.INFO_OUTPUT_FORMAT_CHANGED: //