From 162afa5bfa6485f3aacb3f60e9c92fa0c3bfa7a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Mon, 11 Feb 2013 20:28:59 +0100 Subject: 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. --- src/se/leap/leapclient/ConfigurationWizard.java | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/se/leap/leapclient/ConfigurationWizard.java') diff --git a/src/se/leap/leapclient/ConfigurationWizard.java b/src/se/leap/leapclient/ConfigurationWizard.java index 86de817..39ada31 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); + } } -- cgit v1.2.3