Search in sources :

Example 1 with TAG

use of android.content.ContentValues.TAG in project FirstResponse by mattpost1700.

the class EventFragment method onCreateView.

@SuppressLint("SetTextI18n")
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    // binding fragment with nav_map by using navHostFragment, throw this block of code in there and that allows you to switch to other fragments
    binding = DataBindingUtil.inflate(inflater, R.layout.fragment_event, container, false);
    NavHostFragment navHostFragment = (NavHostFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
    NavController navController = navHostFragment.getNavController();
    // initialize vars as well as fetching userID
    participants = new ArrayList<>();
    ActiveUser activeUser = (ActiveUser) getActivity();
    UsersDataModel user = activeUser.getActive();
    userID = user.getDocumentId();
    // getting data from event group
    mViewModel = new ViewModelProvider(requireActivity()).get(EventViewModel.class);
    eventInfo = mViewModel.getEventDetail();
    isParticipating = eventInfo.getParticipants().contains(user.getDocumentId());
    EventRecyclerViewAdapter.ItemClickListener listener = (view, pos) -> {
        UsersDataModel u = participants.get(pos);
        UserViewModel userViewModel = new ViewModelProvider(requireActivity()).get(UserViewModel.class);
        userViewModel.setUserDataModel(u);
        NavDirections action = EventFragmentDirections.actionEventFragmentToUserFragment();
        Navigation.findNavController(binding.getRoot()).navigate(action);
    };
    // recycler binding
    RecyclerView eventRecyclerView = binding.eventEventRecycler;
    eventRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));
    eventRecyclerViewAdapter = new EventRecyclerViewAdapter(getContext(), participants, isAnyParticipants);
    eventRecyclerViewAdapter.setClickListener(listener);
    eventRecyclerView.setAdapter(eventRecyclerViewAdapter);
    updateUI(false);
    final SwipeRefreshLayout pullToRefresh = binding.eventRefreshLayout;
    pullToRefresh.setOnRefreshListener(() -> {
        participants.clear();
        updateUI(true);
        pullToRefresh.setRefreshing(false);
    });
    addParticipatingEventListener();
    binding.signUp.setOnClickListener(v -> {
        if (binding.signUp.getText().equals("Withdraw")) {
            eventInfo.getParticipants().remove(userID);
            db.collection(FirestoreDatabase.EVENTS_COLLECTION_DIR).document(eventInfo.getDocumentId()).set(eventInfo).addOnSuccessListener(documentReference -> {
                isParticipating = false;
                binding.signUp.setText("Sign Up");
            }).addOnFailureListener(e -> Log.w(TAG, "onCreateView: Could not update event UI", e));
        } else {
            eventInfo.getParticipants().add(userID);
            db.collection(FirestoreDatabase.EVENTS_COLLECTION_DIR).document(eventInfo.getDocumentId()).set(eventInfo).addOnSuccessListener(documentReference -> {
                isParticipating = true;
                binding.signUp.setText("Withdraw");
            }).addOnFailureListener(e -> Log.w(TAG, "onCreateView: Could not update event UI", e));
            // sends the event that includes the following:
            // title, location, description, duration
            Intent intent = new Intent(Intent.ACTION_INSERT);
            intent.setData(CalendarContract.Events.CONTENT_URI);
            intent.putExtra(CalendarContract.Events.TITLE, eventInfo.getTitle());
            intent.putExtra(CalendarContract.Events.EVENT_LOCATION, eventInfo.getLocation());
            intent.putExtra(CalendarContract.Events.DESCRIPTION, eventInfo.getDescription());
            intent.putExtra(CalendarContract.Events.DURATION, eventInfo.getDuration_in_minutes());
            if (intent.resolveActivity(requireContext().getPackageManager()) != null) {
                startActivity(intent);
            } else {
                Log.d("EVENT INTENT: ", "Event setup Failed");
            }
        // // Calendar intent
        // Calendar cal = Calendar.getInstance();
        // Intent intent = new Intent(Intent.ACTION_EDIT);
        // long startTime = eventInfo.getEvent_time().toDate().toInstant().toEpochMilli();
        // intent.putExtra("beginTime", startTime);
        // //intent.putExtra("allDay", true);
        // intent.putExtra("endTime", startTime + AppUtil.numOfMinutesToMilliSeconds(eventInfo.getDuration_in_minutes()));
        // intent.putExtra("title", "A Test Event from android app");
        // startActivity(intent);
        }
    });
    return binding.getRoot();
}
Also used : Bundle(android.os.Bundle) PackageManager(android.content.pm.PackageManager) NonNull(androidx.annotation.NonNull) Date(java.util.Date) Uri(android.net.Uri) CalendarContract(android.provider.CalendarContract) NavController(androidx.navigation.NavController) EventsDataModel(com.example.first_responder_app.dataModels.EventsDataModel) ActiveUser(com.example.first_responder_app.interfaces.ActiveUser) Manifest(android.Manifest) FieldPath(com.google.firebase.firestore.FieldPath) ContentResolver(android.content.ContentResolver) Locale(java.util.Locale) Fragment(androidx.fragment.app.Fragment) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) Log(android.util.Log) NavHostFragment(androidx.navigation.fragment.NavHostFragment) DataBindingUtil(androidx.databinding.DataBindingUtil) Timestamp(com.google.firebase.Timestamp) NavDirections(androidx.navigation.NavDirections) AppUtil(com.example.first_responder_app.AppUtil) IncidentViewModel(com.example.first_responder_app.viewModels.IncidentViewModel) ViewGroup(android.view.ViewGroup) R(com.example.first_responder_app.R) Objects(java.util.Objects) List(java.util.List) Nullable(androidx.annotation.Nullable) ContentValues(android.content.ContentValues) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) EventViewModel(com.example.first_responder_app.viewModels.EventViewModel) SimpleDateFormat(java.text.SimpleDateFormat) Intent(android.content.Intent) FragmentEventBinding(com.example.first_responder_app.databinding.FragmentEventBinding) ArrayList(java.util.ArrayList) SuppressLint(android.annotation.SuppressLint) Calendar(java.util.Calendar) QueryDocumentSnapshot(com.google.firebase.firestore.QueryDocumentSnapshot) Toast(android.widget.Toast) ListenerRegistration(com.google.firebase.firestore.ListenerRegistration) TAG(android.content.ContentValues.TAG) EventRecyclerViewAdapter(com.example.first_responder_app.recyclerViews.EventRecyclerViewAdapter) DocumentSnapshot(com.google.firebase.firestore.DocumentSnapshot) UsersDataModel(com.example.first_responder_app.dataModels.UsersDataModel) ViewModelProvider(androidx.lifecycle.ViewModelProvider) LayoutInflater(android.view.LayoutInflater) ActivityCompat(androidx.core.app.ActivityCompat) SwipeRefreshLayout(androidx.swiperefreshlayout.widget.SwipeRefreshLayout) User(com.google.firebase.firestore.auth.User) FirestoreDatabase(com.example.first_responder_app.FirestoreDatabase) UserViewModel(com.example.first_responder_app.viewModels.UserViewModel) FirebaseFirestore(com.google.firebase.firestore.FirebaseFirestore) Navigation(androidx.navigation.Navigation) UsersDataModel(com.example.first_responder_app.dataModels.UsersDataModel) NavController(androidx.navigation.NavController) Intent(android.content.Intent) EventRecyclerViewAdapter(com.example.first_responder_app.recyclerViews.EventRecyclerViewAdapter) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) SwipeRefreshLayout(androidx.swiperefreshlayout.widget.SwipeRefreshLayout) NavDirections(androidx.navigation.NavDirections) EventViewModel(com.example.first_responder_app.viewModels.EventViewModel) UserViewModel(com.example.first_responder_app.viewModels.UserViewModel) ActiveUser(com.example.first_responder_app.interfaces.ActiveUser) RecyclerView(androidx.recyclerview.widget.RecyclerView) NavHostFragment(androidx.navigation.fragment.NavHostFragment) ViewModelProvider(androidx.lifecycle.ViewModelProvider) SuppressLint(android.annotation.SuppressLint)

