android-4.4-kitkat

How to correctly notify MediaScanner about a folder, even on Nexus/Kitkat devices?

懵懂的女人 提交于 2020-01-22 14:08:17
问题 Background I'm making an app that downloads some images from the Internet into a specific folder that is defined as: final String pathToPutFiles = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + File.separator + DOWNLOAD_FOLDER_NAME; I wish to make the gallery and any app that shows media, to be notified of those images and be able to show them. Sadly I'm having problems on Nexus 4, which has Kitkat version (4.4.2 to be exact). Sometimes it works and sometimes

Chromecast sender APIs for WebView based app on Android 4.4

帅比萌擦擦* 提交于 2020-01-14 14:20:28
问题 I read that WebView component in Android 4.4 is based on Chrome: https://developers.google.com/chrome/mobile/docs/webview/overview#does_the_webview_support_the_chrome_apps_apis However, support for Chrome Apps API is still not there. Does this mean that my WebView based app cannot use Chromecast Sender APIs ? 回答1: That is correct, you do not have the needed extension and APIs to use the (pure) chrome WebView to communicate with a chromecast device. As a side note, you cannot do that in the

Step counter in Android

倾然丶 夕夏残阳落幕 提交于 2020-01-14 03:38:08
问题 Recently I tried to make an app which gives user step count. And came across step count and detector which was introduced in Android 4.4. but I can't find a way to do step counting hourly basis. I am new to this any guidance will be highly appreciated I found on this https://developer.android.com/reference/android/hardware/SensorManager.html#registerListener(android.hardware.SensorEventListener, android.hardware.Sensor, int) That editing the third parameter I can specify delay while doing

Working Directory : null environment when running Process.Builder on android

蓝咒 提交于 2020-01-11 12:44:28
问题 I am using two phones, Galaxy Nexus(JellyBean) and Nexus 5(KitKat). I am trying to execute a script which exists in /data/folder/scripts/run.sh I use Process.Builder to build the command. This command is built by getting Environment.getDataDirectory().toString() + "/folder/scripts/run.sh" There are no issues running this on the Galaxy Nexus but when I run it on the Nexus 5, I catch an exception when I run the process.start(). The output which I get contains: Error running exec(). Command: [

Notification API in Android Chrome browser

守給你的承諾、 提交于 2020-01-11 00:23:13
问题 My web application uses the Notification API. I thought KitKat's Chrome browser was supposed to have it, or at least the old webkitNotifications . But both window.Notification and window.webkitNotifications are undefined in my tests in Chrome in Android 4.4. Is there a way to push notifications from the browser to the user when the browser isn't visible in Android 4.4 ? Or do I still have to embed my web app in an Android application to achieve this ? Of course I'm open to other solutions

In rooted device detect if an outgoing call has been answered

核能气质少年 提交于 2020-01-07 03:41:13
问题 I am developing a system app in which I need to capture the outgoing call answer/reject events. Could you advice on how to achieve this in a rooted device please ? Problem with TelephonyManager class is that there is no notification of when outgoing call has answered. This is crucial to my app. My target device is android 4.4 (kitkat). Some thing like this app. https://play.google.com/store/apps/details?id=io.github.yutouji0917.callvibrator.ad 回答1: To do this you must register broadcast

setPreviewSize does not work on Nexus 5 kitkat

一笑奈何 提交于 2020-01-05 13:12:37
问题 In my app i need to set the camera preview size at 640x480. I tried my code on different devices and different android versions (for example 2.3.6 on samsung galaxy S2, 4.0.3 on asus tf101g, 4.3 on galaxy nexus), and at the last on the new Nexus 5 with android kitkat(4.4). My code works perfectly in all devices, but doesn't work on Nexus 5. Why? In fact after this steps: int PREVIEW_WIDTH = 640; int PREVIEW_HEIGHT = 480; if(isSupportedSize(PREVIEW_WIDTH,PREVIEW_HEIGHT,mCamera)){ /

Name of the layout or how it's done?

[亡魂溺海] 提交于 2020-01-05 04:34:12
问题 In short I want a preview similar to Google Plays, where you can slide up and the top image/video preview fades back and the rest of the view is moved up. I've got a view that I want to be hiden like the video in this example, the action bar can remain stationary at all times, but I need the bottom part to be dragable. I can't seem to find out which layout that is, or how it is done, all I managed to find were unrelated such as ViewPager. My current min sdk version is 18, the compile version

TWO_SWIPE_DOWN TAP unable to catch on Google Glass GDK (XE16)

十年热恋 提交于 2020-01-03 09:09:48
问题 In Google Glass XE16 GestureDetector can detect several gestures like LONG_PRESS, SWIPE_DOWN, THREE_LONG_PRESS, TWO_SWIPE_DOWN , TWO_TAP & SOME OTHER GESTURES. In glass TWO_SWIPE_DOWN is like shortcut option to cancel everything and go to black screen. After that black screen it comes "ok glass" . But I need to override the TWO_SWIPE_DOWN TAP so that user can not go outside the application in this way. I want to show the user specific message in the time of tapping TWO_SWIPE_DOWN. I have code

TWO_SWIPE_DOWN TAP unable to catch on Google Glass GDK (XE16)

牧云@^-^@ 提交于 2020-01-03 09:08:04
问题 In Google Glass XE16 GestureDetector can detect several gestures like LONG_PRESS, SWIPE_DOWN, THREE_LONG_PRESS, TWO_SWIPE_DOWN , TWO_TAP & SOME OTHER GESTURES. In glass TWO_SWIPE_DOWN is like shortcut option to cancel everything and go to black screen. After that black screen it comes "ok glass" . But I need to override the TWO_SWIPE_DOWN TAP so that user can not go outside the application in this way. I want to show the user specific message in the time of tapping TWO_SWIPE_DOWN. I have code