sony-xperia

Store video files on SD card in Android 5

折月煮酒 提交于 2019-12-06 12:24:58
问题 I'm recording video with the aid of android.media.MediaRecorder class, which accepts path string for output file (MediaRecorder.setOutputFile(String)), though there is a version of the method which accepts FileDescriptor . I need to store huge video files, so I want to use SD card. In order to get path to relevant directory I use Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM) . It turns out that resulting path is for the “emulated” storage ( /sdcard/… ) instead of

Android Studio: Android Device Monitor not showing my device

早过忘川 提交于 2019-12-05 00:54:04
My real device is Sony Xperia c6502 with android version 4.3 I'm sure I connect it to my computer and I turn Developer options/ USB debugging on In SDK manager, Google USB driver is already installed. I downloaded Xperia Z Driver from this page: http://developer.sonymobile.com/downloads/drivers/ But I don't know how to use it No PTP mode option in USB Connectivity in my phone My device is not shown in Android Device Monitor and thus I can't run app test on my phone. How to let my Android Studio catch my phone? Some possible solutions: On your notification bar, expand it and click the

sendWakefulWork not always called with cwac-wakeful-1.1.0

落爺英雄遲暮 提交于 2019-12-02 03:48:03
问题 I've got a problem for a long time now and I discovered cwac-wakeful, which could solve all my problems. I thought... :'( In short, for solving the problem, I've implemented a most simple app, which schedules alarm every 60 seconds and logs everytime. Here's my code : MainActivity : package com.par.hasard.mysimpleapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; public class MainActivity extends

MediaScannerConnection#scanFile converts directories into files when accessing them with USB-MTP on Android 5 Lollipop

久未见 提交于 2019-11-29 10:31:53
Changes like renaming a file triggered by an app only appear to the USB-MTP interface after reboot of the Android device or after you registered the new file at the MediaScanner them like this (see Trigger mediascanner on specific path (folder), how to? ): file.renameTo(newFile); MediaScannerConnection.scanFile(context, new String[] { newFile.getAbsolutePath() }, null, null); USB-MTP is used to access the storage of an android device via USB. E.g. with the Windows Explorer. However, with the Sony XPERIA Tablet Z (SGP321) under Android 5.0.2 (Build 10.6.A.0.454) folders supplied in newFile will

Cannot detect Sony Xperia in Eclipse

六月ゝ 毕业季﹏ 提交于 2019-11-28 11:53:20
I am totally new at testing apps on devices, especially the Sony Xperia. I am testing apps using the Android emulator, but I have now a Sony Xperia. First I have connected the device to the laptop via USB. But the laptop couldn't detect my phone. Is a driver necessary for Eclipse to detect the phone? Download the correct driver for your phone, make sure your phone has enabled USB debugging and then connect it to proceed with the install. Download drivers from: http://developer.sonymobile.com/downloads/drivers/ Damir Even though this question was posted long time ago, I didn't find 100% correct

MediaScannerConnection#scanFile converts directories into files when accessing them with USB-MTP on Android 5 Lollipop

流过昼夜 提交于 2019-11-28 03:35:40
问题 Changes like renaming a file triggered by an app only appear to the USB-MTP interface after reboot of the Android device or after you registered the new file at the MediaScanner them like this (see Trigger mediascanner on specific path (folder), how to?): file.renameTo(newFile); MediaScannerConnection.scanFile(context, new String[] { newFile.getAbsolutePath() }, null, null); USB-MTP is used to access the storage of an android device via USB. E.g. with the Windows Explorer. However, with the

Cannot detect Sony Xperia in Eclipse

雨燕双飞 提交于 2019-11-27 06:34:29
问题 I am totally new at testing apps on devices, especially the Sony Xperia. I am testing apps using the Android emulator, but I have now a Sony Xperia. First I have connected the device to the laptop via USB. But the laptop couldn't detect my phone. Is a driver necessary for Eclipse to detect the phone? 回答1: Download the correct driver for your phone, make sure your phone has enabled USB debugging and then connect it to proceed with the install. Download drivers from: http://developer.sonymobile