package org.openalpr.app;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.view.View;
import android.widget.TextView;

/**
 * Created by Anthony Brignano on 2/26/16.
 *
 * HomeActivity: Allows for basic navigation between application views
 *      (associated view activity_home)
 *
 *      - redirectToInbox(View): redirects user to InboxActivity.java (activity_inbox.xml) on click
 *      - redirectToCamera(View): redirects user to CameraActivity.java (activity_camera.xml) on click
 *      - onCreate(Bundle)
 *
 * date@(7.3.2016) editor@(cameronDz)
 * Set welcome message to include globally stored username
 */

public class HomeActivity extends AppCompatActivity {
    private String TAG = "HomeActivity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        Log.d(TAG, "onCreate method");
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_home);

        // Locate and set TextView that displays welcome message
        TextView welcome_text =(TextView)findViewById(R.id.text_welcome);
        String message = "Welcome " + Variables.username + "!";
        welcome_text.setText(message);
    }

    public void redirectToInbox(View view) {
        Log.d(TAG, "Inbox Button Pressed");
        Intent intent = new Intent(this, InboxActivity.class);
        startActivity(intent);
    }

    public void redirectToCamera(View view) {
        Log.d(TAG, "Camera Button Pressed");
        Intent intent = new Intent(this, CameraActivity.class);
        startActivity(intent);
    }

    public void redirectToMap(View view) {
        Log.d(TAG, "Map Button Pressed");
        Intent intent = new Intent(this, MapActivity.class);
        startActivity(intent);
    }

    public void redirectToConfirmPlate(View view) {
        Log.d(TAG, "Confirm Plate Button Pressed");
        Intent intent = new Intent(this, ConfirmPlateActivity.class);
        startActivity(intent);
    }
}

@@ -204,16 +204,258 @@
 et.T
-extView;
+oast;%0Aimport android.widget.TextView;%0A%0A// some of these might not be needed%0Aimport android.location.Location;%0Aimport android.location.LocationManager;%0Aimport android.location.LocationListener;%0Aimport com.google.android.gms.location.LocationListener;%0A
 %0A%0A/*
@@ -1780,32 +1780,317 @@
 ssed%22);%0A        
+%0A        // detect whether location is on or not%0A        LocationManager locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);         %0A        if( locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER) )%7B%0A            // send user to camera view%0A            
 Intent intent = 
@@ -2129,32 +2129,36 @@
 class);%0A        
+    
 startActivity(in
@@ -2156,32 +2156,218 @@
 tivity(intent);%0A
+        %7D else %7B%0A            // notify user to turn location on%0A            Toast.makeText(getContext(), %22Turn GPS location on to use Camera Mode%22, Toast.LENGTH_SHORT).show();%0A        %7D%0A
     %7D%0A%0A    publi

Update HomeActivity.java