evristzam / ndt

Automatically exported from code.google.com/p/ndt
Other
0 stars 0 forks source link

Review Request: update NDT Android app to use mlab-ns server discovery #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Purpose of code changes on this branch:

  Remove references to DONAR and perform server discovery using mlab-ns.  Mlab-ns uses a more robust server-liveness mechanism, and should return better servers for test runs.

When reviewing my code changes, please focus on:

Android/AndroidManifest.xml
  * updated versionCode & versionName
  * moved uses-sdk and uses-permissions before application element to avoid compiler warnings

Android/res/values/strings.xml
  * update app_name
  + add user_agent and default_user_agent for use by MLabNS.java

Android/src/net/measurementlab/ndt/MLabNS.java
  + add new file and class for interacting with MLabNS service

Android/src/net/measurementlab/ndt/SelectServerActivity.java
  + add lookupHostname() to call MLabNS.Lookup() with reference to the existing list of M-Lab sites.
  * update SERVER_LIST to use metro codes to pass directly to MLabNS.Lookup()

Android/src/net/measurementlab/ndt/InitialActivity.java
  * uses lookupHostname() for initial servername.
Android/src/net/measurementlab/ndt/NdtService.java
  * uses lookupHostname() for default servernames.
Android/src/net/measurementlab/ndt/TestsActivity.java
  * uses lookupHostname() for default servernames.

java/net/measurementlab/ndt/NdtTests.java
  * invokes Thread.sleep() according to current documentation.

After the review, I'll merge this branch into:
/svn/branches/android

Original issue reported on code.google.com by solt...@opentechinstitute.org on 15 Jan 2013 at 10:28

Attachments:

GoogleCodeExporter commented 9 years ago
Perhaps build the user agent more dynamically to include the OS version? I 
don't know if Android contains a default user agent that you can get from the 
SDK.

Original comment by dominic@measurementlab.net on 17 Jan 2013 at 2:59

GoogleCodeExporter commented 9 years ago
Good idea.  I've attached a new patch that changes prepareUserAgent() to either 
return the android system property "http.agent" or if it's missing, a minimal 
default.  That property appears to have been in the core android system since 
at least 2.2, so it should be reliable.

Original comment by solt...@opentechinstitute.org on 17 Jan 2013 at 4:44

Attachments:

GoogleCodeExporter commented 9 years ago
So, I've committed the patch in r797 & r798.

Also, the new build of the NDT mobile app is available (or soon) in the Google 
play store:  
https://play.google.com/store/apps/details?id=net.measurementlab.ndt

Original comment by solt...@opentechinstitute.org on 22 Jan 2013 at 11:14