android-4.4-kitkat

How do I specify and add a custom printer in an Android app?

有些话、适合烂在心里 提交于 2019-12-05 04:49:27
问题 I'm creating an app for Android. Part of the desired app functionality is that the user can select a special printer (let's just call it Transfer Printer) which will pass on the document-to-be-printed to a process running on an external server. What steps do I need to take to add a custom printer to the list of printers in the Android print panel, accessible from the Print option of the Overflow menu? It is desirable to use the existing Android print panel functionality rather than, for

How to parse a none standard HTTP response?

北慕城南 提交于 2019-12-05 01:24:48
I'm having a real hard time figuring out how to parse a none standard HTTP response. The none standard response contains ICY 200 OK instead of HTTP 200 OK . Here is a sample URL that sends the none standard HTTP response. http://50.117.121.162:80 Since Android 4.4 HttpURLConnection will no longer work with these none standard responses. I have tried using the HttpClient by Apache but it doesn't work because of the none standard HTTP response. I have then tried following the guide for adding a custom response parser , but Android doesn't seem have all the classes needed to do it. I'm really

Filename are missing for openFileChooser Android 4.4.4

我怕爱的太早我们不能终老 提交于 2019-12-05 01:07:27
Goal: to be able to attach a file of any type to a <input type="file" /> in a webview in Android 4.1+ . (Android 5+ is fine) I set openFileChooser as I saw fit based on few examples I have found. It works on 4.1 but not on 4.4.4 where the files attached do not have their filename correctly set . Instead is set as filename the last path of the intent.mData return to onActivityResult , .e.g, for a mData value of content://com.android.providers.downloads.documents/document/2 , the filename will be 2 ―without extension of course―while the name should be image.png . What can I do to fix it? Would

Enabling KioskMode in Android 4.4.2 with Root

[亡魂溺海] 提交于 2019-12-05 00:03:53
问题 I was able to enable kiosk mode in pre-KitKat-releases by killing the com.android.systemui process. Anyhow, this seems not to work in KitKat-releases: After killing the process the whole screen got stuck and I am not able to press any buttons. After inspecting similar apps from the Play Store I saw recent updates providing a compatibility for KitKat (e.g. Sure lock demo link). Can somebody explain this KitKat-compatibility? Can somebody name a new way to hide the navigation and status bar in

Unable to find System Image in Emulator in Android Studio with Google APIs

柔情痞子 提交于 2019-12-04 23:47:55
I want to run in Emulator a System Image with Google APIs installed. I downloaded the System Images for API Version 19 (among others). When I go to start a new AVD in Android Studio, for API = 19 - I am not seeing the image with Google APIs. It should be there because I did download it using the SDK Manager (see screen clippings below). Am I missing something? See below screen in AVD Manager showing that the Kitkat does not have an image with Google APIs. Please try the following solution it's work for me. If you can not find system image in Android Studio in emulator then go to your Android

Translucent StatusBar on kitkat with FrameLayout above the Toolbar and using CoordinatorLayout

浪尽此生 提交于 2019-12-04 20:36:08
I was trying to achieve Translucent StatusBar on kitkat with the following FrameLayout and it's working without CoordinatorLayout like this: Layout.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:weightSum="1"> <FrameLayout android:id="@+id/statusbar" android:layout_width="match_parent" android:layout_height="25dp" android:background="@color/colorPrimaryDark" /> <android.support.v7.widget.Toolbar android:id="@+id

converting web view as image in Android 4.4 Web-view not working

China☆狼群 提交于 2019-12-04 20:16:54
I have an app that uses webview to display D3 charts. Here is an example of an url that I use for charts: http://nvd3.org/livecode/index.html#codemirrorNav I am able to load the charts and taken a screenshot of that chart too.. But here the problem with android 4.4 is that it is not possible to capture the webview along with transparent background. This is my webview <WebView android:id="@+id/chartView" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight=".10" android:background="@drawable/chart_bg" > </WebView> I applied the below properties to the web

Why can't I open/write from a serial port on Android?

拟墨画扇 提交于 2019-12-04 17:28:16
I have written an Android app which runs on a custom kernel on Android 4.4 Kitkat device, which uses the Android Serial Port API ( https://code.google.com/p/android-serialport-api/ ) in order to open the serial port "/dev/ttyACM0" which is the port associated with my serial device. The port has the proper "666" permissions (crw-rw-rw), and the app itself even has the WRITE_EXTERNAL_STORAGE" permission. However, even though the permissions appear correct, when my app tries to open said serial port using the library, it fails. In my java code, if I try to do a "device.canWrite()" it returns

Nexus 5 (Kitkat 4.4) won't authorize my Windows 8 computer

荒凉一梦 提交于 2019-12-04 16:34:52
问题 I'm trying to do some app development for Android with Eclipse and my Nexus 5. However, after the first time loading MyFirstApp from Eclipse, I can't seem to get the authorization right. When I run adb devices from the command prompt, I end up getting 0350b965215d9854 unauthorized or 0350b965215d9854 offline and even after restarting everything, I only sporadically get the authorization popup on my phone. Even if I select 'always allow from this computer' checkbox (pic below), my computer

Debugging in the stock browser on a Samsung Galaxy S4 on KitKat

放肆的年华 提交于 2019-12-04 16:26:29
问题 We have a Javascript bug that only appears in the stock browser of the Galaxy S4 (GT-I9505) running KitKat (4.4.2) and we're unable to debug it or view the Javascript console. I've tried running about:debug and it does enable the debug menu, but it also redirects me to a 'page not found' and going back/forwards removes the debug menu. We've also tried using logcat , but no messages are shown (this command works perfectly on a Nexus 4 JellyBean and in an emulated Gingerbread). adb logcat