Example 2 with TAG

use of android.content.ContentValues.TAG in project FirstResponse by mattpost1700.

the class ReportFragment method onCreateView.

@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    binding = DataBindingUtil.inflate(inflater, R.layout.fragment_report, container, false);
    NavHostFragment navHostFragment = (NavHostFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
    View bindingView = binding.getRoot();
    activeUser = AppUtil.getActiveUser(getActivity());
    if (activeUser == null) {
        getActivity().getFragmentManager().popBackStack();
        Toast.makeText(getContext(), "User is not logged in!", Toast.LENGTH_SHORT).show();
    }
    ReportViewModel mViewModel = new ViewModelProvider(requireActivity()).get(ReportViewModel.class);
    incident = mViewModel.getIncidentDataModel();
    setText();
    binding.floatingActionButton.setOnClickListener(view -> {
        // Send to db
        // String fire_department_id, String incident_id, String user_created_id, String address, String units, String box_number, String incident_type, String narrative) {
        ReportDataModel report = null;
        try {
            report = new ReportDataModel(activeUser.getFire_department_id(), incident.getDocumentId(), activeUser.getDocumentId(), binding.addressTextView.getText().toString(), binding.unitsTextView.getText().toString(), binding.boxNumberTextView.getText().toString(), binding.incidentTypeTextView.getText().toString(), binding.reportOfficerText.getText().toString());
        } catch (NullPointerException nullPointerException) {
            report = null;
            Toast.makeText(getActivity(), "You must fill out the whole form", Toast.LENGTH_SHORT).show();
        }
        if (report != null) {
            FirestoreDatabase.getInstance().getDb().collection(FirestoreDatabase.REPORTS_COLLECTION_DIR).add(report).addOnSuccessListener(documentReference -> {
                Log.d(TAG, "onCreateView: added " + documentReference);
                Toast.makeText(getActivity(), "Report saved!", Toast.LENGTH_SHORT).show();
                NavDirections action = ReportFragmentDirections.actionReportFragmentToIncidentFragment();
                Navigation.findNavController(binding.getRoot()).navigate(action);
            }).addOnFailureListener(e -> Log.e(TAG, "onCreateView: Failed to upload document!", e));
        }
    });
    return bindingView;
}
Also used : ReportViewModel(com.example.first_responder_app.viewModels.ReportViewModel) Bundle(android.os.Bundle) NonNull(androidx.annotation.NonNull) Date(java.util.Date) SimpleDateFormat(java.text.SimpleDateFormat) IncidentDataModel(com.example.first_responder_app.dataModels.IncidentDataModel) Locale(java.util.Locale) Toast(android.widget.Toast) Fragment(androidx.fragment.app.Fragment) View(android.view.View) ReportViewModel(com.example.first_responder_app.viewModels.ReportViewModel) TAG(android.content.ContentValues.TAG) FragmentReportBinding(com.example.first_responder_app.databinding.FragmentReportBinding) Log(android.util.Log) NavHostFragment(androidx.navigation.fragment.NavHostFragment) DataBindingUtil(androidx.databinding.DataBindingUtil) ReportDataModel(com.example.first_responder_app.dataModels.ReportDataModel) UsersDataModel(com.example.first_responder_app.dataModels.UsersDataModel) ViewModelProvider(androidx.lifecycle.ViewModelProvider) NavDirections(androidx.navigation.NavDirections) LayoutInflater(android.view.LayoutInflater) Timestamp(java.sql.Timestamp) AppUtil(com.example.first_responder_app.AppUtil) FirestoreDatabase(com.example.first_responder_app.FirestoreDatabase) ViewGroup(android.view.ViewGroup) R(com.example.first_responder_app.R) Nullable(androidx.annotation.Nullable) Navigation(androidx.navigation.Navigation) ReportDataModel(com.example.first_responder_app.dataModels.ReportDataModel) NavHostFragment(androidx.navigation.fragment.NavHostFragment) View(android.view.View) ViewModelProvider(androidx.lifecycle.ViewModelProvider) NavDirections(androidx.navigation.NavDirections)

