android-4.4-kitkat

Sticky immersive mode disabled after soft keyboard shown

送分小仙女□ 提交于 2020-06-24 03:08:08
问题 I have an app that needs to be full screen most of the time. I know that if an alert is shown or other window is displayed, over the top of the activity window, full screen is temporarily removed. Unfortunately, when a soft keyboard is shown for an EditText or something, when the user has finished with the keyboard, full screen immersive mode is not restored. Any idea how this can be achieved? 回答1: Taken from this sample app by Google, you need to append this to the end of your activity,

Host Card Emulation on Nexus 7 2012

一曲冷凌霜 提交于 2020-02-02 08:36:26
问题 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

Content uri crashes camera on Android KitKat

喜夏-厌秋 提交于 2020-01-29 05:39:04
问题 I run into problem while using content uri and FileProvider on Android API 19 (Kitkat). Here's code that I use to open camera on device and record a video: File file = new File(pathname); Uri fileUri = FileProvider.getUriForFile(this, AUTHORITY_STRING, file); Intent intent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE); intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri); startActivityForResult(intent, requestCode); I've tested this code on API's 23-24 and it works just fine, but on API 19

Create package directory in ../Android/data denied on SD-Cards on Android >4.4

我与影子孤独终老i 提交于 2020-01-25 10:30:11
问题 I have trouble creating the "com.foo.Example" folder of my app in "/storage/extSdCard/Android/data" from inside the app. If created manually with a file manager there is no trouble, just creating the first one with a simple mkdir returns false. I used the package name declared in the manifest and used throughout and I do have the appropriate WRITE_EXTERNAL_STORAGE-permission in there aswell. Where is this folder suposed to come from, if the app is unable to create it? 回答1: I'm assuming you're

Create package directory in ../Android/data denied on SD-Cards on Android >4.4

对着背影说爱祢 提交于 2020-01-25 10:30:06
问题 I have trouble creating the "com.foo.Example" folder of my app in "/storage/extSdCard/Android/data" from inside the app. If created manually with a file manager there is no trouble, just creating the first one with a simple mkdir returns false. I used the package name declared in the manifest and used throughout and I do have the appropriate WRITE_EXTERNAL_STORAGE-permission in there aswell. Where is this folder suposed to come from, if the app is unable to create it? 回答1: I'm assuming you're

can not install Android System Webview on Android 4.4.2

故事扮演 提交于 2020-01-25 06:54:07
问题 I have Galaxy S3 that is running Android 4.4.2. I keep noticing that more and more apps do not display web stuff on my phone. I suspect it is because I am missing Android System Webview. The play store says that current version of webview in incompatible with my 4.4.2. 1) what is the minimum Android version that the webview supports? 2) are there any legit and solid alternatives to Google's webview that can be installed instead? 回答1: From: https://developer.chrome.com/multidevice/webview

Screen Recording kitkat with button

北战南征 提交于 2020-01-23 19:01:25
问题 i want create a button that starts the new screenrecording feature in Android 4.4 Kit Kat.. I create a button and i tryied to do in this way: start.setOnClickListener(new OnClickListener() { public void onClick(View v){ String record ="su screenrecord — bit rate 8000000 --time-limit 30 "+recordfolder+"Record.mp4"; recordfolder.mkdir(); try { Process screenrecording = Runtime.getRuntime().exec(record); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); It

Screen Recording kitkat with button

耗尽温柔 提交于 2020-01-23 19:01:11
问题 i want create a button that starts the new screenrecording feature in Android 4.4 Kit Kat.. I create a button and i tryied to do in this way: start.setOnClickListener(new OnClickListener() { public void onClick(View v){ String record ="su screenrecord — bit rate 8000000 --time-limit 30 "+recordfolder+"Record.mp4"; recordfolder.mkdir(); try { Process screenrecording = Runtime.getRuntime().exec(record); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); It

Filename are missing for openFileChooser Android 4.4.4

白昼怎懂夜的黑 提交于 2020-01-23 04:33:05
问题 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

Automatically revert to previous default SMS app

一笑奈何 提交于 2020-01-22 15:30:05
问题 I have an app that requires temporary access to the device's SMS. In KitKat and above, this access is only granted to the default SMS app, so I'm using: Intent intent = new Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT); intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME, getPackageName()); startActivity(intent); This brings up a dialog asking the user if they let my app become the default SMS app. So far so good. Problem is, once my app completes its operation, I have to ask the