android

Android Installation. Problem with Android SDK.

i want to know how i can work with android sdk on my new machine. Windows 7 ...64 bit processor? When i 'm working in eclipse my ADt gets installed but when i try to add the virtual device the destination..path (SDK-2.2 or 2.1) is not displayed. ...

How to exit an application completely in ANDROID

I have an application.In that if we press on home button app closes but when i launch the app it resumes where i stopped.I mean it do not closed completely.how to solve this problem. ...

The performance of GestureOverlayView and GestureDetector

I am using GestureOverlayView with ViewFlipper, and it takes about one second for the android to recognize my gesture and flip to next view. However, the Android calendar flips almost immediately. I checked the Android calendar code, and it uses GestureDetector. Is there big difference between these two gesture detecting mechanisms? I ...

Problem saving the image in a particular directory in android

In my application in android 1.6 I m calling the default camera using Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); and mentioning output directory intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/image.jpg"))); This works fine. However, if I replace it by...

More than one worker threads with same priority as IntentService?

So from what I've known, if I do an AsyncTask inside an Activity, the task may be killed when user quits the Activity before it is finished. One solution I've seen is using IntentService, which the system will try hard not to kill. My problem is that IntentService only uses one background thread to run all the tasks one by one. I have s...

android AlertDialog get return value withouth handler

i would like to show a number of alertdialogs so the user has to handle off some questions (a little like a wizzard) is it possible to make the alertDialog wait until the user chooses something and then returning the choisen value? HashMap<Integer, Question> questions = DataConnector.getCallQuestions(position); int nextQuest...

How to create a fast auto dismiss message box under ANDROID ?

Hi, I need to create a similar function to Toast.makeText(...) but more fast to disappear. I have seen such messagebox in the software "Le monde fr" when you select a button from the toolbar down. Its appear and disappear very fast if you move to another icon. I m looking to do the same functionnality but cannot figure out how to do tha...

Handling click events on a drawable within an EditText

I have added an image right of the text in an EditText widget, using the following XML: <EditText android:id="@+id/txtsearch" ... android:layout_gravity="center_vertical" android:background="@layout/shape" android:hint="Enter place,city,state" android:drawableRight="@drawable/cross" /> But I want to clear the EditText when...

A Strange C++ code problem in NDK, Nexus One

Hi guys. I got a strange problem when I run my app on Nexus One, Android 2.2. In my app, I used a native .so lib, built under NDK. In Java code, I have 2 threads: one UI thread, one to run codes from native so lib, and then updates the UI with the result data. In C++ code, I have a global variable "int count", which records the times a s...

Does a serializable object always get serialized when put in a bundle?

We were wondering if when using Bundle with serializable or parcelable objects, when does the marshalling actually happen? As soon as you put it in the bundle? Since bundles are mostly used to simply pass around data between two screens (we're not even talking about IPC here!), there doesn't seem to be much point in marshalling an object...

How to animate a FadeOut and FadeIn while textView changed text

Hello, i try to animate a TextView on a changeText But always see only one direction of the animation, i only see the fadeout What i try is: beforChange = fadeOut and onChange or after fadein here is my code in the onCreate method of my activity: final Animation out = new AlphaAnimation(1.0f, 0.0f); out.setDuration(1000); ...

How to delete internal storage file in android?

Hello,I have used the android internal storage to save a file for my application (using openFileOutput) but I would like to delete that file,is it possible and how? thanks maxsap. ...

Android. GLSurfaceView doesn't become invisible

I have an activity with GLSurfaseView as content. I must do that view invisible on Back button pressed. I hold onKey method and, how it seems to me, make all as need. Code is here: public boolean onKey(View v, int keyCode, KeyEvent event) { return super.onKeyDown(keyCode, event); } @Override public boolean onKeyDown(int...

MyGlucoHealth Wireless Meter for Android via Bluetooth

I'm trying to create a app for android that retrieves the test results after the test is performed using the MyGlucoseHealth device. What should be my method of approach? How can I find out if there is a handshake method that is required in order to be able to talk to the device. What would the procedure be in order to start a connectio...

[Froyo] SurfaceFlinger receive wrong parameters while pressing power button for a while.

Dear ALL: I'm porting Froyo now but I met a strange issue. When I pressed the power button for a while, the device should have show a dialog to let me choose power off or other options. However, the dialog didn't show up. Instead of the dialog, I got some error msgs liking W/WindowManager( 1628): OutOfResourcesException creating su...

Android BiColored line

Hello, I have a line drawn vertically, let's say it has 100 pixels. I want to make this line half lenght white, half lenght red. Can I achieve this with a gradient ? I tried stuff like linePaint.setShader( new LinearGradient(x,y, x1, y2, new int[] { Color.WHITE, Color.RED}, null, Shader.TileMode.MIRROR)); canvas.drawLine(x,y,x1,y1,l...

android image transparency

Is there a way to load an image file into an ImageView object, and then define a transparent color for this object ? ...

What is the diff between windowBackground and windowFrame?

I am trying to set a window frame for all default Android applications. I know that in themes.xml, two attributes in the default theme can be used for this purpose; the windowFrame and windowBackground. What I want to know, is the exact difference between these two attributes. For instance, if I use the same drawable for either attribute...

Defining data encoding of SMS messages in Android

I'm working on an application using the SMS apis for android. The receiving end is an embedded unit that only supports 7-bit encoded SMS and the string I'm sending consists only of symbols from this particular alphabet which makes you think that Android is going to send it encoded as 7 bit. But that is not the case. Therefore I'm search...

Android - efficient screen update for surfaceview from int array of colors

Hi All, I'm writing an android game which involves updating a SurfaceView very often. This is working fine, but I would prefer if there was a way to only update a sub rectangle of the screen each time, as opposed to the whole screen. I know you can do this with bitmaps, but my animation is operating on a raw colour array (int[]) and I'm ...