android-4.4-kitkat

How does evaluateJavascript work?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 07:28:16
问题 I\'m trying to use the new evaluateJavascript method in Android 4.4, but all I ever get back is a null result: webView1.evaluateJavascript(\"return \\\"test\\\";\", new ValueCallback<String>() { @Override public void onReceiveValue(String s) { Log.d(\"LogName\", s); // Log is written, but s is always null } }); How do I return a result to this method? Update: Little bit more info: I have the INTERNET permission set I have setJavascriptEnabled(true); Tried apostrophe string: return \'test\'; ,

How to fix android 4.4.2 error ClassNotFoundException: Didn&#39;t find class “com.google.firebase.provider.FirebaseInitProvider” on path: DexPathList

浪尽此生 提交于 2019-11-26 06:47:32
问题 AndroidRuntime: FATAL EXCEPTION: main Process: com.info.app, PID: 24503 java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.ClassNotFoundException: Didn\'t find class \"com.google.firebase.provider.FirebaseInitProvider\" on path: DexPathList[[zip file \"/data/app/com.info.app-1.apk\"],nativeLibraryDirectories=[/data/app-lib/com.info.app-1, /vendor/lib, /system/lib]] at android.app.ActivityThread.installProvider(ActivityThread.java

Permanently hide Android Status Bar

我的梦境 提交于 2019-11-26 06:14:41
问题 I\'m trying to hide the system Status Bar on an Android 4.4 device. This is for a kiosk-mode where my app will be the only app ever run on the device. The target device for now is a 2013 Nexus 7. The device is rooted, and I\'ve been able to completely remove the bottom Navigation Bar with some info from this post. For the top Status Bar, everything I have tried only hides the bar temporarily. If my users motion down at the top of the screen, the status bar reappears. I don\'t want to allow

Android KitKat securityException when trying to read from MediaStore

别等时光非礼了梦想. 提交于 2019-11-26 04:46:45
问题 java.lang.SecurityException: Permission Denial: opening provider com.android.providers.media.MediaDocumentsProvider from ProcessRecord{430b1748 29271:com.x.x.x/u0a88} (pid=29271, uid=10088) requires android.permission.MANAGE_DOCUMENTS or android.permission.MANAGE_DOCUMENTS I\'ve added the MANAGE_DOCUMENTS and READ_EXTERNAL_STORAGE permissions but I am still getting this error. The offending code: public static String getImagePath(HailoDriverApplication app, Uri uri) { Cursor cursor = null; if

Host-based Card Emulation with Fixed Card ID

假如想象 提交于 2019-11-26 04:23:42
问题 Android 4.4 introduced Host-based Card Emulation (HCE). As you know, all NFC cards come with a fixed card ID ( NfcAdapter.EXTRA_ID ). My office door access usually detects the NFC card ID for the authorization. After flashing my phone to KitKat, I tried to scan my phone with the access reader. But whenever the screen turns off and on again, I get a different card ID. I did try keeping the phone screen on, and registering the emulated card ID to the door access system. It managed to grant the

execute shell command from android

旧时模样 提交于 2019-11-26 03:24:06
问题 I\'m trying to execute this command from the application emulator terminal (you can find it in google play) in this app i write su and press enter , so write: screenrecord --time-limit 10 /sdcard/MyVideo.mp4 and press again enter and start the recording of the screen using the new function of android kitkat. so, i try to execute the same code from java using this: Process su = Runtime.getRuntime().exec(\"su\"); Process execute = Runtime.getRuntime().exec(\"screenrecord --time-limit 10 /sdcard

Marking SMS messages as read/unread or deleting messages not working in KitKat

你离开我真会死。 提交于 2019-11-26 02:25:18
问题 I have been working on an SMS application. Everything was smooth until yesterday, when I updated my Nexus 4 to Android 4.4, KitKat. Features such as marking an SMS as read/unread, and deleting all messages in a thread have stopped working. Why is this happening? It works on other Samsung devices (not running KitKat). This is my code to mark a message as read or unread: public static void markRead(final Context context, final Uri uri, final int read) { Log.d(TAG, \"markRead(\" + uri + \",\" +

HTML file input in android webview (android 4.4, kitkat)

让人想犯罪 __ 提交于 2019-11-26 01:44:59
问题 I was using the <input type=\"file\"> on the android webview. I got it working thanks to this thread: File Upload in WebView But the accepted answer (or any other) no longer works with android 4.4 kitkat webview. Anybody knows how to fix it? It doesn\'t work with target 18 either. I\'ve looking some android 4.4 source code and it seems that the WebChromeClient hasn\'t changed, but I think the setWebChromeClient no longer works on the kitkat webview, or at least not the openFileChooser

Get real path from URI, Android KitKat new storage access framework [duplicate]

随声附和 提交于 2019-11-25 22:57:33
问题 This question already has answers here : Android Gallery on Android 4.4 (KitKat) returns different URI for Intent.ACTION_GET_CONTENT (19 answers) Closed 5 years ago . Before the new gallery access in Android 4.4 (KitKat) I got my real path on the SD card with this method: public String getPath(Uri uri) { String[] projection = { MediaStore.Images.Media.DATA }; Cursor cursor = managedQuery(uri, projection, null, null, null); startManagingCursor(cursor); int column_index = cursor

execute shell command from android

谁说胖子不能爱 提交于 2019-11-25 21:48:35
I'm trying to execute this command from the application emulator terminal (you can find it in google play) in this app i write su and press enter , so write: screenrecord --time-limit 10 /sdcard/MyVideo.mp4 and press again enter and start the recording of the screen using the new function of android kitkat. so, i try to execute the same code from java using this: Process su = Runtime.getRuntime().exec("su"); Process execute = Runtime.getRuntime().exec("screenrecord --time-limit 10 /sdcard/MyVideo.mp4"); But don't work because the file is not created. obviously i'm running on a rooted device