See the CameraDeviceMenu.cs script which comes with the samples for examples of how to access the camera and also draw GUI elements on screen.
To trigger a focus operation use ...
CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_TRIGGERAUTO);
To close the application use ...
Application.Quit();
e.g.
OnGUI(){
if( GUILayout.Button("exit") )
Application.Quit();
}
To catch touch events you can try ..
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
public class OnTouchDown : MonoBehaviour
{
void Update () {
RaycastHit hit = new RaycastHit();
for (int i = 0; i < Input.touchCount; ++i) {
if (Input.GetTouch(i).phase.Equals(TouchPhase.Began)) {
CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_TRIGGERAUTO);
}
}
}
}
To install on SD memory, add the installLocation attribute to your Android Manifest.
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.qualcomm.QCARUnityPlayer"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto"
>
You can find AndroidManifest.xml in /Plugins/Android in your Unity Project panel. This will give you the option to transfer the APK to external storage.
Don't use RaycastHit hit = new RaycastHit(); when capturing the touch - that's from code I'd copied for the example.