#Version 23.6 en testBeta
This commit is contained in:
parent
67f0202929
commit
27b9a694c8
|
@ -1,2 +1,2 @@
|
||||||
#Mon Nov 25 09:23:07 CET 2019
|
#Thu Feb 23 08:13:25 CET 2023
|
||||||
gradle.version=5.4.1
|
gradle.version=5.6.4
|
||||||
|
|
|
@ -7,13 +7,10 @@ android {
|
||||||
applicationId "verdnatura.es.repartoverdnatura"
|
applicationId "verdnatura.es.repartoverdnatura"
|
||||||
minSdkVersion 19
|
minSdkVersion 19
|
||||||
//targetSdkVersion 28
|
//targetSdkVersion 28
|
||||||
versionCode 33
|
versionCode 36
|
||||||
versionName "23.2Beta"
|
versionName "23.6"
|
||||||
//versionName "23.2Beta" Madrid 33
|
//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"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
multiDexEnabled true
|
multiDexEnabled true
|
||||||
|
@ -29,12 +26,12 @@ android {
|
||||||
getByName("debug") {
|
getByName("debug") {
|
||||||
applicationIdSuffix = ".sfusion"
|
applicationIdSuffix = ".sfusion"
|
||||||
}*/
|
}*/
|
||||||
getByName("release") {
|
/* getByName("release") {
|
||||||
applicationIdSuffix = ".sfusionMadrid"
|
applicationIdSuffix = ".sfusion"
|
||||||
}
|
}
|
||||||
getByName("debug") {
|
getByName("debug") {
|
||||||
applicationIdSuffix = ".sfusionMadrid"
|
applicationIdSuffix = ".sfusion"
|
||||||
}
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,51 @@
|
||||||
"client_info": {
|
"client_info": {
|
||||||
"mobilesdk_app_id": "1:622584359076:android:49dda1d8a6dc59f9",
|
"mobilesdk_app_id": "1:622584359076:android:49dda1d8a6dc59f9",
|
||||||
"android_client_info": {
|
"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": [
|
"oauth_client": [
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
package verdnatura.es.repartoverdnatura;
|
package verdnatura.es.repartoverdnatura;
|
||||||
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
|
import android.os.Bundle;
|
||||||
import android.support.v7.app.AlertDialog;
|
import android.support.v7.app.AlertDialog;
|
||||||
import android.support.v7.app.AppCompatActivity;
|
import android.support.v7.app.AppCompatActivity;
|
||||||
import android.os.Bundle;
|
|
||||||
import android.util.Log;
|
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
@ -19,19 +17,17 @@ import java.util.List;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.Callback;
|
import retrofit2.Callback;
|
||||||
import retrofit2.Response;
|
import retrofit2.Response;
|
||||||
import verdnatura.es.repartoverdnatura.ADAPTERS.WorkerAdapter;
|
|
||||||
import verdnatura.es.repartoverdnatura.INTERFACES.RestClient;
|
import verdnatura.es.repartoverdnatura.INTERFACES.RestClient;
|
||||||
import verdnatura.es.repartoverdnatura.MODELS.DeliveryInfo;
|
import verdnatura.es.repartoverdnatura.MODELS.DeliveryInfo;
|
||||||
import verdnatura.es.repartoverdnatura.MODELS.Ruta;
|
import verdnatura.es.repartoverdnatura.MODELS.Ruta;
|
||||||
import verdnatura.es.repartoverdnatura.MODELS.SectorItem;
|
import verdnatura.es.repartoverdnatura.MODELS.SectorItem;
|
||||||
import verdnatura.es.repartoverdnatura.MODELS.Worker;
|
|
||||||
import verdnatura.es.repartoverdnatura.UTILS.ApiUtils;
|
import verdnatura.es.repartoverdnatura.UTILS.ApiUtils;
|
||||||
import verdnatura.es.repartoverdnatura.UTILS.LocalStorage;
|
import verdnatura.es.repartoverdnatura.UTILS.LocalStorage;
|
||||||
import verdnatura.es.repartoverdnatura.UTILS.Utils;
|
import verdnatura.es.repartoverdnatura.UTILS.Utils;
|
||||||
|
|
||||||
public class InfoActivity extends AppCompatActivity {
|
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 ImageView imgSectorEdit;
|
||||||
private RestClient restClient;
|
private RestClient restClient;
|
||||||
public Ruta route;
|
public Ruta route;
|
||||||
|
@ -57,9 +53,9 @@ public class InfoActivity extends AppCompatActivity {
|
||||||
txtNIFCorp = (TextView) findViewById(R.id.textView5);
|
txtNIFCorp = (TextView) findViewById(R.id.textView5);
|
||||||
txtAdressCorp = (TextView) findViewById(R.id.textView6);
|
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() {
|
imgSectorEdit.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
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() {
|
txtSectorInfo.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
|
@ -119,20 +115,20 @@ public class InfoActivity extends AppCompatActivity {
|
||||||
PackageManager packageManager = getApplicationContext().getPackageManager();
|
PackageManager packageManager = getApplicationContext().getPackageManager();
|
||||||
try {
|
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) {
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
e.printStackTrace();
|
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];
|
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
|
@Override
|
||||||
public void onResponse(Call<Void> call, Response<Void> response) {
|
public void onResponse(Call<Void> call, Response<Void> response) {
|
||||||
Utils.progressBar.getDialog().dismiss();
|
Utils.progressBar.getDialog().dismiss();
|
||||||
|
@ -141,7 +137,7 @@ public class InfoActivity extends AppCompatActivity {
|
||||||
LocalStorage.saveSector(getApplicationContext(), sector);
|
LocalStorage.saveSector(getApplicationContext(), sector);
|
||||||
txtSectorInfo.setText(LocalStorage.getSectorDescrip(getApplicationContext()));
|
txtSectorInfo.setText(LocalStorage.getSectorDescrip(getApplicationContext()));
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
txtSectorInfo.setText(LocalStorage.getSectorDescrip(getApplicationContext()));
|
txtSectorInfo.setText(LocalStorage.getSectorDescrip(getApplicationContext()));
|
||||||
Utils.showErrorDialog(getBaseContext(), "Error al guarda. Pruebe de nuevo a seleccionar sector");
|
Utils.showErrorDialog(getBaseContext(), "Error al guarda. Pruebe de nuevo a seleccionar sector");
|
||||||
}
|
}
|
||||||
|
@ -158,9 +154,9 @@ public class InfoActivity extends AppCompatActivity {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void worker_getSector(){
|
private void worker_getSector() {
|
||||||
|
|
||||||
// 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];
|
Object[] args = new Object[1];
|
||||||
//args[0] =id;
|
//args[0] =id;
|
||||||
|
|
||||||
|
@ -174,7 +170,7 @@ public class InfoActivity extends AppCompatActivity {
|
||||||
|
|
||||||
txtSectorInfo.setText(response.body().getDescription());
|
txtSectorInfo.setText(response.body().getDescription());
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
Utils.showErrorDialog(getBaseContext(), "Error al guarda. Pruebe de nuevo a seleccionar sector");
|
Utils.showErrorDialog(getBaseContext(), "Error al guarda. Pruebe de nuevo a seleccionar sector");
|
||||||
txtSectorInfo.setText(LocalStorage.getSectorDescrip(getApplicationContext()));
|
txtSectorInfo.setText(LocalStorage.getSectorDescrip(getApplicationContext()));
|
||||||
}
|
}
|
||||||
|
@ -191,49 +187,50 @@ 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];
|
Object[] args = new Object[1];
|
||||||
args[0] =id;
|
args[0] = id;
|
||||||
|
|
||||||
// restClient.getInfo(Utils.getMapWhitUser(this),args).enqueue(new Callback<List<DeliveryInfo>>() {
|
// 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
|
@Override
|
||||||
public void onResponse(Call<List<DeliveryInfo>> call, Response<List<DeliveryInfo>> response) {
|
public void onResponse(Call<List<DeliveryInfo>> call, Response<List<DeliveryInfo>> response) {
|
||||||
Utils.progressBar.getDialog().dismiss();
|
Utils.progressBar.getDialog().dismiss();
|
||||||
if (response.isSuccessful()) {
|
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());
|
txtNIFCorp.setText(deliveryInfo.getNif());
|
||||||
txtNameCorp.setText(deliveryInfo.getName());
|
txtNameCorp.setText(deliveryInfo.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<List<DeliveryInfo>> call, Throwable t) {
|
public void onFailure(Call<List<DeliveryInfo>> call, Throwable t) {
|
||||||
// //Log.i("VERDNATURA","El error es"+t.getMessage().toString());
|
// //Log.i("VERDNATURA","El error es"+t.getMessage().toString());
|
||||||
Utils.progressBar.getDialog().dismiss();
|
Utils.progressBar.getDialog().dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
private void freelance_getInfo(String id){
|
|
||||||
// Utils.progressBar.show(this,getResources().getString(R.string.please_wait));
|
private void freelance_getInfo(String id) {
|
||||||
|
// Utils.progressBar.show(this,getResources().getString(R.string.please_wait));
|
||||||
Object[] args = new Object[1];
|
Object[] args = new Object[1];
|
||||||
args[0] =id;
|
args[0] = id;
|
||||||
restClient.getInfoFreelance(Utils.getMapWhitUser(this),args).enqueue(new Callback<List<DeliveryInfo>>() {
|
restClient.getInfoFreelance(Utils.getMapWhitUser(this), args).enqueue(new Callback<List<DeliveryInfo>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onResponse(Call<List<DeliveryInfo>> call, Response<List<DeliveryInfo>> response) {
|
public void onResponse(Call<List<DeliveryInfo>> call, Response<List<DeliveryInfo>> response) {
|
||||||
Utils.progressBar.getDialog().dismiss();
|
Utils.progressBar.getDialog().dismiss();
|
||||||
if (response.isSuccessful()) {
|
if (response.isSuccessful()) {
|
||||||
|
|
||||||
for (DeliveryInfo deliveryInfo : response.body()){
|
for (DeliveryInfo deliveryInfo : response.body()) {
|
||||||
txtCodigoPostal.setText(deliveryInfo.getPostCode());
|
txtCodigoPostal.setText(deliveryInfo.getPostCode());
|
||||||
txtDireccionFiscal.setText(deliveryInfo.getStreet());
|
txtDireccionFiscal.setText(deliveryInfo.getStreet());
|
||||||
txtMunicipio.setText(deliveryInfo.getCity());
|
txtMunicipio.setText(deliveryInfo.getCity());
|
||||||
|
@ -245,7 +242,7 @@ public class InfoActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Call<List<DeliveryInfo>> call, Throwable t) {
|
public void onFailure(Call<List<DeliveryInfo>> call, Throwable t) {
|
||||||
// //Log.i("VERDNATURA","El error es"+t.getMessage().toString());
|
// //Log.i("VERDNATURA","El error es"+t.getMessage().toString());
|
||||||
Utils.progressBar.getDialog().dismiss();
|
Utils.progressBar.getDialog().dismiss();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -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));
|
// Utils.progressBar.show(this,getResources().getString(R.string.please_wait));
|
||||||
Object[] args = new Object[1];
|
Object[] args = new Object[1];
|
||||||
//args[0] =id;
|
//args[0] =id;
|
||||||
|
@ -263,8 +260,8 @@ public class InfoActivity extends AppCompatActivity {
|
||||||
Utils.progressBar.getDialog().dismiss();
|
Utils.progressBar.getDialog().dismiss();
|
||||||
if (response.isSuccessful()) {
|
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());
|
// Log.d("VERDNATURA::","El sector es "+sectorInfo.getDescription()+"-"+sectorInfo.getWarehouseFk()+"-"+sectorInfo.getId());
|
||||||
sectors.add(sectorInfo);
|
sectors.add(sectorInfo);
|
||||||
listSectors.add(sectorInfo.getDescription());
|
listSectors.add(sectorInfo.getDescription());
|
||||||
|
|
||||||
|
|
|
@ -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://10.1.4.42:9000/";
|
||||||
//public static final String BASE_URL = "http://192.168.1.128: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() {
|
public static RestClient getAPIService() {
|
||||||
return RetrofitClient.getClient(BASE_URL).create(RestClient.class);
|
return RetrofitClient.getClient(BASE_URL).create(RestClient.class);
|
||||||
|
|
|
@ -6,8 +6,8 @@ public class ApiUtilsSalix {
|
||||||
private ApiUtilsSalix() {}
|
private ApiUtilsSalix() {}
|
||||||
|
|
||||||
|
|
||||||
//public static final String BASE_URL_SALIX = "https://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 = "https://test-salix.verdnatura.es/";
|
||||||
// public static final String BASE_URL_SALIX = "http://localhost:3000/";
|
// public static final String BASE_URL_SALIX = "http://localhost:3000/";
|
||||||
public static RestClientSalix getAPIService() {
|
public static RestClientSalix getAPIService() {
|
||||||
return RetrofitClientSalix.getClient(BASE_URL_SALIX).create(RestClientSalix.class);
|
return RetrofitClientSalix.getClient(BASE_URL_SALIX).create(RestClientSalix.class);
|
||||||
|
|
Loading…
Reference in New Issue