features/SD-188-Create_Permission_module_and_request_audio #11
@ -5,7 +5,7 @@ import android.app.AlertDialog;
|
|||||||
|
|
||||||
import com.google.android.gms.tasks.Task;
|
import com.google.android.gms.tasks.Task;
|
||||||
import com.google.android.gms.tasks.TaskCompletionSource;
|
import com.google.android.gms.tasks.TaskCompletionSource;
|
||||||
import com.safemobile.dispatch.R;
|
import com.safemobile.safedispatch.R;
|
||||||
import com.safemobile.interfaces.IDialogService;
|
import com.safemobile.interfaces.IDialogService;
|
||||||
|
|
||||||
public class DialogService implements IDialogService {
|
public class DialogService implements IDialogService {
|
||||||
|
@ -60,7 +60,7 @@ public class HistoryActivity extends AppCompatActivity implements OnMapReadyCall
|
|||||||
setContentView(R.layout.tabhistory);
|
setContentView(R.layout.tabhistory);
|
||||||
|
|
||||||
parentTab = (TabLayoutActivity) getParent();
|
parentTab = (TabLayoutActivity) getParent();
|
||||||
parentTab.historyActivity = this;
|
parentTab.setHistoryActivity(this);
|
||||||
|
|
||||||
Locale locale = new Locale(AppParams.LANGUAGETMP);
|
Locale locale = new Locale(AppParams.LANGUAGETMP);
|
||||||
Locale.setDefault(locale);
|
Locale.setDefault(locale);
|
||||||
@ -85,17 +85,17 @@ public class HistoryActivity extends AppCompatActivity implements OnMapReadyCall
|
|||||||
displayButton.setOnClickListener(view -> {
|
displayButton.setOnClickListener(view -> {
|
||||||
googleMap.clear();
|
googleMap.clear();
|
||||||
if (!AppParams.DEMO) {
|
if (!AppParams.DEMO) {
|
||||||
parentTab.dropAllData =false;
|
parentTab.setDropAllData(false);
|
||||||
parentTab.firstHistData = true;
|
parentTab.setFirstHistoryData(true);
|
||||||
parentTab.HistMsgList.clear();
|
parentTab.clearHistoryMessageList();
|
||||||
parentTab.HistPosList.clear();
|
parentTab.clearHistoryPositionList();
|
||||||
|
|
||||||
// request history
|
// request history
|
||||||
parentTab.executeNetworkStuff(new String[] {OperationCodes.GetHistoryPositions + "", allVehicle.get(spinnerVehicle.getSelectedItemPosition()).sc_id + "",
|
parentTab.executeNetworkStuff(new String[] {OperationCodes.GetHistoryPositions + "", allVehicle.get(spinnerVehicle.getSelectedItemPosition()).sc_id + "",
|
||||||
(startDate.getTime()/ 1000L) + "", (endDate.getTime()/ 1000L) + ""});
|
(startDate.getTime()/ 1000L) + "", (endDate.getTime()/ 1000L) + ""});
|
||||||
} else {
|
} else {
|
||||||
parentTab.demoPositionsList();
|
parentTab.demoPositionsList();
|
||||||
displayHistory(parentTab.demoPositions);
|
displayHistory(parentTab.getDemoPositions());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -204,10 +204,10 @@ public class HistoryActivity extends AppCompatActivity implements OnMapReadyCall
|
|||||||
|
|
||||||
final Runnable UpdateMapResults = new Runnable() {
|
final Runnable UpdateMapResults = new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
Log.v("updateMap", parentTab.HistPosList.toString());
|
Log.v("updateMap", parentTab.getHistoryPositionList().toString());
|
||||||
SM.Debug("Do the Display");
|
SM.Debug("Do the Display");
|
||||||
infoBubble.setHistoryPositions(parentTab.HistPosList);
|
infoBubble.setHistoryPositions(parentTab.getHistoryPositionList());
|
||||||
displayHistory(parentTab.HistPosList);
|
displayHistory(parentTab.getHistoryPositionList());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.safemobile.dispatch;
|
package com.safemobile.safedispatch;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@ -20,6 +20,7 @@ import com.safemobile.activities.AbstractLiveActivity;
|
|||||||
import com.safemobile.activities.AbstractMessagesActivity;
|
import com.safemobile.activities.AbstractMessagesActivity;
|
||||||
import com.safemobile.activities.AbstractRadioActivity;
|
import com.safemobile.activities.AbstractRadioActivity;
|
||||||
import com.safemobile.activities.AbstractSDParentActivity;
|
import com.safemobile.activities.AbstractSDParentActivity;
|
||||||
|
import com.safemobile.safedispatch.R;
|
||||||
import com.safemobile.enums.AuthorizationCode;
|
import com.safemobile.enums.AuthorizationCode;
|
||||||
import com.safemobile.enums.AuthorizationStatus;
|
import com.safemobile.enums.AuthorizationStatus;
|
||||||
import com.safemobile.enums.ProviderSettingsStatus;
|
import com.safemobile.enums.ProviderSettingsStatus;
|
||||||
@ -260,6 +261,10 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
|
|||||||
this.historyPositionList = historyPositionList;
|
this.historyPositionList = historyPositionList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearHistoryPositionList() {
|
||||||
|
this.historyPositionList.clear();
|
||||||
|
}
|
||||||
|
|
||||||
public Boolean getFirstHistoryData() {
|
public Boolean getFirstHistoryData() {
|
||||||
return firstHistoryData;
|
return firstHistoryData;
|
||||||
}
|
}
|
||||||
@ -284,6 +289,10 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
|
|||||||
this.historyMessageList = historyMessageList;
|
this.historyMessageList = historyMessageList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearHistoryMessageList() {
|
||||||
|
this.historyMessageList.clear();
|
||||||
|
}
|
||||||
|
|
||||||
public ArrayList<SMS> getDemoSmsList() {
|
public ArrayList<SMS> getDemoSmsList() {
|
||||||
return demoSmsList;
|
return demoSmsList;
|
||||||
}
|
}
|
||||||
@ -465,7 +474,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
|
|||||||
// add radio tab
|
// add radio tab
|
||||||
intent[6] = new Intent(context, AbstractEmptyActivity.class);
|
intent[6] = new Intent(context, AbstractEmptyActivity.class);
|
||||||
tabSpecs[6] = tabHost.newTabSpec(ABOUT)
|
tabSpecs[6] = tabHost.newTabSpec(ABOUT)
|
||||||
.setIndicator(ABOUT, res.getDrawable(AppParams.DEMO ? R.drawable.icon_demo : R.drawable.ic_launcher))
|
.setIndicator(ABOUT, res.getDrawable(AppParams.DEMO ? R.drawable.icon_demo : R.mipmap.ic_launcher))
|
||||||
.setContent(intent[6]);
|
.setContent(intent[6]);
|
||||||
|
|
||||||
// add history tab
|
// add history tab
|
||||||
@ -744,7 +753,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
|
|||||||
dialog.setTitle(AppParams.DEMO ? getString(R.string.app_name_demo) : getString(R.string.app_name));
|
dialog.setTitle(AppParams.DEMO ? getString(R.string.app_name_demo) : getString(R.string.app_name));
|
||||||
dialog.setContentView(R.layout.dialog);
|
dialog.setContentView(R.layout.dialog);
|
||||||
ImageView image = dialog.findViewById(R.id.image);
|
ImageView image = dialog.findViewById(R.id.image);
|
||||||
image.setImageResource(AppParams.DEMO ? R.drawable.icon_demo : R.drawable.ic_launcher);
|
image.setImageResource(AppParams.DEMO ? R.drawable.icon_demo : R.mipmap.ic_launcher);
|
||||||
TextView text = dialog.findViewById(R.id.text);
|
TextView text = dialog.findViewById(R.id.text);
|
||||||
TextView text2 = dialog.findViewById(R.id.text2);
|
TextView text2 = dialog.findViewById(R.id.text2);
|
||||||
text.setText(String.format("%s1.0.8", getString(R.string.version)));
|
text.setText(String.format("%s1.0.8", getString(R.string.version)));
|
||||||
@ -935,7 +944,7 @@ public class TabLayoutActivity extends AbstractSDParentActivity {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void demoPositionsList() {
|
public void demoPositionsList() {
|
||||||
AssetManager assetManager = res.getAssets();
|
AssetManager assetManager = res.getAssets();
|
||||||
SM.Debug("TRY 2 OPEN demo_positions.txt");
|
SM.Debug("TRY 2 OPEN demo_positions.txt");
|
||||||
InputStream input = null;
|
InputStream input = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user