Challenge Overview

Challenge Overview

The goal of this challenge is to connect Android native application with API backend.

The outcome Android app of the challenge will help users who want to “go solar” to investigate complete system designs for their home without needing to call installers.

Challenge Requirements

SolarAgs API Endpoint

Facebook and Youtube API

  • Youtube API will be used to incorporate video playback functionality in the app.

  • Facebook SDK will be used for login and obtaining user information.

General Notes

  • All youtube videos IDs should be stored in a file in the app in proper format.

  • You must fix any issue in the provided android app prototype that prevents you from completing the integration or delivering the full functionality app. 

Pages Requirements

  • Splash Screen

    • The number of seconds displaying the splash screen depends on what resources are being loaded in Welcome screen. That is the video and About Us text.

  • Welcome Screen

    • The banner is a youtube video.

      • Tabbing on the video should play it in full screen.

    • Login with facebook will take user to Facebook OAuth 2.0 Flow.

      • We need to retrieve following information :

        • user photo

        • user first name and last name

        • oauth access token

      • Make call to SolarAgs API Endpoint :

        • POST {{URL}}/login

          • Body parameters :

            • type : facebook

            • fbAccessToken: is the access token retrieved from the oauth flow.

          • Response is json object with field ‘accessToken’ if valid. The token should be stored in the app.

        • User first/last name and photo will be stored locallay in the app.

    • Login with guest button will login user as guest :

      • Make call to SolarAgs API Endpoint :

        • POST {{URL}}/login

          • Body parameters :

            • type : guest

          • Response is json object with field ‘accessToken’ if valid. The token should be stored in the app.

    • App should check the existence of ‘accessToken’ when it loads. If missing then show user as not logged in.

    • All following calls to the SolarAgs API should include the access token in Authorization header in format “Bearer {accessToken}”

  • Home Screen (Dashboard)

    • The top section will display user photo with first name and last name.

      • If user is guest then use the photo placeholder in the android app with ‘Hello Guest’ instead of first name and last name.

      • If user is logged in, the information will be retrieved from facebook info we stored during the logic with facebook flow.

    • The background also is a blurred effect version of the user photo.

      • Clicking on the camera icon top right corner of the banner allows user to change the photo.

      • The photo will be stored in user app. No integration with backend for this feature.

    • Clicking on the icon in right side of the header will display number of unread notifications. Clicking on it will open up the default notification layout listing notifications created by this app.

  • My House Design Screens

    • The app will capture all data inserted in each step, and will interact with backend in the last step when displaying “Thank you” screen.

    • Profile Screens

      • The current application will load the current user location in Lat/Long fields from the GPS of the phone.

      • Phone number is automatically determined from the phone.

      • Street address, city, state are automatically determined from the GPS data and suitable mapping tool.

      • Clicking on Edit allows user to edit the information manually.

      • Clicking on “Edit Location in Maps” will take user to map view.

        • Using current user location display marker on the google maps of user current location. and allow the user to pinch / zoom the google map

        • Moving the drop pin will update the lat/long values and override those obtained from the GPS. If the user moves the drop pin, provide the user the option to return to the GPS coordinates.

        • Clicking Done button will save user information and take user back to Profile main screen.

      • Implement proper validation for the fields.

      • Tabbing next takes user to “Design Input” screen.

    • Design Inputs Screens

      • User can takes photo or choose from existing photos.

      • Calendar in this screen will display current date.

      • Tabbing next will take user to “Take House Picture” screen.

    • Take House Picture Screens

      • This screen displays samples for how to take home photos.

      • Tabbing next will take user to “Take Picture Screens”.

    • Take Picture Screens

      • Implement the camera take image photo flow.

      • The circle in middle is compass, and needle represents user standing direction.

        • The user standing direction and degree should be captured when user take the photo.

      • The user standing direction and degree should be captured when user take the photo and displayed in photo confirmation screen.

        • User can tap “Click Again” to retake the image.

      • Tabbing next takes user to confirmation step screen.

    • Confirmation Step Screen

      • This screen displays summary of entered data.

      • Tabbing “Confirm and Send” will take user to “Thank you” step.

    • Thank You Screen

      • The step will call the SolarAgs API  endpoint to store captured data  :

        • POST {{URL}}/Job

          • Refer to postman#”Create Job” for the body fields passed in the call.

          • Response will include created Job Id, this should be captured to be used to check Job status.

      • Animated progress bar reflect the file upload progress bar. Also will represents data being submitted and sent to backend for further processing.

      • The created job should be passed to notification background service.

      • The animation progress bar will keep playing if user stays in the screen until backend return a response.

    • View Design Options Screens

      • The screen renders information from GET {{URL}}/Job/{Job Id}  from previous step.

      • User can navigate between designs by clicking Next icon (top header) or by clicking on the numbers grid.

      • The numbers grid can contain between 1 to 10 designs, the grid should be always centered.

      • When user click “Select Design” it will call SolarAgs API Endpoint :

        • POST {{URL}}/Job/1 (refer to Complete Job in Postman).

          • Body will be selectedDesign field with value equals to designNum in the selected design array item.

    • Choose your installer Screens

      • This screen will be opened when submitted job response is returned with status “Processed”. The response will include array of installers that will be displayed in this screen.

    • Schedule Installation Screens

      • The data captured in this step will be stored in json file in the application.

      • If user pick an installer then a call to SolarAgs API will be made :

        • POST {{URL}}/Job/{Job-id}

        • Body will be the selected installer ID and the data we gather in this step.

    • Congratulations Screen

      • No backend integration on this screen.

  • Learn About Solar Screens

    • Videos will be loaded from json file configured in Android app.

    • Tabbing on any video will play the video in full screen.

    • Videos will be manipulated using Youtube API.

  • Example House Design Screens

    • The flow and backend integration logic in these screens will be identical to “My House Design” screens flow with the only difference that we are using a placeholder for the home photo.

Notification Background Activity

  • App will have background service to keep pulling status of the submitted jobs.

  • The service will accept job id and do pulling for the job status until it gets a response for that job.

  • A notification should be created when a response is returned from backend.

  • The following SolarAgs API Endpoint to be used to check job status :

    • GET {{URL}}/Job/{Job Id} where Job Id is obtained from response of POST {{URL}}/Job.

    • The app should call the backend every 30 seconds (should be configurable) to get status.

      • Status equals “Submitted” means the application still processing the Job.

      • Status equals to “Processed” means the application returns response. In this case take user to “View Design Options” and it will pass the response to the screen displaying the array of installers returned in the response.

      • If error happens, status equals to “Failed” will be returned.

  • The application should save the state of the background service activity if it was forced close or destroyed. The job IDs currently in ‘Submitted’ state should be stored, and the pull service should be recreated with these IDs when the application is relaunched.

Project Structure

You will use Android Studio project for this application. Follow Android studio project structure best practices.

Technology Overview

  • The target platform is Android.

  • You will support Android version 4.1.x - 5.0.

  • Screen resolution should cover Normal and Large screens with hdpi and xhdpi.

  • You are allowed to use any supporting and open source libraries. Please clearly document use of all such libraries.

  • Use of  PhoneGap is NOT is allowed. We are building native application.

Documents

Provided in challenge forums the Storyboard and Screenshots.

 



Final Submission Guidelines

Deliverable

  • Android Studio Project with all source code that address the requirements.

  • Deployment guide with verification steps.

ELIGIBLE EVENTS:

2015 topcoder Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30048925