android-4.4-kitkat

How to handle drag-to-select of sub-menu items on Kitkat?

好久不见. 提交于 2019-12-06 08:20:14
Background I have an app which has sub menus in the action bar, for selecting the sorting type. It works really well if you just tap the action items. Here's how a submenu looks like on the actionBar: The code To make it easy to understand what I did, here's a short, simple version of just the sub menu part: <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="com.example.test.MainActivity" > <item android:icon="@drawable/ic_action_collections_sort_by_size_holo_dark"

How to check if gps i turned on or not programmatically in android version 4.4 and above? [duplicate]

荒凉一梦 提交于 2019-12-06 07:09:38
问题 This question already has answers here : How do I get the current GPS location programmatically in Android? (22 answers) Closed 2 years ago . I have tried searching for answers online but they seemed to work only for android versions 4.0 and below 回答1: public static boolean isLocationEnabled(Context context) { int locationMode = 0; String locationProviders; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT){ try { locationMode = Settings.Secure.getInt(context.getContentResolver(),

android-support-v7-appcombat jar mismatch and app crashing after Android 4.4 SDK update

断了今生、忘了曾经 提交于 2019-12-06 04:57:42
问题 I have been successfully using android-support-v7-appcompat library for last few months in my app to support action bar in older devices. Recently I have downloaded the Android 4.4(kitkat) updates with system image and SDK platform from the SDK Manager. I also added targetSdkVersion to "19" in manifest file. But my project was showing error as 'android-support-v7-appcompat jar mismatch. Fix your dependaecies.' Then I added the jar from /extras/android/support/.... to the project as an

How to make an app not to be downloaded by Android KitKat users?

随声附和 提交于 2019-12-06 04:45:56
问题 I have developed an application in Android. It works for all users except KitKat users. When I upload this app in Play Store, I want the KitKat users not to be able to download this app. Even when I was executing this app in my system, it was detecting KitKat mobiles. I have tried using android:maxSdkVersion="18" in Android manifest file, but it was not possible. Is there any way to do it? 回答1: It depends on what exactly you want. According to the documentation for the deprecated

What is the concept behind “Lost RAM” which appears in Dumpsys meminfo?

匆匆过客 提交于 2019-12-06 04:36:02
问题 As I have mentioned in question, Lost RAM appears in Dumpsys meminfo . What is the concept behind “Lost RAM” which appears in Dumpsys meminfo? What is its significance in Kitkat. How it can be reclaimed and used? Sample dumpsys showing "Lost RAM". Total RAM: 998096 kB Free RAM: 574945 kB (145869 cached pss + 393200 cached + 35876 free) Used RAM: 392334 kB (240642 used pss + 107196 buffers + 3856 shmem + 40640 slab) Lost RAM: 30817 kB Tuning: 64 (large 384), oom 122880 kB, restore limit 40960

Failure code -32 MediaPlayer (Android 4.4)

假如想象 提交于 2019-12-06 01:12:33
Hello guys my app returns failure code -32 when trying to play a video in Android 4.4 (KitKat). I can't actually find any information about this errorcode perhaps any of you knows more about this issue? 11-04 13:43:08.966: E/AndroidRuntime(26482): java.lang.RuntimeException: failure code: -32 11-04 13:43:08.966: E/AndroidRuntime(26482): at android.media.MediaPlayer.invoke(MediaPlayer.java:664) 11-04 13:43:08.966: E/AndroidRuntime(26482): at android.media.MediaPlayer.getInbandTrackInfo(MediaPlayer.java:1692) 11-04 13:43:08.966: E/AndroidRuntime(26482): at android.media.MediaPlayer

SSL certificate not verified Error on Android kitkat version

一世执手 提交于 2019-12-05 20:42:01
I have SSL verified website, which is successfully verified by third party vendor. And it working fine without any warning/errors in other OS like windows, chrome browser When I am trying to open it from mobile with KitKat version It show below error code Error Code : NET:: ERR_CERT_AUTHORITY_INVALID I had same error: app requesting https working fine on all platforms and versions except old android 4.4 - problem was conflicting Comodo root certificates on IIS server machine. The main issue is that i had two certificates chains on remote: a. Comodo -> Comodo -> your site certificate b.

How to identify app when it goes in background in Kitkat (4.4)?

∥☆過路亽.° 提交于 2019-12-05 20:36:27
I am trying to detect app when it goes in background. Everything works perfect but in New Android Version 4.4(Kitkat) its not working. I am unable to find out what's the issue with Kitkat . It always returns false . public static boolean inBackground(final Context context) { ActivityManager am = (ActivityManager) context .getSystemService(Context.ACTIVITY_SERVICE); List<RunningTaskInfo> tasks = am.getRunningTasks(1); if (!tasks.isEmpty()) { ComponentName topActivity = tasks.get(0).topActivity; if (!topActivity.getPackageName().equals(context.getPackageName())) { return true; } } return false;

Android delete sms messages in sent box

删除回忆录丶 提交于 2019-12-05 20:16:59
Before Android KitKat, it was possible to send SMS messages without them being stored in the sent folder of the installed messaging apps on the device, using this method: SmsManager sms = SmsManager.getDefault(); sms.sendTextMessage(phonenumber, null, message, null, null); But how is it done post-KitKat? Do you have to delete the messages that are sent out by your app? And if so, how is it done correctly? Mike M. Starting with KitKat, any app with the SEND_SMS permission is able to send messages with the standard SmsManager methods, and the system will handle writing the messages to the

Host Card Emulation on Nexus 7 2012

邮差的信 提交于 2019-12-05 19:12:42
I'm trying to test out the new Host Card Emulation features in KitKat, but the only KitKat device with NFC that I have at the moment is a 2012 Nexus 7. It does support card emulation through Google Wallet, and I can send and receive data to the two Master Card AIDs that it uses. However, when I try to implement my own HostApduService to handle communications with my own custom AID, Android doesn't route any APDUs to my service. I then tried to call CardEmulation.isDefaultServiceForAid to see if my service is the one that should handle my custom AIDs. When I include the CardEmulation class in