diff options
author | Parménides GV <parmegv@sdf.org> | 2013-02-11 20:28:59 +0100 |
---|---|---|
committer | Parménides GV <parmegv@sdf.org> | 2013-02-11 20:28:59 +0100 |
commit | 162afa5bfa6485f3aacb3f60e9c92fa0c3bfa7a7 (patch) | |
tree | c9fabab994e1e51e8ec90bc8b2c78cc55d219e3e /src/se/leap/leapclient/ConfigurationWizard.java | |
parent | 8db161017f55a710bd91aa14fe9c1b24d4efdeab (diff) |
Gets provider.json from custom url (assuming the file is at the root of
the website, just as bitmask.net/provider.json), and writes it to a file
in ~/leap_android.
Next steps: parse that file and download eip-service and cert.
Diffstat (limited to 'src/se/leap/leapclient/ConfigurationWizard.java')
-rw-r--r-- | src/se/leap/leapclient/ConfigurationWizard.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/se/leap/leapclient/ConfigurationWizard.java b/src/se/leap/leapclient/ConfigurationWizard.java index 86de817c..39ada310 100644 --- a/src/se/leap/leapclient/ConfigurationWizard.java +++ b/src/se/leap/leapclient/ConfigurationWizard.java @@ -8,6 +8,7 @@ import java.util.Scanner; import org.json.JSONException;
import org.json.JSONObject;
+import se.leap.leapclient.NewProviderDialog.NewProviderDialogInterface;
import se.leap.leapclient.ProviderListContent.ProviderItem;
import android.app.Activity;
import android.app.DialogFragment;
@@ -38,7 +39,7 @@ import android.view.View; * to listen for item selections.
*/
public class ConfigurationWizard extends Activity
- implements ProviderListFragment.Callbacks {
+ implements ProviderListFragment.Callbacks, NewProviderDialog.NewProviderDialogInterface{
/**
* Whether or not the activity is in two-pane mode, i.e. running on a tablet
@@ -170,4 +171,16 @@ public class ConfigurationWizard extends Activity DialogFragment newFragment = NewProviderDialog.newInstance();
newFragment.show(fragment_transaction, "newProviderDialog");
}
+
+ @Override
+ public void saveProvider(String provider_url) {
+ Intent provider_API_command = new Intent(this, ProviderAPI.class);
+
+ Bundle method_and_parameters = new Bundle();
+ method_and_parameters.putString(ConfigHelper.provider_key_url, provider_url);
+
+ provider_API_command.putExtra(ConfigHelper.downloadNewProviderDotJSON, method_and_parameters);
+
+ startService(provider_API_command);
+ }
}
|