android-2.2-froyo

Selecting text on TextView (android 2.2)

血红的双手。 提交于 2019-11-29 12:22:06
How to implement selecting text capability on Android 2.2? I searched Google but can't find a solution. This is the only way I've found (from google) to support it for android 1.6+, it works but it's not ideal, I think in stock android you can't hold down a webview to highlight until v2.3, but I may be mistaken.. By the way this is for a webview, it might also work on textview, but I haven't tried it (Note: this is currently what my shipped app is using, so it works with all the phones I've had it tested on, but the only reason I found this question was because I was searching and hoping that

Android; How can I initialise state in one activity, then have another refresh that?

只愿长相守 提交于 2019-11-29 11:57:39
I have two activities The first one gets some data from a content provider, and displays it The second activity has a button, and when clicked it should call the first activity to "refresh", in other words to reload data from the content provider This is my first activity ... @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.contactsview); // Grab data and put it onto screen getDataAndPutToUI(); } @Override public void onStart() { //Refresh data getDataAndPutToUI(); } ... And this is my second activity @Override public void

Basic streaming audio works in 2.1 but not in 2.2

我是研究僧i 提交于 2019-11-29 08:44:55
My simple audio streaming app works perfectly in 1.6 and 2.1 does not work in 2.2. I have no clue as to why. It works fine on the emulator, on actual 2.2 devices the audio stops unexpectedly after about 10 minutes or so. When I looked at logcat on my phone (HTC EVO) I see this: I/HTTPStream( 65): 1358 Bytes read, progress 34346/65536 I/HTTPStream( 65): 1358 Bytes read, progress 35704/65536 I/HTTPStream( 65): 1359 Bytes read, progress 37063/65536 I/HTTPStream( 65): 1358 Bytes read, progress 38421/65536 I/HTTPStream( 65): 1358 Bytes read, progress 39779/65536 I/HTTPStream( 65): 1359 Bytes read,

glGetShaderInfoLog returns empty string (android)

℡╲_俬逩灬. 提交于 2019-11-29 06:55:46
I am modifying the version of the android version of the 2d texture example from OpenGl ES2.0 programming guide to change the fragment shader. this is written in pure Java and doesn't use the NDK. The vanilla example works just fine on my phone, but when I change the shader code it no longer works. This is because my modified shader doesn't compile (obviously), but I can't find the cause of the problem as glGetShaderInfoLog returns an empty string. I've done a search on this issue, and apparently, as of Jul 22nd, it was a known issue, but I was wondering what ways there are of getting around

Android 2.2 SDK breaks compatibility with older phones

家住魔仙堡 提交于 2019-11-29 06:48:18
I have recently updated my app to a build tarket of SDK version 8 in order to include the App2SD feature for my users. However I have had reports of devices on SDK 3 (1.5) having problems starting the application, with the following stack trace: ... E/AndroidRuntime(10638): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/title_bar_shadow.9.png from drawable resource ID #0x7f020000 E/AndroidRuntime(10638): at android.content.res.Resources.loadDrawable(Resources.java:1641) E/AndroidRuntime(10638): at android.content.res.TypedArray.getDrawable(TypedArray.java:548) E

Android 2.2 SDK - setParameters failed for Camera API on Nexus One

偶尔善良 提交于 2019-11-29 05:17:21
I am using a slightly modified version of the Camera API Demo and it works in the emulator. I am using a reflect class I found in one of the mailing groups, but I still get this error when testing on my Nexus One (Android 2.2.1): 12-29 13:22:04.027: ERROR/QualcommCameraHardware(2145): Invalid preview size requested: 320x402 12-29 13:22:04.037: DEBUG/AndroidRuntime(16514): Shutting down VM 12-29 13:22:04.037: WARN/dalvikvm(16514): threadid=1: thread exiting with uncaught exception (group=0x4001d7f0) 12-29 13:22:04.047: ERROR/AndroidRuntime(16514): FATAL EXCEPTION: main 12-29 13:22:04.047: ERROR

Programatically starting the 'Add Account' activity in Android 2.2

早过忘川 提交于 2019-11-29 04:01:40
I've been experimenting with the Android SDK over the past few days, in readiness to write an App for the store, however I've run across a bit of a problem. The App I'll be writing requires that the user has a Google account associated with the phone. Retreiving and making use of the Auth token etc was not a problem, however I would like to be able to show the activity that a user would normal reach by going through the menus Settings->Accounts->Add Account. Now through experimentation I've been able to launch this activity from the shell using the following command. am start -n com.google

Could not find INI file in $ANDROID_AVD_HOME nor in $HOME/.android/avd

耗尽温柔 提交于 2019-11-28 23:57:34
问题 I cannot start a virtual devices on android SDK when I press the start button on AVD manager, this error shows on my screen: Starting emulator for AVD 'AVD_for_Galaxy_Nexus_by_Google' PANIC: Could not find AVD_for_Galaxy_Nexus_by_Google.ini file in $ANDROID_AVD_HOME nor in $HOME/.android/avd"! Here is the screen shot: 回答1: You'll just have to set the ANDROID_AVD_HOME environment variable and restart Android Studio. 回答2: just this command worked for me : sudo cp -R /root/.android $HOME 回答3: I

Reading RFID with Android phones

霸气de小男生 提交于 2019-11-28 15:54:42
I did enough research on reading RFID tags using Android phones(smart phones). My understanding of this is that for NFC-enabled smart phones (Nexus S) it is possible to read RFID tags, but there are restrictions. For non-NFC-enabled Androids we need a RFID reader to which we can communicate from Android using Bluetooth. My question is: What are the SDK which we use for reading RFID tag from Android Phone(NFC enabled)? If I have to read using Non NFC enabled phone, is there any standard reader available who provides SDK for development purpose? BrOSs You can hijack your Android audio port using

Binary XML file line #2: Error inflating class android.widget.LinearLayout

烂漫一生 提交于 2019-11-28 12:54:40
I am completely lost with this one. My app works perfectly on API 2.1 on my handset and through the emulator. I have just run it through a 2.2 emulator and I am getting a crash and this error: 04-27 20:29:41.293: ERROR/AndroidRuntime(341): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ebp/com.ebp.ebpMainMenu}: android.view.InflateException: Binary XML file line #2: Error inflating class android.widget.LinearLayout 04-27 20:29:41.293: ERROR/AndroidRuntime(341): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496) 04-27 20:29:41.293: ERROR