-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
intentando resolver issue #28 #29
Changes from 6 commits
a1b7366
eeb5090
05cfda6
433295e
2320036
8f31d9f
9b35465
e21132b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="host_name">http://192.168.0.33:8080</string> | ||
</resources> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -299,7 +299,9 @@ private void loginJWT(LoginRequest loginRequest) { | |
|
||
// Instanciar el RequestQueue. | ||
RequestQueue queue = Volley.newRequestQueue(this); | ||
String url = getString(R.string.jwt_URL); | ||
String host_name = getString(R.string.host_name); | ||
String end_point = getString(R.string.jwt_URL); | ||
String url = host_name + end_point; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sobre variable
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Si, suelo utilizar camelCase donde se puede, aquí se me pasó. Voy a estar repasando más Android Coding Style. |
||
|
||
Map<String, String> params = new HashMap(); | ||
params.put("username", loginRequest.getUsername()); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<network-security-config> | ||
<base-config cleartextTrafficPermitted="false" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Asegurarse de que una vez resuelto el input text para el hostname, al ingresar un nuevo hostname en runtime; se pueda conectar a un puerto plain text. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. En este caso lo resolví con un archivo solo para la versión DEBUG con base-config cleartextTrafficPermitted=true y false para la versión release. Ahí fue el siguiente pull request. |
||
<domain-config cleartextTrafficPermitted="true"> | ||
<domain includeSubdomains="true">sodep.com.py</domain> | ||
<domain-config cleartextTrafficPermitted="true"> | ||
<domain includeSubdomains="true">192.168.0.33</domain> | ||
</domain-config> | ||
<domain includeSubdomains="true">192.168.0.33</domain> | ||
</domain-config> | ||
</network-security-config> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="host_name">http://192.168.0.33:8080</string> | ||
</resources> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesante recurso @GonzaloGaleano , es una buena opción para cierto tipo de constantes.
Solemos usar el
build.gradle
para definir variables dependientes delbuildType
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
si, utilizo mucho este recurso también para tener distintos iconos para la versión dev + agregando sufix a appname en build.gradle entonces poder tener debug y release instalados en el mismo teléfono y diferenciados