Skip to content

Commit

Permalink
customData
Browse files Browse the repository at this point in the history
  • Loading branch information
Itgel G committed Jun 3, 2021
1 parent d20421c commit b9bc019
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
2 changes: 1 addition & 1 deletion erxeslibrary/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ dependencies {
}
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'

implementation 'com.squareup.okhttp3:logging-interceptor:4.5.0'
// implementation 'com.squareup.okhttp3:logging-interceptor:4.5.0'
implementation 'com.mikepenz:iconics-core:3.0.4@aar'

implementation 'com.google.code.gson:gson:2.8.6'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import android.text.Html;
import android.text.Spanned;
import android.text.TextUtils;
import android.util.Log;
import android.widget.EditText;
import android.widget.TextView;

Expand Down Expand Up @@ -41,6 +40,9 @@
import com.newmedia.erxeslibrary.utils.DataManager;
import com.newmedia.erxeslibrary.utils.ListTagHandler;

import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.Field;
import java.text.ParseException;
import java.text.SimpleDateFormat;
Expand Down Expand Up @@ -257,8 +259,16 @@ public void Start() {
checkRequired(false, null, null, null);
}

public void Start(String email, String phone, String jsonObject) {
checkRequired(true, email, phone, jsonObject);
public void Start(String jsonString) {
String email = null, phone = null;
try {
JSONObject jsonObject1 = new JSONObject(jsonString);
email = jsonObject1.getString("email");
phone = jsonObject1.getString("phone");
} catch (JSONException e) {
e.printStackTrace();
}
checkRequired(true, email, phone, jsonString);
}

public void initActivity(boolean hasData, String email, String phone, String customData) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import okhttp3.HttpUrl;
import okhttp3.OkHttpClient;
import okhttp3.TlsVersion;
import okhttp3.logging.HttpLoggingInterceptor;
//import okhttp3.logging.HttpLoggingInterceptor;

public final class ErxesRequest {
public ApolloClient apolloClient;
Expand Down Expand Up @@ -79,8 +79,8 @@ void set_client() {
}

private OkHttpClient getHttpClient() {
HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
logging.setLevel(BuildConfig.DEBUG ? HttpLoggingInterceptor.Level.BODY : HttpLoggingInterceptor.Level.NONE);
// HttpLoggingInterceptor logging = new HttpLoggingInterceptor();
// logging.setLevel(BuildConfig.DEBUG ? HttpLoggingInterceptor.Level.BODY : HttpLoggingInterceptor.Level.NONE);

OkHttpClient.Builder client = new OkHttpClient.Builder()
.connectTimeout(15, TimeUnit.SECONDS)
Expand All @@ -97,8 +97,8 @@ public List<Cookie> loadForRequest(HttpUrl url) {
List<Cookie> cookies = cookieStore.get(url);
return cookies != null ? cookies : new ArrayList<>();
}
})
.addInterceptor(logging);
});
// .addInterceptor(logging);
return client.build();
}

Expand Down

0 comments on commit b9bc019

Please sign in to comment.