android-4.4-kitkat

isValidFragment Android API 19

余生颓废 提交于 2019-11-27 06:52:32
When I try my app with Android KitKat I have an error in PreferenceActivity. Subclasses of PreferenceActivity must override isValidFragment(String) to verify that the Fragment class is valid! com.crbin1.labeltodo.ActivityPreference has not checked if fragment com.crbin1.labeltodo.StockPreferenceFragment is valid In documentation I find the following explanation protected boolean isValidFragment (String fragmentName) Added in API level 19 Subclasses should override this method and verify that the given fragment is a valid type to be attached to this activity. The default implementation returns

Impossible to rotate the emulator with android 4.4 [duplicate]

此生再无相见时 提交于 2019-11-27 06:52:13
This question already has an answer here: Android emulator not rotating to landscape 11 answers I've updated my sdk to the latest version (android 4.4) and I started the emulator, but now it seems not possible to rotate the screen with CTRL+F11, the screen change but all the applications don't change. I don't know if it's a related issue but I can see that even if I created a new emulator with menù hw button, now all the applications have the overflow button. These appear to be bugs in the Android 4.4 emulator. You may wish to track the issues that I filed regarding the orientation change bug

How to record screen and take screenshots, using Android API?

北城以北 提交于 2019-11-27 05:58:25
Background Android got new API on Kitkat and Lollipop, to video capture the screen. You can do it either via the ADB tool, or via code (starting from Lollipop). Ever since the new API was out, many apps came that use this feature, allowing to record the screen, and Microsoft even made its own Google-Now-On-tap competitor app. Using ADB, you can use: adb shell screenrecord /sdcard/video.mp4 You can even do it from within Android Studio itself. The problem I can't find any tutorial or explanation about how to do it using the API, meaning in code. What I've found The only place I've found is the

Dialog on Android KitKat seems to be cut

假装没事ソ 提交于 2019-11-27 05:39:58
问题 I used dialog theme for an Activity and it works fine on Android <= 4.3 but not on the latest KitKat 4.4. Here's a screenshot of the problem: Top of the layout is missing. You can see that the bounds seems to be cut. I'm using an Android emulator to test the app, so I don't know if the problem is due to the virtual machine or due to some other reason. 回答1: You can solve the problem to be cut from below code. dialog.getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN,

Android pre-lollipop devices giving error “SSL handshake aborted: ssl=0x618d9c18: I/O error during system call, Connection reset by peer”

雨燕双飞 提交于 2019-11-27 04:32:17
Iam having this strange issue in which the retrofit keeps throwing me "SSL handshake aborted: ssl=0x618d9c18: I/O error during system call, Connection reset by peer" in kitkat, whereas the same code working fine in lollipop devices. Iam using an OkHttpClient client like the following public OkHttpClient getUnsafeOkHttpClient() { try { final TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { @Override public void checkClientTrusted( java.security.cert.X509Certificate[] chain, String authType) { } @Override public void checkServerTrusted( java.security.cert

Why can't we use a Translucent system bars with and ActionBar

余生长醉 提交于 2019-11-27 04:09:44
问题 While updating my apps to Kitkat, I just wanted to give them a gorgeous look on KitKat using the Translucent property: Translucent system bars You can now make the system bars partially translucent with new themes, Theme.Holo.NoActionBar.TranslucentDecor and Theme.Holo.Light.NoActionBar.TranslucentDecor. By enabling translucent system bars, your layout will fill the area behind the system bars, so you must also enable [fitsSystemWindows][4] for the portion of your layout that should not be

Gallery has stopped while cropping image in kitkat Nexus7

倖福魔咒の 提交于 2019-11-27 04:05:45
问题 Problem: I am fetching image from gallery and after that cropped that image and its working perfect in all device. But it is giving me error while running in Nexus 7 kitkat since i have checked build version for it with "Gallery Stopped" error. I have implemented code and all other neccessary permission in manifest file still not getting response. So can anybody resolve this? Here is my Code: final String[] items = new String[] { "Take from camera", "Select from gallery" }; ArrayAdapter

How to set my sms app default in Android Kitkat?

◇◆丶佛笑我妖孽 提交于 2019-11-27 04:00:59
I made an android sms app in which I am sending and receiving sms as android messaging app does so. Now I have set my target to 4.4 (Android KitKat version) but Android KitKat has new "Default Messaging" app settings that user can select one app at a time for messaging. I followed the steps from this site to select option for my sms app as default app but in the settings my app never showed up in the popup of selecting default messaging app. Below is my java code I have used from the guid if( androidOS.contains("4.4") ){ if (! Telephony.Sms.getDefaultSmsPackage(this).equals(myPackageName) ) {

In android 4.4, swiping app out of recent tasks permanently kills application with its service . Any idea why?

狂风中的少年 提交于 2019-11-27 04:00:39
Unlike previous versions, in 4.4, swiping app out of recent tasks permanently kills app along with its service(like force-stop) even though it's running background services. It shows 0 processes 1 service but service also doesn't work. Ideally it shouldn't kill background service, and it doesn't in versions prior to 4.3. Any idea why is it happening in 4.4? Got it. Its a bug in 4.4. I tried this and it worked perfectly fine(its a dirty workout though). Just override this method -: public void onTaskRemoved(Intent rootIntent) { Log.e("FLAGX : ", ServiceInfo.FLAG_STOP_WITH_TASK + ""); Intent

Howto avoid the “EACCES permission denied” ON SDCARD with KITKAT 4.4.2 Version. New policy from google

雨燕双飞 提交于 2019-11-27 04:00:09
问题 With the android kitkat 4.4.2 version is a new google policy implemented for writeaccess, which I do not understand so far. I read a lot about this issue with other apps. They get a "EACCES permission denied". My app needs to write/unzip a zipfile, also write to a sqlite-database. How can this EACCES permission denied issue be solved with Android version 4.4.2 KITKAT ? 回答1: I found a working solution to this issue in xda forum; there is no need for rooting. Here's an example : /** * Returns