0

Suppose i wrote a camera app by using and intent(MediaStore.ACTION_IMAGE_CAPTURE) and i notice that when i run the app, the option menu displays "Edit shortcuts", how can i add on to this option menu or completely override the option menu to my own?

Below are snippet of my code:

public class GPSCam extends Activity implements LocationListener,
    GpsStatus.Listener {

private Intent camIntent;

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_gpscam);
               ...
               ...
    this.startCamera();
}

protected void startCamera() {
              ...
    // create camera intent
    camIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    // define where to keep the photo
    camIntent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);

    // this method will call onActivityResult() upon finishing an activity
    // i.e. image captured
    startActivityForResult(camIntent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);
}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE) {
        if (resultCode == RESULT_OK) {
                  ...
                  ...
                  ...

} }

Sinus
  • 11
  • 2

1 Answers1

1

You cannot modify the options menus of other applications. If you do not want to use another application for taking photos, you are welcome to use the Camera object and take photos yourself.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491