android-4.2-jelly-bean

Unable to show keyboard automatically in the SearchView

空扰寡人 提交于 2019-11-29 01:16:40
The SearchView is focused by default, but when I try to show software keyboard - it doesn't happen: InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0); But when I click on the SearchView - it does. Why? Fixed! mSearchView.setOnQueryTextFocusChangeListener(new OnFocusChangeListener() { @Override public void onFocusChange(View view, boolean hasFocus) { if (hasFocus) { showInputMethod(view.findFocus()); } } }); And private void showInputMethod(View view) { InputMethodManager imm = (InputMethodManager)

copy directory from assets to data folder

a 夏天 提交于 2019-11-28 23:50:59
I would like to copy a quite big directory from the assets folder of my app to the data folder on the first run of the app. How do I do that? I already tried some examples, but nothing worked, so I don't have anything. My target is Android 4.2. Thanks, Yannik try this code of your Application instance (you should write the class in manifest): This code is copying content of assets/files folder to the cache folder of app (you can place other path in copyAssetFolder() function). Only when App is launched for the first time import java.io.File; import java.io.FileOutputStream; import java.io

Logcat won't display Log.d messages

余生长醉 提交于 2019-11-28 23:24:08
I'm developing an Android application and I would like to have some way to print debug statements as my code runs. Fortunately for me, Logcat was able to print out Log.d messages when I run my application on an Android 2.3.3 (API 10) emulator. However, when I tested the same exact application on a physical device (Samsung Galaxy S4 Android 4.2.2) I was unable to see anything other than dalvikvm and AndroidRuntime messages. com.android.internal.os.RuntimeInit <<<<<< 07-28 04:49:24.165: DEBUG/AndroidRuntime(6378): CheckJNI is OFF 07-28 04:49:24.165: DEBUG/AndroidRuntime(6378): setted country

Camera Force Closing issue in Samsung Galaxy S3 version 4.1.1

对着背影说爱祢 提交于 2019-11-28 21:58:01
I want to capture image and save it in Image view in one of My Application. I already have an idea how to implement it and also Works fine in all device Except Samsung Galaxy S3. What I Want: Avoid the Force Closing Issue Coming in Samsung Galaxy S3 and probably for all other Device which i have not yet tested. What I have Done: I have Done the Below Code to achieve my goal. BuildInukshk_4 Activity : package com.inukshk.CreateInukshk; import java.util.Calendar; import android.app.Activity; import android.app.AlertDialog; import android.content.ContentResolver; import android.content

Android 4.2.2 - adb offline, even after SDK upgrade

三世轮回 提交于 2019-11-28 18:46:46
Edit: Fixed! Looks like there are very many possible causes for this. Mine was one of the more unusual... I updated SDK Tools to 21.1 and Platform-tools to 16.0.1. Verified with adb version that I am running v1.0.31. My development machine is running Windows 7, x64. I have four 4.2.2 devices to test with, a Galaxy Nexus with unlocked bootloader but not rooted, and Nexuses One, 4, 7 & 10, all stock. The Nexus One, being <4.2.2, works just fine with adb, but all the 4.2.2 devices show as 'offline' in adb, and I have NEVER seen the RSA security dialog pop up on the devices, even after several

HTTP Basic Authentication issue on Android Jelly Bean 4.1 using HttpURLConnection

妖精的绣舞 提交于 2019-11-28 12:23:37
We are making HttpURLConnection based request to the Web server using HTTP Basic Authentication. Code works great on Android versions 2.x, 3.x., 4.0.x Now with Jelly Bean and v4.1.x authentication fails with the following messages in the LogCat: 01-27 10:54:18.886: ...::doReadRawData(731): An exception occured while reading data from remote host. httpURLConn.responseCode = 401 / httpURLConn.responseMessage = UNAUTHORIZED 01-27 10:54:18.886: ...::doReadRawData(731): java.io.IOException: No authentication challenges found The Authentication code we using for HttpURLConnection as in the Android

onConfigurationchanged is not called over jellybean(4.2.1)

怎甘沉沦 提交于 2019-11-28 10:16:10
I really suffer from this issue. I already set the flag android:configChanges="keyboardHidden|orientation|locale" But when I changed configuration of language, onconfigurationchanged function isn't called. The strange thing is that my codes work fine over other android platform. I searched this issue here. Someone said that I need to set sdk version lower. But it didn't work. Please give me some tips. Add the layoutDirection attribute, such as android:configChanges="keyboardHidden|orientation|locale|layoutDirection" if you're working with API 17. layoutDirection that is also connected with

Android 4.2.2 USB debugging “Always allow from this computer” option result in target unknown for device?

↘锁芯ラ 提交于 2019-11-28 09:49:16
I am having problem connecting my 4.2.2 android device with PC after I select "Always allow from this computer". I have selected "Always allow from this computer" in 4.2.2 USB debugging and it works fine the first time but when I tried other time my devices always appear offline. I have tried with another device that is also 4.2.2 and the USB debugging popup and when I click ok (without selecting "Always allow from this computer") with device list became online. I have tried the following method and it didn't work adb kill-server/ adb start-server/ and adb devices install new eclipse, android

Mediacodec jelly-bean

风格不统一 提交于 2019-11-28 08:09:08
问题 I'm working with media codec for an .mp4 file on jelly-bean and getting this in logcat 02-27 12:12:13.645: A/ACodec(6760): frameworks/av/media/libstagefright/ACodec.cpp:1041 CHECK(def.nBufferSize >= size) failed. 02-27 12:12:13.645: A/libc(6760): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 6778 (CodecLooper) Can anyone tell me what is this? and how to solve it? 回答1: You provided not much info, so the answer follows: Looks like it is internal check of libstagefright library. I

GLSurfaceView displaying black on Nexus 7 with Android 4.2

家住魔仙堡 提交于 2019-11-28 07:56:17
问题 I have an OpenGL ES2.0 app that is working on devices running various Android versions from 2.2 up to 4.1. However I have been told that when running it on a Nexus 7 with Android 4.2 the 3D graphics in the App are all black. The Action Bar and dialogs work fine though. I have tried it on an emulated Nexus 7 with Intel Atom processor, HAX and GPU enabled running 4.2.2 and that works OK. I would have preferred to run the ARM image but that doesn't seem to include Open GL ES2.0 Does anyone have