android-2.2-froyo

How do I pause Flash content in an Android WebView when my activity isn't visible?

二次信任 提交于 2019-11-26 22:24:27
I am experimenting with using a WebView to display Flash content inside my activity. Everything is working pretty well, but when the user hits the home key to put the activity into the background, the Flash content keeps running (sound keeps playing, etc) I have noticed that both the stock Android browser and Dolphin Browser seem to avoid this problem, and properly pause the Flash content when the browsing activity is put into the background. Ideally I would like a solution that kills the WebView completely if the activity is finishing, but pauses it otherwise (basically copying the default

Android SDK tools revision 12 has problem with Proguard => error conversion to Dalvik format failed with error 1 [duplicate]

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-26 22:22:55
问题 This question already has an answer here: Android: Getting Error: Conversion to Dalvik format failed 11 answers I have just updated to Android SDK tools revision 12, immediately my application can't be exported with previous Proguard setting. I received the "Conversion to Dalvik format failed with error 1", the only library I use is "jcifs". I have tried cleaning and rebuilding, create a new project, and reassembling and I believe I have done almost anything I can read in the Internet. Is

Drawable vs. Bitmap [duplicate]

六眼飞鱼酱① 提交于 2019-11-26 20:06:17
问题 This question already has answers here : What is the difference between Bitmap and Drawable in Android? (4 answers) Closed 3 years ago . I am writing a real-time game for Android, and after looking at some code from the samples provided in the SDK, I am confused as to when I should use Bitmap or Drawable for my sprites in my game. What's the difference? Which one is better (faster) for sprites and which one is better for a static background? 回答1: To get an idea which is better you may want to

Custom SSL handling stopped working on Android 2.2 FroYo

霸气de小男生 提交于 2019-11-26 18:18:53
For my app, Transdroid, I am connecting to remote servers via HTTP and optionally securely via HTTPS. For these HTTPS connections with the HttpClient I am using a custom SSL socket factory implementation to make sure self-signed certificates are working. Basically, I accept everything and ignore every checking of any certificate. This has been working fine for some time now, but it no longer work for Android 2.2 FroYo. When trying to connect, it will return an exception: java.io.IOException: SSL handshake failure: I/O error during system call, Broken pipe Here is how I initialize the

Why can't one add/remove items from an ArrayAdapter?

三世轮回 提交于 2019-11-26 17:28:30
问题 I am using an ArrayAdapter<CharSequence> to populate the items to list in a android.widget.Spinner . That works all fine. But now I want to keep the list of items dynamic, i.e. I want to be able to add/remove items from the selection list at runtime. However, when I call adapter.add(item) or adapter.remove(item) I always get a UnsupportedOperationException , even though the Javadocs of the ArrayAdapter class describe these two methods as to be usable for exactly that intended purpose. Is this

ADT requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be found

随声附和 提交于 2019-11-26 17:03:54
I'm installing the Android SDK on a fresh installation of Fedora 14 (Linux). I installed eclipse, and ran the tools/android sdk tool to install all the Eclipse components for the SDK. I was able to get DDMS to install when selecting it by itself. And for the last component - the Android developer tools, I'm getting the ugly error message pasted below. Now I'm Stuck in Eclipse dependency hell. I've searched through the available packages in Fedora and I can't find the one that has the files necessary to satisfy this Eclipse dependency. Can anybody please translate what it is that Eclipse is

Multiple alignment in TextView?

对着背影说爱祢 提交于 2019-11-26 16:15:14
问题 I have a TextView like below. I used this code to set gray color for a part of the text. // Prepare result text. final String resultText = text + "\n\n" + dictionaryName; final SpannableString styledResultText = new SpannableString(resultText); styledResultText.setSpan(new ForegroundColorSpan(Color.GRAY), text.length() + 2, text.length() + 2 + dictionaryName.length(), 0); resultTextView.setText(styledResultText); Now I want to set align for it. How to do? Android doesn't have any span class

SchemaFactory doesn&#39;t support W3C XML Schema in platform level 8?

被刻印的时光 ゝ 提交于 2019-11-26 14:34:02
问题 With the Android SDK, the following code in a plain empty Activity fails: @Override protected void onStart() { super.onStart(); SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); } The 2.2 emulator logcat shows this exception: 06-28 05:38:06.107: WARN/dalvikvm(495): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 06-28 05:38:06.128: ERROR/AndroidRuntime(495): FATAL EXCEPTION: main java.lang.RuntimeException: Unable to start

Android ADB device offline, can&#39;t issue commands

对着背影说爱祢 提交于 2019-11-26 12:41:05
I can't connect to my device anymore using ADB through the command line or in Eclipse . Running the command adb devices returns the device name, but it says it's offline. Things I've tried. Toggled Android debugging mode Reinstalled the Google USB driver Restored the OS to a previously working backup ( CyanogenMod ) Swapped the USB cord Rebooted the phone/computer multiple times Updated the Android SDK I really don't have any clue what's going on. Anything else you think I can try, I'm all ears. To be clear, if you're having this same issue the problem is probably an out-of-date SDK. As of 4.2

Android emulator: could not get wglGetExtensionsStringARB error

隐身守侯 提交于 2019-11-26 12:24:14
I am getting this error in the android emulator logs since I updated the SDKManager and ADT: [2012-07-10 15:51:23 - Emulator] could not get wglGetExtensionsStringARB What does it mean? And is there anything I can do about it? Prabhakar I faced the similar problem. In my case I had created the new virtual device and had enabled the snapshot. I just unchecked the checkbox Go to AVD Manager -> Select the device -> click Edit and uncheck the Enabled checkbox. I hope this works. Hoang Nguyen When you create the emulator, you need to choose properties CPU/ABI is Intel Atom (installed it in SDK