mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
Wiring the camera to the DroidGap
This commit is contained in:
parent
32cc9492a6
commit
8c5f2ce916
@ -27,6 +27,7 @@ import java.lang.reflect.Field;
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.Configuration;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
@ -127,4 +128,18 @@ public class DroidGap extends Activity {
|
||||
}
|
||||
}
|
||||
|
||||
// This is required to start the camera activity! It has to come from the previous activity
|
||||
public void startCamera()
|
||||
{
|
||||
Intent i = new Intent(this, CameraPreview.class);
|
||||
startActivityForResult(i, 0);
|
||||
}
|
||||
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent intent)
|
||||
{
|
||||
super.onActivityResult(requestCode, resultCode, intent);
|
||||
Bundle extras = intent.getExtras();
|
||||
// Send the graphic back to the class that needs it
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user