android-2.2-froyo

How to disconnect an HttpUrlConnection on HTC (Froyo and below) phones?

一个人想着一个人 提交于 2019-12-07 05:28:20
问题 I need to disconnect a long polling http request from the client side in some cases. The relevant part of the HttpUrlConnection I make to the server is as follows (all the code below is within a Thread's run() method): try { URL url = new URL(requestURL); connection = (HttpURLConnection) url.openConnection(); connection.setRequestProperty("Accept-Charset", "UTF-8"); connection.setConnectTimeout(5 * 1000); connection.setReadTimeout(60 * 1000); connection.setRequestMethod("GET"); // read the

Does android have a built-in PDF viewer?

拥有回忆 提交于 2019-12-07 04:15:52
问题 I heard something recently about it being included in Froyo and I was wondering if there was any truth to it. If there is, it would help me with an app idea greatly. 回答1: You are probably referring to the Adobe Reader, which is freely available for Android 2.1+. Some devices also have other applications pre-installed for rendering pdf files. See this question on how you can open the default pdf viewer from your application. 回答2: Android has a built in framework from Android 5.0 / Lollipop, it

cordova-android ./create $( which android ) exited with a 1

落爺英雄遲暮 提交于 2019-12-07 03:37:30
After executing the command to create a project... ./create <PATH_TO_PROJECT_DIR> <COM_PATH> <PROJECT_NAME> I get the error message: An unexpected error occurred: ANDROID_BIN="${ANDROID_BIN:=$( which android )}" exited with 1 Deleting project... Troubleshooting responses: (acconrad provided a smart checklist here for solving Cordova errors...) Did you download the correct version of PhoneGap from the correct LOCATION? It appears as if there are versions of PhoneGap that do not come packaged with Cordova-2.x.0.jar, which is necessary to run the script. Download here to obtain PhoneGap with the

Retrieve minSdkVersion programmatically

萝らか妹 提交于 2019-12-06 16:39:21
I have set the minSdkVersion in the manifest. Now I want to retrieve it in the code. It should be easy but I'm not getting it. How can I do that? minSDKVersion is one of the settings in the Android manifest for which there is no API to read the value. It's not impossible to get hold of - you just end up having to read the AndroidManifest.xml file yourself via XmlResourceParser parser = getResources().getAssets().openXmlResourceParser("AndroidManifest.xml") and then parsing the appropriate information out of it. I think what you probably actually want to be doing is retrieving the SDK version

Usable VideoView source code for Android 2.2

人盡茶涼 提交于 2019-12-06 15:35:51
I am building my own view for displaying videos, and I would like to base the custom view on the built-in Android VideoView. I'm therefore looking for the source code to VideoView. Most posts I've found on Stackoverflow and elsewhere point to grepcode. Unfortunately, the code on grepcode doesn't seem to be the code documented on developer.android.com and isn't very usable. For example, the VideoView.java on grepcode references an mContext object which is inherited from View, but not available in the View of the developer.android.com sdk. In addition, the VideoView calls a resume method of

How to find the gps in the android device is correctly working or not?

荒凉一梦 提交于 2019-12-06 12:47:25
问题 I'm developing an android application for mobiles and tablets. I'm using android version 2.2 , API 8. In my application, I want to capture the location co-ordinates via gps and send to server. It's working fine . When I working in my office (near to my office) the gps - co-ordinates captured correctly in android devices But in only one device the co-ordinates captured wrongly. I'm in Alwarpet,chennai,india .But, I run that device it shows " Andra pradesh" or bay of "bengal ".But all other

No Such table in API 2.2

ぃ、小莉子 提交于 2019-12-06 08:59:10
Everything goes successful in my app in higher versions, but in the lower versions like 2.2 the app crashes while fetching data from database with this error 07-17 21:46:36.361: I/Database(520): sqlite returned: error code = 1, msg = no such table: Schedules 07-17 21:46:36.371: W/System.err(520): android.database.sqlite.SQLiteException: no such table: Schedules: , while compiling: SELECT DISTINCT * FROM Schedules 07-17 21:46:36.391: W/System.err(520): at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method) 07-17 21:46:36.391: W/System.err(520): at android.database.sqlite

Serial Execution of multiple AsyncTasks

大兔子大兔子 提交于 2019-12-06 08:15:25
问题 Does anyone know how to easily arrange multiple calls to an AsyncTask execution in a queue or something and then execute them in a serial fashion? I want the called async task to wait while the one before it is finished, but is seems I can't accomplish this, even if I test the status of the one currently being executed. Any ideas how to solve this? I've seen that in the honeycomb API there is a method executeOnExecutor() with a SERIAL_EXECUTOR , I guess it implements what I've described.

Android:Problem in passing image and its URI between two activities

折月煮酒 提交于 2019-12-06 05:54:03
问题 Can we pass image and an image URI to other activity in same application using bundle?suggest me some way to do that? USAGE : actually i have made an activity that crop an image taken from camera or from image stored in SD card depends upon the user. and another app that uses a background image and a border image both are overlay so as to see PHOTOFRAME . So now I want to combine both app so that the cropped image come from first app should become the background image for the second app.ie

Sencha Touch, OpenLayers, GeoServer: Wrong encoding on devices using Android 2.2

血红的双手。 提交于 2019-12-06 04:36:40
This question was migrated from Geographic Information Systems Stack Exchange because it can be answered on Stack Overflow. Migrated 8 years ago . I have created a small test page using Sencha Touch , OpenLayers and I am recieving WMS/WFS data from a GeoServer . I have set the encoding on my HTML page to UTF-8: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> I pull some WFS data from my GeoServer using the following statement: var post = new OpenLayers.Request.POST({ url: 'dataprovider.ashx', data: ..., headers: { "Content-Type": "text/xml;charset=utf-8" }, callback: