Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion app/src/main/java/com/simcoder/uber/DriverMapActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,8 @@ public void onClick(View v) {
case 2:
recordRide();
endRide();
// you have to reassigned this variable
status=0;
break;
}
}
Expand Down Expand Up @@ -185,6 +187,15 @@ public void onClick(View v) {
});
getAssignedCustomer();
}

// when the activity life cycle change
@Override
protected void onRestart() {
super.onRestart();
if (state == 0){
getAssignedCustomer();
}
}

private void getAssignedCustomer(){
String driverId = FirebaseAuth.getInstance().getCurrentUser().getUid();
Expand Down Expand Up @@ -541,4 +552,4 @@ private void erasePolylines(){
polylines.clear();
}

}
}