refs #4602 Modificar abrir vn-picking
This commit is contained in:
parent
18d8bc34b2
commit
2b8c19588a
|
@ -8,4 +8,19 @@
|
||||||
|
|
||||||
\f0\fs26 \cf2 \expnd0\expndtw0\kerning0
|
\f0\fs26 \cf2 \expnd0\expndtw0\kerning0
|
||||||
\outl0\strokewidth0 \strokec2 build\
|
\outl0\strokewidth0 \strokec2 build\
|
||||||
|
*.iml
|
||||||
|
.gradle
|
||||||
|
/local.properties
|
||||||
|
/.idea/caches
|
||||||
|
/.idea/libraries
|
||||||
|
/.idea/modules.xml
|
||||||
|
/.idea/workspace.xml
|
||||||
|
/.idea/navEditor.xml
|
||||||
|
/.idea/assetWizardSettings.xml
|
||||||
|
.DS_Store
|
||||||
|
/build
|
||||||
|
/captures
|
||||||
|
.externalNativeBuild
|
||||||
|
.cxx
|
||||||
|
local.properties
|
||||||
buildsystem}
|
buildsystem}
|
|
@ -56,3 +56,4 @@ captures/
|
||||||
.externalNativeBuild
|
.externalNativeBuild
|
||||||
.cxx
|
.cxx
|
||||||
*.jar
|
*.jar
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
<uses-permission android:name="android.permission.LAUNCH_APPS" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
|
|
|
@ -4,11 +4,10 @@ import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
|
import android.content.Intent;
|
||||||
import android.content.SharedPreferences;
|
import android.content.SharedPreferences;
|
||||||
import android.content.pm.ApplicationInfo;
|
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.support.v4.BuildConfig;
|
|
||||||
import android.text.InputType;
|
import android.text.InputType;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
@ -16,8 +15,6 @@ import android.widget.EditText;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import verdnatura.es.repartoverdnatura.R;
|
|
||||||
|
|
||||||
public class Utils {
|
public class Utils {
|
||||||
|
|
||||||
static SharedPreferences sp;
|
static SharedPreferences sp;
|
||||||
|
@ -36,7 +33,7 @@ public class Utils {
|
||||||
/* ApplicationInfo applicationInfo = context.getApplicationInfo();
|
/* ApplicationInfo applicationInfo = context.getApplicationInfo();
|
||||||
int stringId = applicationInfo.labelRes;
|
int stringId = applicationInfo.labelRes;
|
||||||
return stringId == 0 ? applicationInfo.nonLocalizedLabel.toString() : context.getString(stringId);*/
|
return stringId == 0 ? applicationInfo.nonLocalizedLabel.toString() : context.getString(stringId);*/
|
||||||
return "delivery";
|
return "delivery";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getAppVersion(Context context) {
|
public static String getAppVersion(Context context) {
|
||||||
|
@ -124,12 +121,12 @@ public class Utils {
|
||||||
AlertDialog alert11 = builder1.create();
|
AlertDialog alert11 = builder1.create();
|
||||||
alert11.show();
|
alert11.show();
|
||||||
}
|
}
|
||||||
public static void showInputDialogExpedition(final Context context, String title) {
|
public static void showInputDialogExpedition(final Context context, String title) {
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||||
builder.setTitle(title);
|
builder.setTitle(title);
|
||||||
|
|
||||||
// Set up the input
|
// Set up the input
|
||||||
final EditText input = new EditText(context);
|
final EditText input = new EditText(context);
|
||||||
// Specify the type of input expected; this, for example, sets the input as a password, and will mask the text
|
// Specify the type of input expected; this, for example, sets the input as a password, and will mask the text
|
||||||
input.setInputType(InputType.TYPE_CLASS_NUMBER );
|
input.setInputType(InputType.TYPE_CLASS_NUMBER );
|
||||||
builder.setView(input);
|
builder.setView(input);
|
||||||
|
@ -148,8 +145,8 @@ public static void showInputDialogExpedition(final Context context, String title
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
builder.show();
|
builder.show();
|
||||||
}
|
}
|
||||||
public static void saveIdUser(Context context, String idUser) {
|
public static void saveIdUser(Context context, String idUser) {
|
||||||
sp = context.getSharedPreferences("delivery", Activity.MODE_PRIVATE);
|
sp = context.getSharedPreferences("delivery", Activity.MODE_PRIVATE);
|
||||||
SharedPreferences.Editor editor = sp.edit();
|
SharedPreferences.Editor editor = sp.edit();
|
||||||
|
@ -208,4 +205,14 @@ public static void showInputDialogExpedition(final Context context, String title
|
||||||
editor.commit();
|
editor.commit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void startPicking(Context context) {
|
||||||
|
|
||||||
|
Intent i = new Intent();
|
||||||
|
i.setClassName("es.verdnatura", "es.verdnatura.presentation.view.feature.login.activity.LoginActivity");
|
||||||
|
i.putExtra("token", "sergiodt");
|
||||||
|
i.putExtra("user", getIdUserLogin(context));
|
||||||
|
i.putExtra("pass", getPass(context));
|
||||||
|
context.startActivity(i);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue