android-7.0-nougat

Couldn't hear incoming voice in recorded calls in android 7?

萝らか妹 提交于 2019-11-30 07:22:34
I am developing an Android app for recording calls. This is my code snippet. recorder = new MediaRecorder(); recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT); recorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT); recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC); recorder.setOutputFile(file_path); This is working perfectly for devices below android 7, but when I use Android 7 mobile devices I can hear only outgoing voice but cannot hear incoming voice . Can anyone help me in fixing it? Use VOICE_COMMUNICATION as AudioSource as it is microphone audio source tuned for

Android Alarm Manager setExactAndAllowWhileIdle() not working in Android 7.0 Nougat in Doze mode

 ̄綄美尐妖づ 提交于 2019-11-30 06:40:30
I am trying to make an alarm fire in my app every 30 minutes using Alarm Manager's setExactAndAllowWhileIdle but it is not working! I test the functionality by issuing a push notification whenever I receive an alarm signal. The problem is: when the device enters doze mode after being idle for sometime, I no longer receive alarms. However, as soon as I turn On the screen, I receive a notification. My app needs accurate alarms that need to be delivered exactly on-time every 30 minutes! It can not afford to receive delayed alarms or dropped ones because the device is in Doze mode! I used the

Does Java 8 work on Android api 24 and above Or you can use in lower api?

冷暖自知 提交于 2019-11-30 01:50:34
问题 In android based on this page Java 8 Languages Features does android work only in api 24 and above or you can use in api lower than api 24 and if you can use this features, which smallest version of api in android support these features 回答1: Update: Beginning with Android Studio 2.4, the Jack compiler will be deprecated and Java 8 Support will be integrated in the default build chain. Some Java 8 features are available on any API level, some are still limited to API >= 24, see: https:/

Programmatically accept call in Nougat

橙三吉。 提交于 2019-11-30 00:15:32
From one year, I have been working over IOT product and the application attached was working fine. Now I am not able to accept call programmatically in higher versions of android. Feature is very important to product. Any help is highly appreciated. Before security patch update November 2016 , Runtime.getRunTime.exec("Command") was working fine to accept call programmatically. Runtime.getRuntime().exec("input keyevent " +Integer.toString(KeyEvent.KEYCODE_HEADSETHOOK)); How to make it possible in Nougat version of android. Looking for any sort of hack. I have opened a thread for the

Google Play Services on Genymotion emulator with Android 7

六眼飞鱼酱① 提交于 2019-11-29 22:10:55
问题 I have purchased Genymotion with the goal to have a simulation with Android 7.0 and Google Play. Android 7.0 runs fine on Genymotion, but I am not able to install Google Play on it. Google Play works fine for Android 6.0 and below - I was able to find the sources (Flashes) that must be installed additionally for using Google Play in Genymotion. Does someone know how to install Google Play on an Android 7.0 Device with Genymotion? 回答1: Updated answer Since Genymotion 2.10, you are able to

Change the system display size programatically Android N

…衆ロ難τιáo~ 提交于 2019-11-29 19:05:10
问题 Background : Android N comes with a feature to change system Display Size from settings, in addition to the previously present feature of changing Font Size . Change Display Size : Image Source: pcmag.com Question : If an app has android.permission.WRITE_SETTINGS permission to change the settings, there are ways to change the system font size programatically as mentioned in How to programmatically change font settings of Device: font style and font size?. However I couldn't find a way to

Android 7 Native Crash: libc.so tgkill

折月煮酒 提交于 2019-11-29 18:42:53
I'm seeing this native crash with the following stack trace. This happens in Android 7.0 & 7.1 only. Nothing new has been added to the app, which has been in production for a few years, but with more devices being updated to Nougat this crash happens frequently now and is becoming a nuisance. Any advice would be appreciated. native: pc 000000000007a6c4 /system/lib64/libc.so (tgkill+8) native: pc 0000000000077920 /system/lib64/libc.so (pthread_kill+64) native: pc 000000000002538c /system/lib64/libc.so (raise+24) native: pc 000000000001d24c /system/lib64/libc.so (abort+52) native: pc

Android 7 intent extras missing

守給你的承諾、 提交于 2019-11-29 14:21:04
问题 Does anyone know if there are any changes to how Android 7.0 (Nougat) handles intent extras compared to Android 6.0 (Lollipop)? Long story short: my app works as intended on all versions from 4.1(16) to 6.0(23) but crashes on android 7.0(24)! The app creates a pending intent with an intent to a custom broadcast receiver which has extras. However, on android 7 none of the extras are present in the intent received by the broadcast receiver. MainActivity.java Intent intent = new Intent(context,

How to get the current locale (API level 24)?

风流意气都作罢 提交于 2019-11-29 09:14:14
I was doing this way: context.getResources().getConfiguration().locale Configuration.locale is deprecated if target is 24. So I made this change: context.getResources().getConfiguration().getLocales().get(0) Now it says that it's only for minSdkVersion 24, so I cannot use it because my min target is lower. What's the right method? Check which version you're running on and fallback to the deprecated solution: Locale locale; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { locale = context.getResources().getConfiguration().getLocales().get(0); } else { locale = context.getResources()

Android Nougat: Why do checkboxes on Fragment have incomplete state when selected programmatically (but look fine on Lollipop)

天涯浪子 提交于 2019-11-29 06:19:23
Here is what my settings tab (Fragment) looks like before any selections are made: From the main Fragment the user can make a selection from the Spinner -- looks like the following (after the user has made a choice): When the user makes that selection, choices the user has previously chosen which are saved in the User Prefs are loaded and the appropriate checkboxes are selected. Checkboxes which were shown in first snapshot now look like the following: See, the items which now have associated checkboxes set to pink? Those items turn pink but the check is not shown for some reason on Nougat.