Example 3 with TAG

use of android.content.ContentValues.TAG in project FirstResponse by mattpost1700.

the class UserFragment method onCreateView.

@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    FragmentUserBinding binding = DataBindingUtil.inflate(inflater, R.layout.fragment_user, container, false);
    NavHostFragment navHostFragment = (NavHostFragment) getActivity().getSupportFragmentManager().findFragmentById(R.id.nav_host_fragment);
    mViewModel = new ViewModelProvider(requireActivity()).get(UserViewModel.class);
    user = mViewModel.getUserDataModel();
    profilePictureImageView = binding.userProfilePictureImageView;
    // Get active user id
    ActiveUser active = (ActiveUser) getActivity();
    if (active != null) {
        activeUser = active.getActive();
    }
    // TODO: navCont created for side bar(still need to be implemented)
    NavController navController = navHostFragment.getNavController();
    boolean THIS_IS_CURRENT_USER = user != null && activeUser != null && activeUser.getDocumentId().equals(user.getDocumentId());
    if (THIS_IS_CURRENT_USER) {
        binding.userSendMessageFab.setVisibility(View.GONE);
        binding.userEditFab.setOnClickListener(v -> {
            NavDirections action = UserFragmentDirections.actionUserFragmentToEditUserFragment2();
            Navigation.findNavController(binding.getRoot()).navigate(action);
        });
    } else {
        binding.userEditFab.setVisibility(View.GONE);
        binding.userSendMessageFab.setOnClickListener(v -> {
            Snackbar.make(getView(), "Send msg!", Snackbar.LENGTH_SHORT).show();
        // TODO: Send message
        });
    }
    setText(binding);
    try {
        final File localFile = File.createTempFile("Images", "bmp");
        StorageReference ref = FirestoreDatabase.profilePictureRef.child(user.getRemote_path_to_profile_picture());
        ref.getFile(localFile).addOnSuccessListener(bytes -> {
            try {
                profilePictureImageView.setImageBitmap(BitmapFactory.decodeFile(localFile.getAbsolutePath()));
            } catch (Exception e) {
                Log.d(TAG, "onCreateView: No profile picture found");
            }
        }).addOnFailureListener(e -> {
            Log.w(TAG, "getUserProfile: Could not load profile picture!", e);
        });
    } catch (IOException e) {
        Log.e(TAG, "onCreateView: Failed creating temp file", e);
    } catch (IllegalArgumentException e) {
        Log.d(TAG, "No profile picture");
    }
    return binding.getRoot();
}
Also used : Bundle(android.os.Bundle) NonNull(androidx.annotation.NonNull) ImageView(android.widget.ImageView) BitmapFactory(android.graphics.BitmapFactory) NavController(androidx.navigation.NavController) ActiveUser(com.example.first_responder_app.interfaces.ActiveUser) Fragment(androidx.fragment.app.Fragment) View(android.view.View) TAG(android.content.ContentValues.TAG) Log(android.util.Log) NavHostFragment(androidx.navigation.fragment.NavHostFragment) DataBindingUtil(androidx.databinding.DataBindingUtil) UsersDataModel(com.example.first_responder_app.dataModels.UsersDataModel) ViewModelProvider(androidx.lifecycle.ViewModelProvider) NavDirections(androidx.navigation.NavDirections) LayoutInflater(android.view.LayoutInflater) FirestoreDatabase(com.example.first_responder_app.FirestoreDatabase) IOException(java.io.IOException) FragmentUserBinding(com.example.first_responder_app.databinding.FragmentUserBinding) ViewGroup(android.view.ViewGroup) File(java.io.File) UserViewModel(com.example.first_responder_app.viewModels.UserViewModel) R(com.example.first_responder_app.R) FirebaseFirestore(com.google.firebase.firestore.FirebaseFirestore) Nullable(androidx.annotation.Nullable) StorageReference(com.google.firebase.storage.StorageReference) Navigation(androidx.navigation.Navigation) Snackbar(com.google.android.material.snackbar.Snackbar) FragmentUserBinding(com.example.first_responder_app.databinding.FragmentUserBinding) StorageReference(com.google.firebase.storage.StorageReference) NavController(androidx.navigation.NavController) IOException(java.io.IOException) IOException(java.io.IOException) NavDirections(androidx.navigation.NavDirections) UserViewModel(com.example.first_responder_app.viewModels.UserViewModel) ActiveUser(com.example.first_responder_app.interfaces.ActiveUser) NavHostFragment(androidx.navigation.fragment.NavHostFragment) File(java.io.File) ViewModelProvider(androidx.lifecycle.ViewModelProvider)

