1 package com.visagetechnologies.visagetrackerdemo;
3 import android.app.Activity;
4 import android.content.Intent;
5 import android.database.Cursor;
6 import android.view.WindowManager;
7 import android.net.Uri;
8 import android.os.Bundle;
9 import android.provider.MediaStore;
17 private static int RESULT_LOAD_IMAGE = 1;
23 public void onCreate(Bundle savedInstanceState) {
24 super.onCreate(savedInstanceState);
25 getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
27 Intent i =
new Intent(
29 android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
31 startActivityForResult(i, RESULT_LOAD_IMAGE);
40 super.onActivityResult(requestCode, resultCode, data);
42 if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {
43 Uri selectedImage = data.getData();
47 Bundle bundle =
new Bundle();
48 bundle.putString(
"imageURI", selectedImage.toString());
49 bundle.putInt(
"type", 1);
51 intent.putExtras(bundle);
52 startActivity(intent);
Activity called to initiate and control tracking for either tracking from camera or image...
Activity started when user interacts with Track from image button in StartupActivity.
void onCreate(Bundle savedInstanceState)
Implementation of onCreate method provided by Activity interface.
void onActivityResult(int requestCode, int resultCode, Intent data)
Called when user selects image.