The Winner - Esri Award at Tech Crunch Disrupt 2015 Hackathon New York City

Tech Crunch Disrupt 2015 Hackathon lasted 21 hours had 106 entrants and over 20 sponsors
Tech Crunch Disrupt 2015 Hackathon lasted 21 hours had 106 entrants and over 20 sponsors

Our team’s submission Virtual Reality Map Explorer won a prize from Esri (click play below)

ESRI Environmental Systems Research Institute is an international supplier of Geographic Information System software, web GIS and geodatabase management applications
ESRI Environmental Systems Research Institute is an international supplier of Geographic Information System software, web GIS and geodatabase management applications

Virtual Reality Map Explorer was built using Google Cardboard for Android phones
Virtual Reality Map Explorer was built using Google Cardboard for Android phones

Virtual Reality Map Explorer was built using Google Cardboard for Android phones

Virtual Reality Map Explorer was built using Google Cardboard for Android phones

Virtual Reality Map Explorer was built using Google Cardboard for Android phones

Esri API

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Runnable task = new Runnable() {
public void run() {
try {
String[] queryArray = {
"http://services.arcgisonline.com/" +
"ArcGIS/rest/services/Demographics/" +
"USA_Average_Household_Size/MapServer/3",
"AVGHHSZ_CY > 3.5"};
AsyncQueryTask asyncQuery = new AsyncQueryTask();
asyncQuery.execute(queryArray);
} catch (Exception e) {
e.printStackTrace();
}
}
};

Esri API Data Parameters (excerpt)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
TOTPOP_CY      Total Population
HHPOP_CY Population in Households
FAMPOP_CY Population in Families
GQPOP_CY Population in Group Quarters
POPDENS_CY Population per Square Mile
DIVINDX_CY Diversity Index
TOTHH_CY Total Households
AVGHHSZ_CY Average Household Size
FAMHH_CY Total Family Households
AVGFMSZ_CY Average Family Size
MEDHINC_CY Median Household Income
AVGHINC_CY Average Household Income
PCI_CY Per Capita Income
TOTHU_CY Total Housing Units
OWNER_CY Owner Occupied Housing Units
RENTER_CY Renter Occupied Housing Units
VACANT_CY Vacant Housing Units
MEDVAL_CY Median Value of Owner Occupied Housing

Cardboard API

1
2
3
4
5
6
7
8
9
10
11
12
public void onDrawEye(Eye eye) {
glClearColor(0.5f, 0.8f, 0.9f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
multiplyMM(view, 0, eye.getEyeView(), 0, camera, 0);
multiplyMV(lightPosInEyeSpace, 0, view, 0, LIGHT_POS_IN_WORLD_SPACE, 0);
float[] perspective = eye.getPerspective(Z_NEAR, Z_FAR);
multiplyMM(modelView, 0, view, 0, modelFloor, 0);
multiplyMM(modelViewProjection, 0, perspective, 0, modelView, 0);

drawGround();
drawDemographicOverlay();
}

Ground Vertex Shader

1
2
3
4
5
6
7
8
9
10
11
12
13
14
uniform mat4 u_MVPMatrix;
uniform mat4 u_MVMatrix;

attribute vec4 a_Position;
attribute vec2 a_TexCoordinate;

varying vec3 v_Position;
varying vec2 v_TexCoordinate;

void main() {
v_Position = vec3(u_MVMatrix * a_Position);
v_TexCoordinate = a_TexCoordinate;
gl_Position = u_MVPMatrix * a_Position;
}

Ground Fragment Shader

1
2
3
4
5
6
7
8
9
10
11
12
uniform vec3 u_LightPos;
uniform sampler2D u_Texture;

varying vec3 v_Position;
varying vec2 v_TexCoordinate;

void main() {
float distance = length(u_LightPos - v_Position);
vec3 lightVector = normalize(u_LightPos - v_Position);

gl_FragColor = texture2D(u_Texture, v_TexCoordinate);
}

Biggest challenge:

Formatting geospatial coordinates. Combining the Google Cardboard API calls in java with Esri Android API. Managing variables in OpenGL ES API due to memory optimizations in Android 5.1.

References and Resources

TechCrunch Disrupt NY 2015 Hackathon
http://techcrunch.com/events/disrupt-ny-hackathon-2015/

VR Map Explorer
http://challengepost.com/software/arcvrcardboard
https://github.com/skylight1/VR-Map-Explorer

Esri
https://developers.arcgis.com/android/
https://developers.arcgis.com/android/api-reference/reference/packages.html

Google Cardboard
https://www.google.com/get/cardboard/



Arcadius Wiki Android App

Description

Arcadius Wiki App fetches batches of random articles from Wikipedia using dictionary of English words. When the articles arrive the user has the choice (in the Settings Menu) to be notified by sound, vibration as well as on the Android Wear Watch. In addition to Wikipedia articles Arcadius Wiki App makes calls to Shutterstock API (with Authentication) to fetch corresponding photos.

App Permissions

Arcadius Wiki App uses the following 4 permissions:

  1. INTERNET to perform network access and three more permissions required by the sync adapter:

  2. READ_SYNC_SETTINGS,

  3. WRITE_SYNC_SETTINGS,

  4. AUTHENTICATE_ACCOUNTS

Content Provider

Arcadius Wiki App’s ContentProvider is called ArcWikiProvider using SQLite database called arcadius.db with one table called arcwiki.

Backend

Arcadius Wiki App talks to two backend APIs:

  1. Wikipedia.org API

  2. Shutterstock.com API

Sync Adapter and talking over network

Arcadius Wiki App uses HttpURLConnection via SyncAdapter called ArcWikiSyncAdapter for all the three calls: 1. to Wikipedia to fetch the article and 2. to Shutterstock twice: first to authenticate and get url for the matching keyword and second to fetch the photo from url obtained in the previous call.

Loader

Arc Wiki App implements WIKIARTICLE_LOADER

User/App State

Below are 4 examples of how Arc Wiki App correctly preserves and restores the app state:

  1. When an activity is displayed, the same activity appears on rotation.

  2. User text input is preserved on rotation.

  3. When the app is resumed after the device wakes from sleep (locked) state, the app returns the user to the exact state in which it was last used.

  4. When the app is relaunched from Home or All Apps, the app restores the app state as closely as possible to the previous state.

Notifications

Arcadius Wiki App uses notifications to indicate a context change when new batch of articles from Wikipedia arrived. User is notified by sound, vibration and on Android Wear Watch with message: “Arcadius Wiki ­- Check out the new articles “. When user taps on the notification the user is taken to Arcadius Wiki App.

Share Action Provider

Arcadius Wiki Appp implements ShareActionProvider to share articles with an outside application like messenger, email or note taking app.

Broadcast Events implementation

Arcadius Wiki App intercepts broadcast events and responds to them to display article content and photos properly.

Tablet landscape screenshot:

Tablet landscape screenshot

Tablet portrait screenshot:

Tablet portrait screenshot

Phone details landscape screenshot:

Phone details landscape screenshot

Phone details portrait screenshot:

Phone details portrait screenshot

Phone main landscape screenshot:

Phone main landscape screenshot

Phone main portrait screenshot:

Phone main portrait screenshot