diff --git a/app/src/main/java/org/communiquons/android/comunic/client/LoginActivity.java b/app/src/main/java/org/communiquons/android/comunic/client/LoginActivity.java index 091afdf..1c06970 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/LoginActivity.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/LoginActivity.java @@ -15,6 +15,8 @@ import org.json.JSONObject; import java.util.ArrayList; +import org.communiquons.android.comunic.client.api.*; + public class LoginActivity extends AppCompatActivity { /** diff --git a/app/src/main/java/org/communiquons/android/comunic/client/APIPostData.java b/app/src/main/java/org/communiquons/android/comunic/client/api/APIPostData.java similarity index 95% rename from app/src/main/java/org/communiquons/android/comunic/client/APIPostData.java rename to app/src/main/java/org/communiquons/android/comunic/client/api/APIPostData.java index 237bb39..7b090fc 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/APIPostData.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/api/APIPostData.java @@ -1,4 +1,4 @@ -package org.communiquons.android.comunic.client; +package org.communiquons.android.comunic.client.api; import java.net.URLEncoder; diff --git a/app/src/main/java/org/communiquons/android/comunic/client/APIRequestParameters.java b/app/src/main/java/org/communiquons/android/comunic/client/api/APIRequestParameters.java similarity index 84% rename from app/src/main/java/org/communiquons/android/comunic/client/APIRequestParameters.java rename to app/src/main/java/org/communiquons/android/comunic/client/api/APIRequestParameters.java index 08a37bf..00b654d 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/APIRequestParameters.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/api/APIRequestParameters.java @@ -1,4 +1,6 @@ -package org.communiquons.android.comunic.client; +package org.communiquons.android.comunic.client.api; + +import org.communiquons.android.comunic.client.api.APIPostData; import java.util.ArrayList; @@ -8,7 +10,7 @@ import java.util.ArrayList; * Created by pierre on 10/31/17. */ -class APIRequestParameters { +public class APIRequestParameters { /** * Parameters of the request @@ -25,7 +27,7 @@ class APIRequestParameters { * * @param uri The request URI on the server */ - APIRequestParameters(String uri){ + public APIRequestParameters(String uri){ //Save request URI request_uri = uri; @@ -39,7 +41,7 @@ class APIRequestParameters { * @param name The name of the new key * @param value The value of the new key */ - void addParameter(String name, String value){ + public void addParameter(String name, String value){ parameters.add(new APIPostData(name, value)); } diff --git a/app/src/main/java/org/communiquons/android/comunic/client/APIRequestTask.java b/app/src/main/java/org/communiquons/android/comunic/client/api/APIRequestTask.java similarity index 93% rename from app/src/main/java/org/communiquons/android/comunic/client/APIRequestTask.java rename to app/src/main/java/org/communiquons/android/comunic/client/api/APIRequestTask.java index 39d1b57..dfa932f 100644 --- a/app/src/main/java/org/communiquons/android/comunic/client/APIRequestTask.java +++ b/app/src/main/java/org/communiquons/android/comunic/client/api/APIRequestTask.java @@ -1,10 +1,11 @@ -package org.communiquons.android.comunic.client; +package org.communiquons.android.comunic.client.api; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.os.AsyncTask; +import org.communiquons.android.comunic.client.BuildConfig; import org.json.JSONObject; import java.io.BufferedOutputStream; @@ -23,7 +24,7 @@ import java.net.URL; * * Created by pierre on 10/31/17. */ -abstract class APIRequestTask extends AsyncTask { +public abstract class APIRequestTask extends AsyncTask { /** * Background task @@ -127,7 +128,7 @@ abstract class APIRequestTask extends AsyncTask