Example 4 with TAG

use of android.content.ContentValues.TAG in project FirstResponse by mattpost1700.

the class AnnouncementFragment method populateAnnouncmentList.

private void populateAnnouncmentList() {
    Task getAnnoucementsForGroups = db.collection("announcements").whereEqualTo(FirestoreDatabase.FIELD_FIRE_DEPARTMENT_ID, activeUser.getFire_department_id()).whereIn("intended_group_id", activeUser.getGroup_ids()).orderBy(FirestoreDatabase.FIELD_CREATED_AT, Query.Direction.DESCENDING).get();
    Task getAnnouncementsForAll = db.collection("announcements").whereEqualTo(FirestoreDatabase.FIELD_FIRE_DEPARTMENT_ID, activeUser.getFire_department_id()).whereEqualTo("intended_group_id", null).orderBy(FirestoreDatabase.FIELD_CREATED_AT, Query.Direction.DESCENDING).get();
    Tasks.whenAllSuccess(getAnnoucementsForGroups, getAnnouncementsForAll).addOnSuccessListener(objects -> {
        ArrayList<AnnouncementsDataModel> temp = new ArrayList<>();
        for (Object fakeQuerySnapshot : objects) {
            QuerySnapshot querySnapshot = ((QuerySnapshot) fakeQuerySnapshot);
            for (QueryDocumentSnapshot announcementDoc : querySnapshot) {
                AnnouncementsDataModel announcementDataModel = announcementDoc.toObject(AnnouncementsDataModel.class);
                temp.add(announcementDataModel);
            }
        }
        listOfAnnouncements.clear();
        listOfAnnouncements.addAll(temp);
        checkAnnouncementEmpty();
        announcementAdapter.notifyDataSetChanged();
    }).addOnFailureListener(e -> Log.e(TAG, "populateAnnouncmentList: db get failed in announcement page", e));
}
Also used : Bundle(android.os.Bundle) NonNull(androidx.annotation.NonNull) Query(com.google.firebase.firestore.Query) Task(com.google.android.gms.tasks.Task) NavController(androidx.navigation.NavController) ArrayList(java.util.ArrayList) AnnouncementViewModel(com.example.first_responder_app.viewModels.AnnouncementViewModel) QueryDocumentSnapshot(com.google.firebase.firestore.QueryDocumentSnapshot) Toast(android.widget.Toast) Fragment(androidx.fragment.app.Fragment) View(android.view.View) FragmentAnnouncementBinding(com.example.first_responder_app.databinding.FragmentAnnouncementBinding) RecyclerView(androidx.recyclerview.widget.RecyclerView) TAG(android.content.ContentValues.TAG) Log(android.util.Log) NavHostFragment(androidx.navigation.fragment.NavHostFragment) DataBindingUtil(androidx.databinding.DataBindingUtil) UsersDataModel(com.example.first_responder_app.dataModels.UsersDataModel) AnnouncementRecyclerViewAdapter(com.example.first_responder_app.recyclerViews.AnnouncementRecyclerViewAdapter) ViewModelProvider(androidx.lifecycle.ViewModelProvider) NavDirections(androidx.navigation.NavDirections) LayoutInflater(android.view.LayoutInflater) SwipeRefreshLayout(androidx.swiperefreshlayout.widget.SwipeRefreshLayout) AppUtil(com.example.first_responder_app.AppUtil) FirestoreDatabase(com.example.first_responder_app.FirestoreDatabase) ViewGroup(android.view.ViewGroup) R(com.example.first_responder_app.R) FirebaseFirestore(com.google.firebase.firestore.FirebaseFirestore) QuerySnapshot(com.google.firebase.firestore.QuerySnapshot) List(java.util.List) Nullable(androidx.annotation.Nullable) Tasks(com.google.android.gms.tasks.Tasks) Navigation(androidx.navigation.Navigation) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) AnnouncementsDataModel(com.example.first_responder_app.dataModels.AnnouncementsDataModel) Task(com.google.android.gms.tasks.Task) QueryDocumentSnapshot(com.google.firebase.firestore.QueryDocumentSnapshot) ArrayList(java.util.ArrayList) AnnouncementsDataModel(com.example.first_responder_app.dataModels.AnnouncementsDataModel) QuerySnapshot(com.google.firebase.firestore.QuerySnapshot)

