huawei

CameraCharacteristics SENSOR_INFO_EXPOSURE_TIME_RANGE gives wrong values

杀马特。学长 韩版系。学妹 提交于 2019-12-01 21:01:49
问题 I am using SENSOR_INFO_EXPOSURE_TIME_RANGE to calculate the range of supported exposure time. I tested this in Huawei P30 Pro and it seems like this API is giving wrong values(10000 - 1000000000). But when I use the built in camera app's pro mode, there I can set exposure value to 30s which is really larger than what is provided by the API. Can anyone help me with this? How to get correct values for the range of supported exposure durations? 来源: https://stackoverflow.com/questions/56817053

Strange allow/deny question on Huawei 5.1 phone when showing notification

走远了吗. 提交于 2019-12-01 19:54:42
So it turns out that Huawei phones with 5.1 can't display MediaStyle notifications so while fixing that, I made a very simple notification test and I get a strange question asking Allow App Name to push messages to the notification panel . I don't use push in any way, in fact the screenshot below is for an app that all it does is show a sample notification, nothing else. How can I make it not show that? This is the code: Notification notification = new Notification.Builder(getApplicationContext()) .setSmallIcon(R.drawable.ic_launcher_background) .setContentTitle("Track title") .setContentText(

How to keep a Service alive?

烂漫一生 提交于 2019-12-01 09:42:41
How Whatsapp service keep working in background in huawei phones ? I removed whatsapp of protected apps but Whatsapp service not closed in screen off time. I'm writing critical app that need to run every time but my service killed in screen off. I want to write service like Whatsapp or AirDroid service anyone can explain about that ? I mean how to write service that specially not close by screen off in HUAWEI phones This is my service code AppLifeService public class AppLifeService extends Service { @Override public IBinder onBind(Intent intent) { return null; } @Override public void onCreate(

Battery optimizations (wakelocks) on Huawei EMUI 4.0+

送分小仙女□ 提交于 2019-11-30 20:21:29
Good day, situation: I'm developing Android application that serve as sport tracker/navigation app - so it require permanent connection to GPS and also permanent awake device. Recording is done every second. Current solution working for years is thanks to wakelocks that keep device awake. Doze mode in Android 6.0+ complicate situation, but it is not this case. On Huawei device is probably different type of optimization. Here is part of log: 10-10 10:33:18.462 1014-384 D/PFW.HwPFWAppWakeLockPolicy: getUidWakeLock uid: 10097 wakelock >= 10 mins 10-10 10:33:18.543 1014-384 D/PFW

Battery optimizations (wakelocks) on Huawei EMUI 4.0+

 ̄綄美尐妖づ 提交于 2019-11-30 16:57:19
问题 Good day, situation: I'm developing Android application that serve as sport tracker/navigation app - so it require permanent connection to GPS and also permanent awake device. Recording is done every second. Current solution working for years is thanks to wakelocks that keep device awake. Doze mode in Android 6.0+ complicate situation, but it is not this case. On Huawei device is probably different type of optimization. Here is part of log: 10-10 10:33:18.462 1014-384 D/PFW

Unable to start android app due to LogCollectManager.getUserType() error

为君一笑 提交于 2019-11-30 13:52:37
When I try to run my application on Huawei P9 I’m getting the error Attempt to invoke virtual method 'int com.huawei.lcagent.client.LogCollectManager.getUserType()' on a null object reference Is there any way to debug this because application works on other Android 6 phones (Samsung, HTC...). APP: https://play.google.com/store/apps/details?id=com.morescreens.mkt LOG: 07-04 10:42:56.045: W/System.err(955): java.lang.NullPointerException: Attempt to invoke virtual method 'int com.huawei.lcagent.client.LogCollectManager.getUserType()' on a null object reference 07-04 10:42:56.046: W/System.err

Huawei Watch 2 NFC FEATURE not available?. Android Wear 2.0

好久不见. 提交于 2019-11-29 07:58:30
In short: On the Huawei Watch 2 it seems like NFC is available and enabled but NFC_FEAUTURE is not, hence nfc is not working properly. Trying to develop the ability to simply read and display NFC tags on the Huawei Watch 2 raises some difficulties: mNfcAdapter.enableForegroundDispatch(this,nfcPendingIntent, nfcIntentFilter, null); raises the error java.lang.UnsupportedOperationException That implies the FEATURE_NFC is not available. In MainActivity onCreate(): mNfcAdapter = NfcAdapter.getDefaultAdapter(this); //NfcAdapter mNfcAdapter if (mNfcAdapter != null) { // Check if device supports NFC

sendMessage doesn't work properly (Wearable)

风流意气都作罢 提交于 2019-11-28 14:28:28
If I'm sending some bytes using sendMessage from Huawei p9 (Android 6.0) into Android Wear (Sony) the messages are not delivered if the screen of handheld device is turned off. The notifications inside wearable are not updated until the screen in the phone is turned on (in 1 minute)! Will setUrgent help? I already added the application in "list of granded applications" that can work while the screen is off. The application already works in WAKELOCK state. Is it a feature for all Android 6.0 and newer devices? IS IT POSSIBLE TO AVOID THIS? ANY CLUES? I've waste 3 days to find the solution To

Huawei Watch 2 NFC FEATURE not available?. Android Wear 2.0

左心房为你撑大大i 提交于 2019-11-28 01:27:06
问题 In short: On the Huawei Watch 2 it seems like NFC is available and enabled but NFC_FEAUTURE is not, hence nfc is not working properly. Trying to develop the ability to simply read and display NFC tags on the Huawei Watch 2 raises some difficulties: mNfcAdapter.enableForegroundDispatch(this,nfcPendingIntent, nfcIntentFilter, null); raises the error java.lang.UnsupportedOperationException That implies the FEATURE_NFC is not available. In MainActivity onCreate(): mNfcAdapter = NfcAdapter

Sending and receiving SMS by command line with Huawei E3131 and HiLink on a debian system

被刻印的时光 ゝ 提交于 2019-11-27 20:35:56
问题 I long time searched the internet for a guide how to send sms by command line with Huawei E3131 and HiLink on a debian based linux system. All of them not worked. It seems, that there was an update on the software. HiLink shows the following versions to me: Device-Name: E3131 Hardware-Version: CU1E3131IM Software-Version: 22.521.23.00.00 Web-Frontend-Version: 17.100.08.00.03 Following the question: How to send / receive sms by command line on a debian based linux system with E3131? There is a