Add SKU in success and failed notification

New release v1.7
main
saad.siddiq 2025-05-30 10:29:45 +05:00
parent 39860f782a
commit 08d62cbc01
3 changed files with 5 additions and 4 deletions

View File

@ -133,7 +133,7 @@ public class InspectionReportService {
if (response.isSuccessful()) {
System.out.println(response.body());
if (response.body().get("result").equalsIgnoreCase("success")) {
FileUtils.Current_SKU = response.body().get("Sku");
//FileUtils.Current_SKU = response.body().get("Sku");
callback.onSuccess();
} else {
callback.onFailure(new Exception("Error on submitting report"));

View File

@ -597,6 +597,7 @@ private int generateRandomNumber(int min, int max) {
for ( InspectionReport report : reports ) {
final int currentNotificationId = notificationId[0]++;
//Log.e("SKU: ",""+report.getItems().get(0).getSku());
service.saveReport(report, new SaveReportCallback() {
@Override
public void onSuccess() {
@ -616,7 +617,7 @@ private int generateRandomNumber(int min, int max) {
HomeActivity.this,
currentNotificationId,
"Upload Success",
"SKU: " + FileUtils.Current_SKU + " uploaded successfully.");
"SKU: " + report.getItems().get(0).getSku() + " uploaded successfully.");
//Log.e("Reports-size: ",""+reports.size());
if (uploadedCount[0] == size) {
@ -639,7 +640,7 @@ private int generateRandomNumber(int min, int max) {
HomeActivity.this,
currentNotificationId,
"Upload Failed",
"SKU: " + FileUtils.Current_SKU + " failed.\nReason: " + throwable.getMessage());
"SKU: " + report.getItems().get(0).getSku() + " failed.\nReason: " + throwable.getMessage());

View File

@ -492,7 +492,7 @@ public class ThirdStepFragment extends Fragment implements View.OnClickListener
handler.post(() -> {
calculateDimensions();
Log.e("Report-ToString: ", "" + store.getReport().toString());
//Log.e("Report-ToString: ", "" + store.getReport().toString());
SharedPreferences sharedPreferences = getContext().getSharedPreferences("login_prefs", Context.MODE_PRIVATE);
long draftReportId = Long.parseLong(sharedPreferences.getString("draftReportId", null));