#Version 23.6 en testBeta

This commit is contained in:
Sergio De la torre 2023-02-27 10:53:09 +01:00
parent 67f0202929
commit 27b9a694c8
6 changed files with 91 additions and 53 deletions

View File

@ -1,2 +1,2 @@
#Mon Nov 25 09:23:07 CET 2019
gradle.version=5.4.1
#Thu Feb 23 08:13:25 CET 2023
gradle.version=5.6.4

View File

@ -7,13 +7,10 @@ android {
applicationId "verdnatura.es.repartoverdnatura"
minSdkVersion 19
//targetSdkVersion 28
versionCode 33
versionName "23.2Beta"
versionCode 36
versionName "23.6"
//versionName "23.2Beta" Madrid 33
//versionName "9.6.1Beta" //versionCode 27
//versionName "9.6"
//versionName "9.5" versionCode 26
//versionName "9.6Beta" versionCode 26
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
@ -29,12 +26,12 @@ android {
getByName("debug") {
applicationIdSuffix = ".sfusion"
}*/
getByName("release") {
applicationIdSuffix = ".sfusionMadrid"
/* getByName("release") {
applicationIdSuffix = ".sfusion"
}
getByName("debug") {
applicationIdSuffix = ".sfusionMadrid"
}
applicationIdSuffix = ".sfusion"
}*/
}

View File

@ -10,7 +10,51 @@
"client_info": {
"mobilesdk_app_id": "1:622584359076:android:49dda1d8a6dc59f9",
"android_client_info": {
"package_name": "verdnatura.es.repartoverdnatura.sfusionMadrid"
"package_name": "verdnatura.es.repartoverdnatura.sfusion"
}
},
"oauth_client": [
{
"client_id": "622584359076-0ph8u7jfg7ifgs6qe4ueb6oqj9c8mv36.apps.googleusercontent.com",
"client_type": 1,
"android_info": {
"package_name": "verdnatura.es.repartoverdnatura.sfusionMadrid",
"certificate_hash": "1495f9252766a51f3c48f2e9c8789c85cee831d0"
}
},
{
"client_id": "622584359076-of5rjenfhtc8uogo3e3uv0b321verrbm.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyAm1cBB77FS72JdOClD-qXZtvZ0_JTgvPI"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "622584359076-of5rjenfhtc8uogo3e3uv0b321verrbm.apps.googleusercontent.com",
"client_type": 3
}
]
},
"ads_service": {
"status": 2
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:622584359076:android:49dda1d8a6dc59f9",
"android_client_info": {
"package_name": "verdnatura.es.repartoverdnatura"
}
},
"oauth_client": [

View File

@ -1,14 +1,12 @@
package verdnatura.es.repartoverdnatura;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
@ -19,19 +17,17 @@ import java.util.List;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;
import verdnatura.es.repartoverdnatura.ADAPTERS.WorkerAdapter;
import verdnatura.es.repartoverdnatura.INTERFACES.RestClient;
import verdnatura.es.repartoverdnatura.MODELS.DeliveryInfo;
import verdnatura.es.repartoverdnatura.MODELS.Ruta;
import verdnatura.es.repartoverdnatura.MODELS.SectorItem;
import verdnatura.es.repartoverdnatura.MODELS.Worker;
import verdnatura.es.repartoverdnatura.UTILS.ApiUtils;
import verdnatura.es.repartoverdnatura.UTILS.LocalStorage;
import verdnatura.es.repartoverdnatura.UTILS.Utils;
public class InfoActivity extends AppCompatActivity {
private TextView txtRazonSocial,txtNif, txtDireccionFiscal,txtMunicipio, txtCodigoPostal,txtNameCorp,txtNIFCorp,txtAdressCorp,txtVersion,txtSectorInfo;
private TextView txtRazonSocial, txtNif, txtDireccionFiscal, txtMunicipio, txtCodigoPostal, txtNameCorp, txtNIFCorp, txtAdressCorp, txtVersion, txtSectorInfo;
private ImageView imgSectorEdit;
private RestClient restClient;
public Ruta route;
@ -57,9 +53,9 @@ public class InfoActivity extends AppCompatActivity {
txtNIFCorp = (TextView) findViewById(R.id.textView5);
txtAdressCorp = (TextView) findViewById(R.id.textView6);
txtVersion=(TextView) findViewById(R.id.textView43);
txtVersion = (TextView) findViewById(R.id.textView43);
imgSectorEdit =(ImageView) findViewById(R.id.sectorEdit);
imgSectorEdit = (ImageView) findViewById(R.id.sectorEdit);
imgSectorEdit.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@ -73,7 +69,7 @@ public class InfoActivity extends AppCompatActivity {
});
txtSectorInfo =(TextView) findViewById(R.id.sectorInfo);
txtSectorInfo = (TextView) findViewById(R.id.sectorInfo);
txtSectorInfo.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@ -119,20 +115,20 @@ public class InfoActivity extends AppCompatActivity {
PackageManager packageManager = getApplicationContext().getPackageManager();
try {
txtVersion.setText(getString(R.string.version)+packageManager.getPackageInfo(context.getPackageName(), 0).versionName);
txtVersion.setText(getString(R.string.version) + packageManager.getPackageInfo(context.getPackageName(), 0).versionName);
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
}
private void worker_updateSector(final SectorItem sector){
private void worker_updateSector(final SectorItem sector) {
Utils.progressBar.show(this,getResources().getString(R.string.please_wait));
Utils.progressBar.show(this, getResources().getString(R.string.please_wait));
Object[] args = new Object[1];
args[0] =sector.getId();
args[0] = sector.getId();
restClient.worker_updateSector(Utils.getMapWhitUser(this),args).enqueue(new Callback<Void>() {
restClient.worker_updateSector(Utils.getMapWhitUser(this), args).enqueue(new Callback<Void>() {
@Override
public void onResponse(Call<Void> call, Response<Void> response) {
Utils.progressBar.getDialog().dismiss();
@ -141,7 +137,7 @@ public class InfoActivity extends AppCompatActivity {
LocalStorage.saveSector(getApplicationContext(), sector);
txtSectorInfo.setText(LocalStorage.getSectorDescrip(getApplicationContext()));
}else{
} else {
txtSectorInfo.setText(LocalStorage.getSectorDescrip(getApplicationContext()));
Utils.showErrorDialog(getBaseContext(), "Error al guarda. Pruebe de nuevo a seleccionar sector");
}
@ -158,7 +154,7 @@ public class InfoActivity extends AppCompatActivity {
}
private void worker_getSector(){
private void worker_getSector() {
// Utils.progressBar.show(this,getResources().getString(R.string.please_wait));
Object[] args = new Object[1];
@ -174,7 +170,7 @@ public class InfoActivity extends AppCompatActivity {
txtSectorInfo.setText(response.body().getDescription());
}else{
} else {
Utils.showErrorDialog(getBaseContext(), "Error al guarda. Pruebe de nuevo a seleccionar sector");
txtSectorInfo.setText(LocalStorage.getSectorDescrip(getApplicationContext()));
}
@ -191,22 +187,22 @@ public class InfoActivity extends AppCompatActivity {
}
private void company_getInfo(String id){
private void company_getInfo(String id) {
Utils.progressBar.show(this,getResources().getString(R.string.please_wait));
Utils.progressBar.show(this, getResources().getString(R.string.please_wait));
Object[] args = new Object[1];
args[0] =id;
args[0] = id;
// restClient.getInfo(Utils.getMapWhitUser(this),args).enqueue(new Callback<List<DeliveryInfo>>() {
restClient.getInfoCompany(Utils.getMapWhitUser(this),args).enqueue(new Callback<List<DeliveryInfo>>() {
restClient.getInfoCompany(Utils.getMapWhitUser(this), args).enqueue(new Callback<List<DeliveryInfo>>() {
@Override
public void onResponse(Call<List<DeliveryInfo>> call, Response<List<DeliveryInfo>> response) {
Utils.progressBar.getDialog().dismiss();
if (response.isSuccessful()) {
for (DeliveryInfo deliveryInfo : response.body()){
for (DeliveryInfo deliveryInfo : response.body()) {
txtAdressCorp.setText(deliveryInfo.getStreet()+","+deliveryInfo.getPostCode()+" "+deliveryInfo.getCity());
txtAdressCorp.setText(deliveryInfo.getStreet() + "," + deliveryInfo.getPostCode() + " " + deliveryInfo.getCity());
txtNIFCorp.setText(deliveryInfo.getNif());
txtNameCorp.setText(deliveryInfo.getName());
}
@ -223,17 +219,18 @@ public class InfoActivity extends AppCompatActivity {
}
private void freelance_getInfo(String id){
private void freelance_getInfo(String id) {
// Utils.progressBar.show(this,getResources().getString(R.string.please_wait));
Object[] args = new Object[1];
args[0] =id;
restClient.getInfoFreelance(Utils.getMapWhitUser(this),args).enqueue(new Callback<List<DeliveryInfo>>() {
args[0] = id;
restClient.getInfoFreelance(Utils.getMapWhitUser(this), args).enqueue(new Callback<List<DeliveryInfo>>() {
@Override
public void onResponse(Call<List<DeliveryInfo>> call, Response<List<DeliveryInfo>> response) {
Utils.progressBar.getDialog().dismiss();
if (response.isSuccessful()) {
for (DeliveryInfo deliveryInfo : response.body()){
for (DeliveryInfo deliveryInfo : response.body()) {
txtCodigoPostal.setText(deliveryInfo.getPostCode());
txtDireccionFiscal.setText(deliveryInfo.getStreet());
txtMunicipio.setText(deliveryInfo.getCity());
@ -253,7 +250,7 @@ public class InfoActivity extends AppCompatActivity {
}
private void get_Sectors(){
private void get_Sectors() {
// Utils.progressBar.show(this,getResources().getString(R.string.please_wait));
Object[] args = new Object[1];
//args[0] =id;
@ -263,7 +260,7 @@ public class InfoActivity extends AppCompatActivity {
Utils.progressBar.getDialog().dismiss();
if (response.isSuccessful()) {
for (SectorItem sectorInfo : response.body()){
for (SectorItem sectorInfo : response.body()) {
// Log.d("VERDNATURA::","El sector es "+sectorInfo.getDescription()+"-"+sectorInfo.getWarehouseFk()+"-"+sectorInfo.getId());
sectors.add(sectorInfo);
listSectors.add(sectorInfo.getDescription());

View File

@ -7,9 +7,9 @@ public class ApiUtils {
//public static final String BASE_URL = "http://10.1.4.42:9000/";
//public static final String BASE_URL = "http://192.168.1.128:9000/";
public static final String BASE_URL = "https://test-app.verdnatura.es/";
//public static final String BASE_URL = "https://test-app.verdnatura.es/";
//public static final String BASE_URL = "https://app.verdnatura.es/";
public static final String BASE_URL = "https://app.verdnatura.es/";
public static RestClient getAPIService() {
return RetrofitClient.getClient(BASE_URL).create(RestClient.class);

View File

@ -6,8 +6,8 @@ public class ApiUtilsSalix {
private ApiUtilsSalix() {}
//public static final String BASE_URL_SALIX = "https://salix.verdnatura.es/";
public static final String BASE_URL_SALIX = "https://test-salix.verdnatura.es/";
public static final String BASE_URL_SALIX = "https://salix.verdnatura.es/";
// public static final String BASE_URL_SALIX = "https://test-salix.verdnatura.es/";
// public static final String BASE_URL_SALIX = "http://localhost:3000/";
public static RestClientSalix getAPIService() {
return RetrofitClientSalix.getClient(BASE_URL_SALIX).create(RestClientSalix.class);