5B4AIT Calendar

June 2012
M T W T F S S
« May   Jul »
 123
45678910
11121314151617
18192021222324
252627282930  

HamSphere Forums

HamSphere info

Yahoo! Weather Forecasts

Cyprus Mail News

Monthly Archives: June 2012

Android performance Fixes

Finally I found what caused the audio to be so gappy on TX.

First of all. All views need to be using SurfaceView with lowest Thread priority. Like this example below. The Band Scope monitor that was really draining all resources. So instead of extending View, you extend SurfaceView that implemements a callback feature.
The SurfaceView is an extension of the Android View object and it provides a set of functions to manually take control of the onDraw event that draws the things on the screen.

Basically I set up a worker thread that does the calculations and in that same thread I invoke the onDraw call.

public class ADFFTMonitor extends SurfaceView implements SurfaceHolder.Callback {

// Then start a worker Thread and pass the callback to the Thread.

getHolder().addCallback(this);
_thread = new FFTThread(getHolder(), this);
_thread.setPriority(Thread.MIN_PRIORITY);

// The override surfaceCreated and make the thread start when the object is created.

@Override
public void surfaceCreated(SurfaceHolder holder) {
_thread.setRunning(true);
_thread.start();
}

class FFTThread extends Thread {

c = _surfaceHolder.lockCanvas();
_panel.onDraw(c);
_surfaceHolder.unlockCanvasAndPost(c);

// And most importantly, wait a lot to let the audio framwork work as much as possible.

try {
Thread.sleep(100); // sleep 100 ms
} catch (InterruptedException ie) {
}

First QSOs

Today I have made successful QSO from 5B4AIT/P via my Android Phone for test purposes.
Audio was reportedly crappy and gappy. This is due to the fact that the Android phone has very limited resources. I have been forced to rewrite some parts of the code to harness the power of the Samsung phone as well as the Android Ice Cream Sandvich 4.0 operating system.

Stations worked:

S56LXB
EI7CHB
26HS3701
PU1PML
IK5EED
UX4CR
115HS148
2HS464
44HS414
50HS100
91HS576

Android Development

Latest update

Hi All, haven’t written much on my blog lately. Been busy with software development.

Trying to focus on the Android development. It is good to be back in the Java environment but frustrating that Android has left some rather good libs from the standard Java lib. A few workarounds needed.

73

Kelly

 

 

HamSphere on Android

Audio drivers and codecs ready.

Solar-Terrestrial Data

free counters

IP address

Tag Cloud