Merge branch 'master' into GG_T2P_Add_Camera

This commit is contained in:
YadavendraSinghYaduvanshi
2017-02-01 13:43:16 +05:30
committed by GitHub
17 changed files with 248 additions and 81 deletions
+4 -2
View File
@@ -14,8 +14,10 @@ android {
applicationId "cpm.com.gskmtorange"
minSdkVersion 15
targetSdkVersion 22
versionCode 3
versionName "1.2"
versionCode 4
versionName "1.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
@@ -592,9 +592,9 @@ public class GSKOrangeDB extends SQLiteOpenHelper {
values.put("CHECKOUT_STATUS", status);
values1.put(CommonString.KEY_COVERAGE_STATUS, status);
db.update(CommonString.TABLE_COVERAGE_DATA, values1, CommonString.KEY_STORE_ID + "='" + id + "'", null);
db.update(CommonString.KEY_JOURNEY_PLAN, values, CommonString.KEY_STORE_ID + "='" + id + "'", null);
//db.update(CommonString.TABLE_COVERAGE_DATA, values1, CommonString.KEY_STORE_ID + "='" + id + "'", null);
} catch (Exception ex) {
@@ -124,7 +124,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
ArrayList<GeotaggingBeans> geotaglist = new ArrayList<GeotaggingBeans>();
ArrayList<GeotaggingBeans> geotaglistImage = new ArrayList<GeotaggingBeans>();
Boolean markerflag=true;
private TextView percentage, message;
private FailureGetterSetter failureGetterSetter = null;
/**
@@ -251,7 +251,8 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
fabcarmabtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
/* List<ApplicationInfo> list = packageManager.getInstalledApplications(PackageManager.GET_UNINSTALLED_PACKAGES);
for (int n = 0; n < list.size(); n++) {
if ((list.get(n).flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
Log.d("TAG", "Installed Applications : " + list.get(n).loadLabel(packageManager).toString());
@@ -261,9 +262,9 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
break;
}
}
}
}*/
_pathforcheck = storeid + getResources().getString(R.string.store) + getResources().getString(R.string.image) + getCurrentTime().replace(":", "") + ".jpg";
_pathforcheck = storeid +"GeoTag" + visitData.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
_path = CommonString.FILE_PATH + _pathforcheck;
@@ -333,8 +334,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
@Override
public void onConnected(Bundle bundle) {
mLastLocation = LocationServices.FusedLocationApi
.getLastLocation(mGoogleApiClient);
mLastLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);
if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED
|| ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
@@ -344,11 +344,17 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
mMap.setMyLocationEnabled(true);
if(markerflag=true)
{
// Add a marker of latest location and move the camera
LatLng latLng = new LatLng(latitude, longitude);
mMap.addMarker(new MarkerOptions().position(latLng));
mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
mMap.animateCamera(CameraUpdateFactory.zoomTo(15));
}
}
}
@@ -526,6 +532,7 @@ public class GeoTagActivity extends AppCompatActivity implements OnMapReadyCallb
img_str = _pathforcheck;
_pathforcheck = "";
markerflag=false;
}
}
@@ -134,6 +134,13 @@ public class MainActivity extends AppCompatActivity
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
toolbar.setTitle(getString(R.string.main_menu_activity_name));
db.open();
coverageList = db.getCoverageData(date);
storelist = db.getStoreData(date);
}
@Override
@@ -228,6 +235,7 @@ public class MainActivity extends AppCompatActivity
if (coverageList.size() == 0) {
Snackbar.make(webView, R.string.no_data_for_upload, Snackbar.LENGTH_SHORT).setAction("Action", null).show();
} else {
if (isStoreCheckedIn() && isValid()) {
@@ -252,8 +260,7 @@ public class MainActivity extends AppCompatActivity
}
} else if (id == R.id.nav_geotag) {
db.open();
storelist = db.getStoreData(date);
if (storelist.size() > 0) {
@@ -7,6 +7,8 @@ import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Environment;
@@ -24,6 +26,7 @@ import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.text.DecimalFormat;
import java.util.Locale;
import cpm.com.gskmtorange.LoginActivity;
import cpm.com.gskmtorange.R;
@@ -43,6 +46,8 @@ public class AutoUpdateActivity extends AppCompatActivity {
ProgressBar progressBar;
private boolean status;
private SharedPreferences preferences;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -51,11 +56,15 @@ public class AutoUpdateActivity extends AppCompatActivity {
path = intent.getStringExtra(CommonString.KEY_PATH);
preferences = PreferenceManager.getDefaultSharedPreferences(this);
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Parinaam");
builder.setMessage("New Update Available.")
builder.setMessage(getString(R.string.new_update_available))
.setCancelable(false)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
SharedPreferences preferences = PreferenceManager
@@ -116,7 +125,7 @@ public class AutoUpdateActivity extends AppCompatActivity {
versionCode = getPackageManager().getPackageInfo(
getPackageName(), 0).versionName;
data.name = "Upgraditing Version : " + versionCode;
data.name = "Upgrading Version : " + versionCode;
publishProgress(data);
// download application
@@ -280,4 +289,29 @@ public class AutoUpdateActivity extends AppCompatActivity {
alert.show();
}
private static boolean updateResources(Context context, String language) {
String lang;
if (language.equalsIgnoreCase("English")) {
lang = "EN";
} else if (language.equalsIgnoreCase("UAE")) {
lang = "AR";
} else {
lang = "TR";
}
Locale locale = new Locale(lang);
Locale.setDefault(locale);
Resources resources = context.getResources();
Configuration configuration = resources.getConfiguration();
configuration.locale = locale;
resources.updateConfiguration(configuration, resources.getDisplayMetrics());
return true;
}
}
@@ -676,8 +676,7 @@ public class AdditionalVisibility extends AppCompatActivity implements View.OnCl
btnimage.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
_pathforcheck = store_id + getResources().getString(R.string.store)
+ getResources().getString(R.string.image) + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
_pathforcheck = store_id + "AdditionalVisibility" + date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
_path = CommonString.FILE_PATH + _pathforcheck;
intime = getCurrentTime();
@@ -293,7 +293,8 @@ public class CheckoutActivity extends AppCompatActivity {
finish();
} else if (!result.equals("")) {
}
else if (!result.equals("")) {
/*AlertMessage message = new AlertMessage(
CheckOutStoreActivity.this, CommonString1.ERROR + result, "success", null);
message.showMessage();*/
@@ -101,7 +101,9 @@ public class NonWorkingReason extends AppCompatActivity implements
_UserId = preferences.getString(CommonString.KEY_USERNAME, "");
visit_date = preferences.getString(CommonString.KEY_DATE, null);
store_id = preferences.getString(CommonString.KEY_STORE_ID, "");
store_id = getIntent().getStringExtra(CommonString.KEY_STORE_ID);
//store_id = preferences.getString(CommonString.KEY_STORE_ID, "");
database = new GSKOrangeDB(this);
database.open();
@@ -310,7 +312,8 @@ public class NonWorkingReason extends AppCompatActivity implements
public void onClick(View v) {
// TODO Auto-generated method stub
if (v.getId() == R.id.imgcam) {
_pathforcheck = store_id + "NonWorking" + _UserId + ".jpg";
_pathforcheck = store_id +"NonWorking" + visit_date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
_path = CommonString.FILE_PATH + _pathforcheck;
@@ -34,11 +34,13 @@ public class SettingsActivity extends AppCompatActivity implements SelectLanguag
private SharedPreferences.Editor editor = null;
Toolbar toolbar;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_settings);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
@@ -131,6 +133,7 @@ public class SettingsActivity extends AppCompatActivity implements SelectLanguag
protected void onResume() {
super.onResume();
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
toolbar.setTitle(R.string.title_activity_settings);
}
private static boolean updateResources(Context context, String language) {
@@ -49,7 +49,7 @@ import cpm.com.gskmtorange.gsk_dailyentry.StoreWisePerformanceActivity;
*/
public class StoreListActivity extends AppCompatActivity {
ArrayList<CoverageBean> coverage;
ArrayList<CoverageBean> coverage = new ArrayList<CoverageBean>();
ArrayList<StoreBean> storelist = new ArrayList<StoreBean>();
//ListView list;
private SharedPreferences preferences;
@@ -110,7 +110,7 @@ public class StoreListActivity extends AppCompatActivity {
updateResources(getApplicationContext(), preferences.getString(CommonString.KEY_LANGUAGE, ""));
toolbar.setTitle(getString(R.string.title_activity_store_list));
db.open();
storelist = db.getStoreData(date);
coverage = db.getCoverageData(date);
@@ -200,10 +200,11 @@ public class StoreListActivity extends AppCompatActivity {
viewHolder.txt.setText(current.getSTORE_NAME());
viewHolder.address.setText(current.getADDRESS());
if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_VALID)) {
/* if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_VALID)) {
viewHolder.chkbtn.setVisibility(View.VISIBLE);
viewHolder.imageview.setVisibility(View.INVISIBLE);
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_U)) {
} else*/
if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.KEY_U)) {
viewHolder.imageview.setVisibility(View.VISIBLE);
viewHolder.imageview.setBackgroundResource(R.mipmap.tick);
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
@@ -228,20 +229,62 @@ public class StoreListActivity extends AppCompatActivity {
viewHolder.imageview.setVisibility(View.VISIBLE);
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
} else if (checkleavestatus(storeid)) {
}/* else if (checkleavestatus(storeid)) {
viewHolder.imageview.setVisibility(View.VISIBLE);
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
} else if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_INVALID)) {
}*/
/*else if (current.getCHECKOUT_STATUS().equalsIgnoreCase(CommonString.KEY_INVALID)) {
if (coverage.size() > 0) {
}*/
else if (coverage.size() > 0) {
String statusleave="";
int i;
for (int i = 0; i < coverage.size(); i++) {
for (i = 0; i < coverage.size(); i++) {
if (storeid.equals(coverage.get(i).getStoreId())) {
statusleave=coverage.get(i).getStatus();
if (coverage.get(i).getInTime() != null) {
if(statusleave.equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)){
viewHolder.imageview.setVisibility(View.VISIBLE);
viewHolder.imageview.setBackgroundResource(R.mipmap.exclamation);
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
}
else if(coverage.get(i).getStatus().equalsIgnoreCase(CommonString.KEY_VALID))
{
viewHolder.Cardbtn.setCardBackgroundColor(getResources().getColor(R.color.colorOrange));
viewHolder.chkbtn.setVisibility(View.VISIBLE);
viewHolder.imageview.setVisibility(View.INVISIBLE);
}
else if(coverage.get(i).getStatus().equalsIgnoreCase(CommonString.KEY_INVALID)){
viewHolder.imageview.setVisibility(View.INVISIBLE);
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
viewHolder.Cardbtn.setCardBackgroundColor(getResources().getColor(R.color.green));
}
else {
viewHolder.Cardbtn.setCardBackgroundColor(getResources().getColor(R.color.colorOrange));
viewHolder.imageview.setVisibility(View.INVISIBLE);
viewHolder.chkbtn.setVisibility(View.INVISIBLE);
}
break;
}
/* if (coverage.get(i).getInTime() != null) {
if (coverage.get(i).getOutTime() == null) {
@@ -256,11 +299,11 @@ public class StoreListActivity extends AppCompatActivity {
break;
}
}
}*/
}
}
} else {
}else {
viewHolder.Cardbtn.setCardBackgroundColor(getResources().getColor(R.color.colorOrange));
viewHolder.imageview.setVisibility(View.INVISIBLE);
@@ -290,7 +333,9 @@ public class StoreListActivity extends AppCompatActivity {
Snackbar.make(v, R.string.title_store_list_activity_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
} else if (current.getUPLOAD_STATUS().equalsIgnoreCase(CommonString.STORE_STATUS_LEAVE)) {
Snackbar.make(v, R.string.title_store_list_activity_already_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
} else if (checkleavestatus(store_id)) {
}
else if (checkleavestatus(store_id)) {
Snackbar.make(v, R.string.title_store_list_activity_already_store_closed, Snackbar.LENGTH_LONG).setAction("Action", null).show();
@@ -298,20 +343,7 @@ public class StoreListActivity extends AppCompatActivity {
} else {
// PUT IN PREFERENCES
editor = preferences.edit();
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
editor.putString(CommonString.KEY_CAMERA_ALLOW, current.getCAMERA_ALLOW());
editor.putString(CommonString.KEY_CHECKOUT_STATUS, current.getCHECKOUT_STATUS());
editor.putString(CommonString.KEY_CLASS_ID, current.getCLASS_ID());
editor.putString(CommonString.KEY_EMP_ID, current.getEMP_ID());
editor.putString(CommonString.KEY_GEO_TAG, current.getGEO_TAG());
editor.putString(CommonString.KEY_KEYACCOUNT_ID, current.getKEYACCOUNT_ID());
editor.putString(CommonString.KEY_STORETYPE_ID, current.getSTORETYPE_ID());
editor.putString(CommonString.KEY_UPLOAD_STATUS, current.getUPLOAD_STATUS());
editor.commit();
// showMyDialog(store_id, current.getSTORE_NAME(), "Yes", current.getVISIT_DATE(), current.getCHECKOUT_STATUS());
@@ -336,7 +368,7 @@ public class StoreListActivity extends AppCompatActivity {
}
if (enteryflag) {
showMyDialog(store_id, current.getSTORE_NAME(), "Yes", current.getVISIT_DATE(), current.getCHECKOUT_STATUS());
showMyDialog(store_id, current.getSTORE_NAME(), "Yes", current.getVISIT_DATE(), current.getCHECKOUT_STATUS(),current.getGEO_TAG(),current);
}
} else {
Snackbar.make(v, R.string.title_store_list_checkout_Already_filled, Snackbar.LENGTH_SHORT).setAction("Action", null).show();
@@ -439,7 +471,7 @@ public class StoreListActivity extends AppCompatActivity {
}
void showMyDialog(final String storeCd, final String storeName, final String status, final String visitDate, final String checkout_status) {
void showMyDialog(final String storeCd, final String storeName, final String status, final String visitDate, final String checkout_status,final String GeotagStatus,final StoreBean current) {
dialog = new Dialog(this);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.dialogbox);
@@ -452,6 +484,25 @@ public class StoreListActivity extends AppCompatActivity {
public void onCheckedChanged(RadioGroup group, int checkedId) {
// find which radio button is selected
if (checkedId == R.id.yes) {
if(!GeotagStatus.equalsIgnoreCase("N")){
editor = preferences.edit();
editor.putString(CommonString.KEY_STORE_ID, current.getSTORE_ID());
editor.putString(CommonString.KEY_STORE_NAME, current.getSTORE_NAME());
editor.putString(CommonString.KEY_VISIT_DATE, current.getVISIT_DATE());
editor.putString(CommonString.KEY_CAMERA_ALLOW, current.getCAMERA_ALLOW());
editor.putString(CommonString.KEY_CHECKOUT_STATUS, current.getCHECKOUT_STATUS());
editor.putString(CommonString.KEY_CLASS_ID, current.getCLASS_ID());
editor.putString(CommonString.KEY_EMP_ID, current.getEMP_ID());
editor.putString(CommonString.KEY_GEO_TAG, current.getGEO_TAG());
editor.putString(CommonString.KEY_KEYACCOUNT_ID, current.getKEYACCOUNT_ID());
editor.putString(CommonString.KEY_STORETYPE_ID, current.getSTORETYPE_ID());
editor.putString(CommonString.KEY_UPLOAD_STATUS, current.getUPLOAD_STATUS());
editor.commit();
boolean flag = true;
if (coverage.size() > 0) {
for (int i = 0; i < coverage.size(); i++) {
@@ -462,6 +513,7 @@ public class StoreListActivity extends AppCompatActivity {
}
}
if (flag == true) {
Intent in = new Intent(StoreListActivity.this, StoreimageActivity.class);
startActivity(in);
overridePendingTransition(R.anim.activity_in, R.anim.activity_out);
@@ -473,7 +525,31 @@ public class StoreListActivity extends AppCompatActivity {
dialog.cancel();
}
} else if (checkedId == R.id.no) {
}
else{
dialog.cancel();
AlertDialog.Builder builder = new AlertDialog.Builder(StoreListActivity.this);
builder.setTitle(getResources().getString(R.string.dialog_title));
builder.setMessage(R.string.first_geotag_the_store).setCancelable(false)
.setPositiveButton(getResources().getString(R.string.ok),
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog1,
int id) {
dialog1.cancel();
}
});
AlertDialog alert = builder.create();
alert.show();
}
}else if (checkedId == R.id.no) {
dialog.cancel();
@@ -491,6 +567,7 @@ public class StoreListActivity extends AppCompatActivity {
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
in.putExtra(CommonString.KEY_STORE_ID,current.getSTORE_ID());
startActivity(in);
}
@@ -511,6 +588,7 @@ public class StoreListActivity extends AppCompatActivity {
Intent in = new Intent(StoreListActivity.this, NonWorkingReason.class);
in.putExtra(CommonString.KEY_STORE_ID,current.getSTORE_ID());
startActivity(in);
}
@@ -69,12 +69,15 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
String lat, lon;
GoogleApiClient mGoogleApiClient;
ArrayList<CoverageBean> coverage_list;
Toolbar toolbar;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_storeimage);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
preferences = PreferenceManager.getDefaultSharedPreferences(this);
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
getSupportActionBar().setHomeButtonEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
@@ -84,10 +87,6 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
btn_save = (Button) findViewById(R.id.btn_save_selfie);
preferences = PreferenceManager.getDefaultSharedPreferences(this);
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
store_id = preferences.getString(CommonString.KEY_STORE_ID, null);
visit_date = preferences.getString(CommonString.KEY_DATE, null);
@@ -157,8 +156,7 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
case R.id.img_cam_selfie:
_pathforcheck = store_id + getResources().getString(R.string.store)
+ getResources().getString(R.string.image) + visit_date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
_pathforcheck = store_id +"SI" + visit_date.replace("/", "") + getCurrentTime().replace(":", "") + ".jpg";
_path = CommonString.FILE_PATH + _pathforcheck;
@@ -354,6 +352,7 @@ public class StoreimageActivity extends AppCompatActivity implements View.OnClic
protected void onResume() {
super.onResume();
updateResources(getApplicationContext(),preferences.getString(CommonString.KEY_LANGUAGE, ""));
toolbar.setTitle(R.string.title_activity_store_image);
}
protected void onStart() {
@@ -1,6 +1,7 @@
package cpm.com.gskmtorange.dailyentry;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.content.ActivityNotFoundException;
import android.content.Context;
@@ -53,6 +54,7 @@ import java.util.List;
import java.util.Locale;
import cpm.com.gskmtorange.Database.GSKOrangeDB;
import cpm.com.gskmtorange.GetterSetter.AddittionalGetterSetter;
import cpm.com.gskmtorange.R;
import cpm.com.gskmtorange.constant.CommonString;
import cpm.com.gskmtorange.xmlGetterSetter.BrandMasterGetterSetter;
@@ -122,12 +124,35 @@ public class T2PComplianceActivity extends AppCompatActivity {
if (isValid()) {
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
T2PComplianceActivity.this);
// set title
alertDialogBuilder.setTitle(getResources().getString(R.string.dialog_title));
// set dialog message
alertDialogBuilder
.setMessage(getResources().getString(R.string.title_activity_Want_save))
.setCancelable(false)
.setPositiveButton(getResources().getString(R.string.yes), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
db.InsertT2PData(t2PGetterSetters, store_id, categoryId);
Snackbar.make(view, "Data Saved", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
//Snackbar.make(view, "Data Saved", Snackbar.LENGTH_LONG).setAction("Action", null).show();
finish();
}
})
.setNegativeButton(getResources().getString(R.string.no), new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
// if this button is clicked, just close
// the dialog box and do nothing
dialog.cancel();
}
});
// create alert dialog
AlertDialog alertDialog = alertDialogBuilder.create();
// show it
alertDialog.show();
} else {
Snackbar.make(view, error_msg, Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
@@ -142,6 +167,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
t2PGetterSetters = db.getT2PDefaultData(store_id);
} else {
for (int i = 0; i < t2PGetterSetters.size(); i++) {
ArrayList<GapsChecklistGetterSetter> gapsList = db.getGapsData(t2PGetterSetters.get(i).getKey_id());
ArrayList<SkuGetterSetter> skuList = db.getT2PSKUData(t2PGetterSetters.get(i).getKey_id());
@@ -153,14 +179,6 @@ public class T2PComplianceActivity extends AppCompatActivity {
if (t2PGetterSetters.size() > 0) {
/* for (int i = 0; i < t2PGetterSetters.size(); i++) {
ArrayList<GapsChecklistGetterSetter> gapsChecklist = db.getGapsDefaultData(t2PGetterSetters.get(i).getDisplay_id());
t2PGetterSetters.get(i).setGapsChecklist(gapsChecklist);
}*/
rec_t2p.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
t2PAdapter = new T2PAdapter(t2PGetterSetters);
rec_t2p.setAdapter(t2PAdapter);
@@ -827,7 +845,7 @@ public class T2PComplianceActivity extends AppCompatActivity {
break;
} else if (t2PGetterSetters.get(i).getSkulist().size() == 0) {
flag = false;
error_msg = getResources().getString(R.string.fill_sku_data);
error_msg = getResources().getString(R.string.title_activity_fill_sku);
break;
} else if (camera_allow.equals("1") && (t2PGetterSetters.get(i).getImage().equals("") &&
t2PGetterSetters.get(i).getImage1().equals("") &&
@@ -145,9 +145,9 @@ public class ServiceActivityFragment extends Fragment {
public void showExportDialog(){
AlertDialog.Builder builder1 = new AlertDialog.Builder(getActivity());
builder1.setMessage("Are you sure you want to take the backup of your data")
builder1.setMessage(R.string.Areyou_sure_take_backup)
.setCancelable(false)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@SuppressWarnings("resource")
public void onClick(DialogInterface dialog, int id) {
try {
@@ -192,7 +192,7 @@ public class ServiceActivityFragment extends Fragment {
}
}
})
.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.cancel();
}
@@ -1043,6 +1043,7 @@ public class UploadActivity extends AppCompatActivity {
}
}
return result.toString();
} catch (MalformedURLException e) {
e.printStackTrace();
@@ -1054,7 +1055,7 @@ public class UploadActivity extends AppCompatActivity {
e.printStackTrace();
}
return result.toString();
return "";
}
@Override
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

@@ -218,6 +218,7 @@
//text for uploading screen
<string name="coverage_data_uploading">Kapsam yükleniyor</string>
<string name="availability_data_uploading">Bulunurluk verisi paylaşılıyor</string>
<string name="stock_data_uploading">Stok verisi paylaşılıyor</string>
@@ -227,6 +228,14 @@
<string name="no_data_for_upload">Yükleme İçin Veri Yok</string>
<string name="title_activity_checkout">Çıkış yapmak</string>
<string name="Areyou_sure_take_backup">Verilerinizin yedeğini almak istediğinizden emin misiniz</string>
<string name="data_exported_successfully">Veritabanı Başarıyla Gönderildi</string>
<string name="first_geotag_the_store">İlk depoyu coğrafi etiketle göster</string>
<string name="fill_gaps_data">Lütfen GAP verilerini doldurun</string>
<string name="enter_the_values">Değerleri girin</string>
</resources>
@@ -260,4 +260,10 @@
<string name="additional_data_uploading">Additional Visibility Data Uploading</string>
<string name="promo_data_uploading">Promo Data Uploading</string>
<string name="Areyou_sure_take_backup"> Are you sure you want to take the backup of your data</string>
<string name="first_geotag_the_store">First geotag the store</string>
<string name="new_update_available">New Update Available \n\n Yeni güncelleme var</string>
</resources>