Android – delayed clicks in ListView

I have the following structure in my app: FragmentActivity with ViewPager holding multiple fragments managed by FragmentStatePagerAdapter using compativility pack with Android 2.1 Each fragment contains ListView. Each element in the ListView has a LinearLayout with two TextViews and a Button. The LinearLayout and the button have onClickListeners (separate). Clicking on the LinearLayout starts another […]

Eclipse not running Android app on emulator a second time

I’ve decided to teach myself how to program android apps, and so got the ADT onto eclipse and going through the tutorials on the android development page. I’ve run into a problem where eclipse doesn’t launch the emulator to run the app a second time. I first noticed the problem on the second tutorial talking […]

Get Canvas coordinates after scaling up/down or dragging in android

I’m developing an application in which I’m pasting images, doing drawing and painting on canvas. This app can also Scale up/down the canvas or drag it to different location. My problem is: I can’t get the correct canvas coordinates after scaling or dragging the canvas. I want to draw finger paint after the canvas is […]

Android take screenshot via code

This shouldn’t be too tough of a question. I want the ability to take a screenshot of my layout (view) and send it via sms. Can someone walk me though the steps? Thanks! Edit: It doesn’t have to be a ‘screenshot’ I guess, just as long as we can get all of the rendered pixels […]

AUDIO_OUTPUT_FLAG_FAST denied by client

I’m getting this AudioTrack warning AUDIO_OUTPUT_FLAG_FAST denied by client in my Android app for a button I’m subclassing. I can hear a click when tapping on the button so is this anything to worry about? Note: I’m not getting the mismatching sample rate message as in this question: AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client due to […]

What does Android's getMaxAmplitude() function for the MediaRecorder actually give me?

The Android MediaRecorder has a function .getMaxAmplitude(); which, as the API tells me, “Returns the maximum absolute amplitude that was sampled since the last call to this method.” but I can’t find what amplitude this is? Is it in pascal or watts? I have found on several pages on the web that you can calculate […]

When does isGooglePlayServicesAvailable return SERVICE_VERSION_UPDATE_REQUIRED?

According to the documentation GooglePlayServicesUtil.isGooglePlayServicesAvailable returns SERVICE_VERSION_UPDATE_REQUIRED when “The installed version of Google Play services is out of date”. Does this mean that there is a new version of google play services in the play store? Does this mean that the app needs a newer version than the one that is currently installed in the […]

How to check if all AsyncTasks finished?

I have 3 AsyncTasks and 1 ProgressBar. I want when any of task executes, the progress bar is visible and when all of them finish, the progress bar is invisible. In Java, there is ExecutorService::isTerminated to check if all runables finished but Android doesn’t. Update: 3 tasks execute at the same time. Figure.

How to send SMS with Delphi XE5 in Android

Does anybody know how to get this to work? The closest I got was the code below, but got no success. At first, it gives you some hope when it tells you need the SEND_SMS permission. But after you setup this permission, nothing happens! uses Androidapi.JNI.JavaTypes; procedure TForm1.Button1Click(Sender: TObject); var smsManager: JSmsManager; smsTo, smsFrom: JString; […]

Android: Call super() at the beginning or end of onStart(), onStop(), onDestroy() in activity?

Where in onStart(), onStop(), onDestroy() of an activity do I call super.onStart(), super.onStop(), super.onDestroy() ?

Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.