android-2.2-froyo

Can I take a picture using the front camera on Samsung Galaxy Tab (Android 2.2) ?

回眸只為那壹抹淺笑 提交于 2019-12-24 16:03:27
问题 Can I take a picture from the front camera? My application has an input form for inventory. If an user sends a data, the user's face pic is also sent to the server for authorization / validation. I will put the app on Samsung Galaxy Tab (Android 2.2). Is there any way to take a picture from the front camera? 回答1: For 2.2 Camera cam = Camera.open(); cam.setDisplayOrientation(90); cam.setPreviewDisplay(holder); Camera.Parameters para = cam.getParameters(); para.set("camera-id", 2); cam

Android: NullPointerException on getWritableDatabase()

萝らか妹 提交于 2019-12-24 03:23:42
问题 Here is where I try to access the database: UserDataAdapter dbHelper = new UserDataAdapter(this); dbHelper.open(); dbHelper.createNetwork(network); dbHelper.close(); UserDataAdapter.java: public UserDataAdapter open() throws SQLException { dbHelper = new DatabaseHelper(context); // of class DatabaseHelper database = dbHelper.getWritableDatabase(); // this line!! return this; } DatabaseHelper.java: public DatabaseHelper(Context context) { super(context, Defines.DATABASE_NAME, null, Defines

Why is java.text.Normalizer available on my Android 2.2 phone?

倖福魔咒の 提交于 2019-12-23 04:00:07
问题 This thing baffle me... I was checking my code, and decided to change the build target from 2.3 to 2.2 to make sure every 2.3 API that I use is wrapped in a nice android.os.Build.VERSION.SDK_INT check. But somewhere I make a call to java.text.Normalizer.normalize() that does not check for the SDK version. Curious as why this wasn't found by QA, I started the app on a 2.2 phone in debug mode and it works fine ! The phone is a LG-P505R version 2.2.2. So, why does this 2.2 phone can call some

Android: Camera Preview Orientation on HTC EVO (Android 2.1 or 2.2)

旧城冷巷雨未停 提交于 2019-12-23 03:26:20
问题 I am developing an Android application that relies on the camera API, using an HTC EVO as my testing device. No matter what I've tried so far, the only time the camera preview looks right is in landscape mode (90 degrees rotation, to be specific). It seems as though there is no way to orient the preview correctly when in portrait mode (0 degrees rotation). The default camera application on the device (for HTC Sense) allows for any kind of rotation without any problem, so I know that there is

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

天大地大妈咪最大 提交于 2019-12-23 03:20:49
问题 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

Does Android application development Guideline allow disabling Default Menu and back button for particular application?

吃可爱长大的小学妹 提交于 2019-12-23 00:49:24
问题 In my application there are some buttons that are very near to that device default back button and Menu Button. Thus I got problem while pressing that My application button which are near to Menu and Back button. So for that application purpose I want to disable the default back and Menu Button. So does Android Application development Guideline allow if we want to disable the back and Menu Button during particular application? If yes then how is it possible? Thanks. 回答1: So is Android

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

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-22 09:40:12
问题 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: function (response) { ... }, }); Which I believe

Downloading files in API <9

流过昼夜 提交于 2019-12-22 08:35:50
问题 I just realized that my app, with over 300 users still using an Android version under Gingerbread, is having issues for them because they dont have the DownloadManager that was introduced in API 9 (2.3). Is there a compatibility library or something that I can use or is my best best just to use an asyncTask to download the files manually? 回答1: Is there a compatibility library or something that I can use No, DownloadManager is not in the Android Support package. I took a look at making my own

Viewflipper Receiver not registered error while orientation change in 2.1 and 2.2

为君一笑 提交于 2019-12-22 08:13:54
问题 I am using viewflipper for fling gesture recognition everything works fine for 2.0 and prior but in 2.2 and 2.1 it throws exception as "java.lang.IllegalArgumentException: Receiver not registered: android.widget.ViewFlipper" below is full debug trace. java.lang.IllegalArgumentException: Receiver not registered: android.widget.ViewFlipper$1@452f8398 09-19 11:33:06.825: ERROR/AndroidRuntime(393): at android.app.ActivityThread$PackageInfo.forgetReceiverDispatcher(ActivityThread.java:793) 09-19

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first

走远了吗. 提交于 2019-12-22 04:57:43
问题 This is my code: Frame.gameController.test(); setContentView(Frame.world.getScreen()); Frame.world.setRunning(true); On the second line I am getting the following error: ERROR/AndroidRuntime(15229): Caused by: java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. Can anyone help me solve it? Previously it was working just fine, the problem starts when I take it in another activity. I'm using android 2.2. 回答1: You can