Add WRITE_EXTERNAL_STORAGE permission for Android.

Also, use getApplicationContext() to initialize the
DiscoveryManager instead of the activity.