Skip to content

jdhurwitz/AndroidNavigator

Repository files navigation

Nav

Navigator framework code for proximity pass. Allows for easy intent starting and testing of individual code sections. Integrated file explorer allowing for file selection. Ability to return full file path.

Current Rev Notes
-Default activity not specified for startup.
-File explorer does not store file path of last selected variable yet
-File explorer returns to the home menu after selection (as expected)

Design Hierarchy Notes
-Default activity startup will be list of nearby android devices on wifi direct. (Rob)
-Once devices have been paired onSuccess, start file explorer activity
-Browse file system and select file. Once item has been selected, start Nate's code.
-Go through steps to transfer file. Upon success, notify user and return to main menu

To use the navigator:

  1. Download and unzip.

2) Open android studio and import existing project.
3) Select the Nav project.
4) Go to project structure and hit the "+".
5) Add the project/code you want to test as a library module.
6) Set dependencies in the build.gradle for "app" (the main Nav build.gradle)
7) Figure out all the random Gradle errors you get.
8) Remove the Intent filter for your imported module.
9) Go to the NavigationDrawerFragment and start your activity by using one of the cases (not 0.)
-0 corresponds to the first thing on the list, n-1 is the last
/*
Determine which activity to start based on selected item.
 */
private void selectItem(int position) {
    Intent selectedIntent = null;
    switch(position){
        case 0:
            break;
        case 1:
        {
            selectedIntent = new Intent(this.getActivity(), FileChooser.class);
            startActivity(selectedIntent);
            break;
        }
        case 2:
        {
            //start an activity here
            break;
        }
        case 3:
        {
            //start an activity here
            break;
        }
        default:
            break;

    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages