Camera code, adding the Commons Codec to the repo, need to read the licence to see whether we can include it

This commit is contained in:
Joe Bowser
2009-07-30 16:56:07 -07:00
parent 8c5f2ce916
commit 87f91602f7
6 changed files with 65 additions and 19 deletions
+10 -4
View File
@@ -45,7 +45,7 @@ public class DroidGap extends Activity {
private PhoneGap gap;
private GeoBroker geo;
private AccelListener accel;
private CameraLauncher launcher;
/** Called when the activity is first created. */
@Override
@@ -64,6 +64,9 @@ public class DroidGap extends Activity {
appView.getSettings().setJavaScriptEnabled(true);
appView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
launcher = new CameraLauncher(appView, this);
/* Bind the appView object to the gap class methods */
bindBrowser(appView);
@@ -128,6 +131,7 @@ public class DroidGap extends Activity {
}
}
// This is required to start the camera activity! It has to come from the previous activity
public void startCamera()
{
@@ -137,9 +141,11 @@ public class DroidGap extends Activity {
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
byte [] data;
super.onActivityResult(requestCode, resultCode, intent);
data = intent.getByteArrayExtra("picture");
// Send the graphic back to the class that needs it
launcher.processPicture(data);
}
}