android-4.4-kitkat

Navigation drawer below Actionbar

ぃ、小莉子 提交于 2019-11-28 02:56:49
问题 Right now I just started a project in Android Studio with the NavigationBar as preconfigured in the template. Apparently it puts the navigation drawer behind the actionbar. Many questions you find want the navigation drawer on top of the actionbar, I would like to have it start below the actionbar. This is what I currently have: eventually desired situation: I have found this solution, but I think there should be an easier way. 回答1: Apply this attribute to your root viewgroup android:layout

Weird NullPointerException in Spinner

末鹿安然 提交于 2019-11-28 02:39:48
问题 Since Android 4.4 KitKat, i have weird crashes in my applications. It seems that it has something to do with spinner. This stacktrace of bug i am receiving: java.lang.NullPointerException at android.widget.TextView.makeNewLayout(TextView.java:6124) at android.widget.TextView.onMeasure(TextView.java:6400) at android.view.View.measure(View.java:16458) at android.widget.Spinner.setUpChild(Spinner.java:632) at android.widget.Spinner.makeView(Spinner.java:595) at android.widget.Spinner.getBaseline

How can system app located in /system/app have system permission in Android 4.4 KitKat build?

落爺英雄遲暮 提交于 2019-11-28 01:44:30
问题 I'm Jaemoon. My system app located in /system/app was running well until Android 4.3 Jelly Bean but it started having some problems which was security problem in Android 4.4 KitKat. In other words, My system app needed permissions such as android.permission.WRITE_APN_SETTINGS and android.permission.CONNECTIVITY_INTERNAL and did well until Jelly Bean but from KitKat, there were security problems as follows. I don't understand the reason why my system app doing well in Jelly Bean started to

Abort SMS Intent on Android KitKat

半世苍凉 提交于 2019-11-27 23:54:32
问题 I'm currently developing an application that needs to deal with SMS only if it is an SMS expected by the application (same behaviour as Whatsapp on registration). I would like to abort the SMS Intent as it is not expected to appear in the SMS box. My question is : I know that Google changed a lot about SMS behaviour in KitKat, and now, even if my SMS is well parsed by my application, the SMS also appear in SMSBox, even if I call this.abortBroadcast(); in my SMS broadcast receiver. So is there

Android KitKat 4.4 folder on sd card

妖精的绣舞 提交于 2019-11-27 21:20:12
We've just fallen foul of the new permissions that apply to writing files to sd cards (external storage) on Android 4.4 (EACCES Permission Denied) Prior to KitKat we set our writable folder like this: mfolder = Environment.getExternalStorageDirectory().getPath() + "/appfiles"; However after hours of searching I've come to the conclusion, rightly or wrongly that on 4.4 devices to enable writing of files this needs to be changed to: mfolder = Environment.getExternalStorageDirectory().getPath() + "/Android/data/com.xyz.abc/appfiles"; So mfolder would be something like: /mnt/sdcard/Android/data

Android Webview set proxy programmatically Kitkat

拥有回忆 提交于 2019-11-27 19:11:47
How can we set proxy in Android webview programmatically on latest Kitkat release? This SO link WebView android proxy talks about version upto SDK version 18. But those solution no more works with Kitkat as underlying webkit implementation is changed and it uses chromium now. Here is my solution: public static void setKitKatWebViewProxy(Context appContext, String host, int port) { System.setProperty("http.proxyHost", host); System.setProperty("http.proxyPort", port + ""); System.setProperty("https.proxyHost", host); System.setProperty("https.proxyPort", port + ""); try { Class applictionCls =

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

China☆狼群 提交于 2019-11-27 16:51:45
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 covered by the system bars. My only concern is that I would like to use an ActionBar which sounds the

Sms doesn't save on Kitkat 4.4 <Already set as default messaging app>

风格不统一 提交于 2019-11-27 15:57:06
My Sms app does not save the sms to the device even though I already set it as the default messaging. I need to support android pre-kitkat so I did a bit researching and had 2 BroadcastReceiver that have the same content but different name. The onReceive() method is working fine, but as soon as I quit the app and enter it the sms disappears. I checked in the stock messaging but there's no sms either. I cant figure out what the issue is My Androidmanifest: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE xml> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android

How to delete particular inbox message in Android version 5.0 lollipop or in Kitkat?

末鹿安然 提交于 2019-11-27 15:50:46
I am making to delete particular sms of phone number task. when I am testing in motog or Android version 5.0's mobile. I can't delete particular number's sms. My code snippet is below. public void deleteSMS(Context context,String number) { try { Log.d("","Deleting SMS from inbox"); Uri uriSms = Uri.parse("content://sms/inbox"); Cursor c = context.getContentResolver().query(uriSms, new String[] { "_id", "thread_id", "address", "person", "date", "body" }, "address = '"+number+"'", null, null); if (c != null && c.moveToFirst()) { do { long id = c.getLong(0); long threadId = c.getLong(1); String

Send SMS message using non default SMS app on Android 4.4

久未见 提交于 2019-11-27 15:08:31
Can I send SMS using no default SMS app on Android 4.4 Kitkat ? It means, Can I send SMS without ability to write to SMS Provider? I confused about that on Android 4.4 Kitkat. I wonder I can just send SMS using non default SMS app or not. You can send SMS even if your app isn't the default SMS app. However, you won't be able to use the SMS provider. That's the whole point of the new version - to make it clear to the user which app is allowed to use special SMS operations and have only one default app for this. look at this text (taken from android developer blog ) : In consideration of some