[Android Software Development] imso:
This is the java file that performs the recording process

public class ServiceRecording extends Service {

@Override
public IBinder onBind(Intent intent) {
// TODO Auto-generated method stub
return null;
}

private SurfaceView surfaceView;
private SurfaceHolder surfaceHolder;
public static Camera ServiceCamera;
public static boolean recordingStatus;

@Override
public void onCreate() {
super.onCreate();

recordingStatus = false;
ServiceCamera = CameraTest.MainCamera;
surfaceView = CameraTest.surfaceView;
surfaceHolder = CameraTest.surfaceHolder;
}

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
super.onStartCommand(intent, flags, startId);
if (recordingStatus == false)
startRecording();

return START_STICKY;
}

@Override
public void onDestroy() {
super.onDestroy();

stopRecording();
//camera.stopPreview();
recordingStatus = false;
//camera.release();
}

private MediaRecorder mediaRecorder;
private final int maxDurationInMs = 20000;

private static final String TAG = "Exception";

public boolean startRecording(){
try {
Toast.makeText(getBaseContext(), "Recording Started", Toast.LENGTH_SHORT).show();
try{
ServiceCamera.reconnect();
ServiceCamera.unlock();
}
catch(Exception e){

}

mediaRecorder = new MediaRecorder();

mediaRecorder.setCamera(ServiceCamera);

mediaRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);

mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);

mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);

mediaRecorder.setMaxDuration(maxDurationInMs);

mediaRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);

mediaRecorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT);

//mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH_mm_ss");
Date date = new Date();
File dirlist = new File(Environment.getExternalStorageDirectory() + "/VideoList");

if(!(dirlist.exists()))
dirlist.mkdir();

File TempFile = new File(Environment.getExternalStorageDirectory() + "/VideoList", dateFormat.format(date) + ".3gp");
mediaRecorder.setOutputFile(TempFile.getPath());

mediaRecorder.setVideoSize(surfaceView.getWidth(),surfaceView.getHeight());

//mediaRecorder.setVideoFrameRate(videoFramesPerSecond);

mediaRecorder.setPreviewDisplay(surfaceHolder.getSurface());

mediaRecorder.prepare();
mediaRecorder.start();

recordingStatus = true;

return true;
}

catch (IllegalStateException e) {
Log.d(TAG,e.getMessage());
e.printStackTrace();
return false;
}
catch (IOException e) {
Log.d(TAG,e.getMessage());
e.printStackTrace();
return false;
}
}

public void stopRecording() {
Toast.makeText(getBaseContext(), "Recording Stopped", Toast.LENGTH_SHORT).show();

mediaRecorder.reset();
mediaRecorder.release();

recordingStatus = false;
}
}

My Tab1Activity.java file which initialized the preference but how am i going to allow the storage of user data for configuring the camera setting

[CODE]public class Tab1Activity extends PreferenceActivity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.tab1);

}
}

[/CODE]

This is the xml file which uses preferences but i'm kinna face with the problem on how am i going to retrieve the available phone resolution to allow the user to configure at the ListPreference area..

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory
android:title="Video">
<CheckBoxPreference
android:title="Audio"
android:defaultValue="True"
android:summary="Select w/o Audio"
android:key="AudioPref" />
<ListPreference
android:title="Video Encoder"
android:summary="Select the video encoding type"
android:key="EncodingPref"
android:defaultValue="3gp"
android:entries="@array/EncodingType"
android:entryValues="@array/updateEncodingType" />
<ListPreference
android:title="Video Resolution"
android:summary="Select the video resolution"
android:key="ResolutionPref"
android:defaultValue="1"
android:entries="@array/VideoResolution"
android:entryValues="@array/updateVideoResolution" />
</PreferenceCategory>
</PreferenceScreen>