Example 5 with TAG

use of android.content.ContentValues.TAG in project FirstResponse by mattpost1700.

the class MainActivity method setActive.

/**
 * Set the logged in user
 * @param user the user who just logged in
 */
@Override
public void setActive(UsersDataModel user) {
    Log.d(TAG, "setActive: " + user);
    if (user == null) {
        this.activeUser = null;
        if (userListener != null) {
            userListener.remove();
            userListener = null;
        }
        if (incidentListener != null) {
            incidentListener.remove();
            incidentListener = null;
        }
        stopETA();
        return;
    }
    this.activeUser = user;
    NavigationView navView = findViewById(R.id.navView);
    View header = navView.getHeaderView(0);
    TextView name = header.findViewById(R.id.nav_name);
    TextView username = header.findViewById(R.id.nav_username);
    String fullName = user.getFirst_name() + " " + user.getLast_name();
    name.setText(fullName);
    username.setText(user.getUsername());
    // Ensure that the active user data is updated if database is updated
    if (userListener == null) {
        DocumentReference docRef = FirestoreDatabase.getInstance().getDb().collection("users").document(user.getDocumentId());
        userListener = docRef.addSnapshotListener((snapshot, err) -> {
            Log.d(TAG, "READ DATABASE - MAIN ACTIVITY");
            if (err != null) {
                System.err.println("Listen failed: " + err);
                return;
            }
            if (snapshot != null && snapshot.exists()) {
                activeUser = snapshot.toObject(UsersDataModel.class);
                // Find the address of the department and determine where they are responding
                setRespAddr();
                // Download profile pic
                try {
                    if (activeUser.getRemote_path_to_profile_picture() != null) {
                        final File localFile = File.createTempFile("Images", "bmp");
                        StorageReference ref = FirestoreDatabase.profilePictureRef.child(activeUser.getRemote_path_to_profile_picture());
                        ref.getFile(localFile).addOnSuccessListener(bytes -> {
                            try {
                                ((ImageView) findViewById(R.id.appDrawerProfilePicImageView)).setImageBitmap(BitmapFactory.decodeFile(localFile.getAbsolutePath()));
                            } catch (Exception e) {
                                Log.d(TAG, "onCreateView: No profile picture found");
                            }
                        }).addOnFailureListener(e -> {
                            Log.w(TAG, "getUserProfile: Could not load profile picture!", e);
                        });
                    }
                } catch (IOException e) {
                    Log.e(TAG, "onCreateView: Failed creating temp file", e);
                } catch (NullPointerException e) {
                    Log.e(TAG, "onCreate: Cannot get user", e);
                } catch (IllegalArgumentException e) {
                    Log.e(TAG, "onCreate: User has no image", e);
                }
            } else {
                System.out.print("Current data: null");
            }
        });
    }
}
Also used : Address(android.location.Address) Bundle(android.os.Bundle) PackageManager(android.content.pm.PackageManager) NonNull(androidx.annotation.NonNull) ImageView(android.widget.ImageView) LocationListener(android.location.LocationListener) AppCompatActivity(androidx.appcompat.app.AppCompatActivity) Drawable(android.graphics.drawable.Drawable) NavController(androidx.navigation.NavController) ActionBar(androidx.appcompat.app.ActionBar) ActiveUser(com.example.first_responder_app.interfaces.ActiveUser) Manifest(android.Manifest) ActionBarDrawerToggle(androidx.appcompat.app.ActionBarDrawerToggle) Locale(java.util.Locale) ETA(com.example.first_responder_app.DirectionAPI.ETA) Map(java.util.Map) Fragment(androidx.fragment.app.Fragment) View(android.view.View) ContextCompat(androidx.core.content.ContextCompat) MenuCompat(androidx.core.view.MenuCompat) NavHostFragment(androidx.navigation.fragment.NavHostFragment) Log(android.util.Log) LatLng(com.google.android.gms.maps.model.LatLng) Geocoder(android.location.Geocoder) IncidentFragment(com.example.first_responder_app.fragments.IncidentFragment) List(java.util.List) TextView(android.widget.TextView) ConstraintLayout(androidx.constraintlayout.widget.ConstraintLayout) StorageReference(com.google.firebase.storage.StorageReference) Toolbar(androidx.appcompat.widget.Toolbar) Location(android.location.Location) LocationManager(android.location.LocationManager) Context(android.content.Context) DrawerLayout(androidx.drawerlayout.widget.DrawerLayout) NavigationView(com.google.android.material.navigation.NavigationView) AppBarConfiguration(androidx.navigation.ui.AppBarConfiguration) BitmapFactory(android.graphics.BitmapFactory) DrawerLocker(com.example.first_responder_app.interfaces.DrawerLocker) MenuItem(android.view.MenuItem) ArrayList(java.util.ArrayList) ClipData(android.content.ClipData) SuppressLint(android.annotation.SuppressLint) DocumentReference(com.google.firebase.firestore.DocumentReference) QueryDocumentSnapshot(com.google.firebase.firestore.QueryDocumentSnapshot) IncidentDataModel(com.example.first_responder_app.dataModels.IncidentDataModel) NavigationUI(androidx.navigation.ui.NavigationUI) Toast(android.widget.Toast) ListenerRegistration(com.google.firebase.firestore.ListenerRegistration) TAG(android.content.ContentValues.TAG) UsersDataModel(com.example.first_responder_app.dataModels.UsersDataModel) FragmentManager(androidx.fragment.app.FragmentManager) ViewModelProvider(androidx.lifecycle.ViewModelProvider) ActivityCompat(androidx.core.app.ActivityCompat) GravityCompat(androidx.core.view.GravityCompat) AppCompatDelegate(androidx.appcompat.app.AppCompatDelegate) IOException(java.io.IOException) File(java.io.File) FireDepartmentDataModel(com.example.first_responder_app.dataModels.FireDepartmentDataModel) UserViewModel(com.example.first_responder_app.viewModels.UserViewModel) SharedPreferences(android.content.SharedPreferences) RefreshETAs(com.example.first_responder_app.interfaces.RefreshETAs) PreferenceManager(androidx.preference.PreferenceManager) NavigationView(com.google.android.material.navigation.NavigationView) StorageReference(com.google.firebase.storage.StorageReference) IOException(java.io.IOException) ImageView(android.widget.ImageView) View(android.view.View) TextView(android.widget.TextView) NavigationView(com.google.android.material.navigation.NavigationView) IOException(java.io.IOException) TextView(android.widget.TextView) ImageView(android.widget.ImageView) File(java.io.File) DocumentReference(com.google.firebase.firestore.DocumentReference)

Aggregations

TAG (android.content.ContentValues.TAG)23 Bundle (android.os.Bundle)23 Log (android.util.Log)23 View (android.view.View)23 Toast (android.widget.Toast)21 FirebaseFirestore (com.google.firebase.firestore.FirebaseFirestore)19 List (java.util.List)18 Intent (android.content.Intent)17 AppCompatActivity (androidx.appcompat.app.AppCompatActivity)17 FirebaseAuth (com.google.firebase.auth.FirebaseAuth)17 DocumentReference (com.google.firebase.firestore.DocumentReference)17 TextView (android.widget.TextView)16 Objects (java.util.Objects)16 ViewGroup (android.view.ViewGroup)15 AlertDialog (androidx.appcompat.app.AlertDialog)15 ImageView (android.widget.ImageView)13 Arrays (java.util.Arrays)13 EditText (android.widget.EditText)12 ArrayAdapter (android.widget.ArrayAdapter)11 IOException (java.io.IOException)11