summaryrefslogtreecommitdiff
path: root/src/se/leap/leapclient/ConfigurationWizard.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/se/leap/leapclient/ConfigurationWizard.java')
-rw-r--r--src/se/leap/leapclient/ConfigurationWizard.java15
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);
+ }
}