my current app takes customer details, sends them to a real time firebase database, a switch activity button takes the user to a customer information page where it displays all data in the database, i am wondering if its possible to update specific users without using authentication to log in as its the shop owner using this app not customers.
All videos i have found use the firebase authentication which allows for user details to be updated, but my app lists all database data as no specfic logged in user.
below is my class that recieves the database information and displays it on screen
public class CustomerDataRetrieved extends AppCompatActivity {
private ListView listView;
DatabaseReference databaseReference;
Firebase firebase;
List<CustomerName> customerNameList;
public static final String Database_Path = "Customer Details";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_customer_data_retrieved);
listView = (ListView) findViewById(R.id.list_view);
firebase = new Firebase(Firebase_Server_URL);
databaseReference = FirebaseDatabase.getInstance().getReference(Database_Path);
customerNameList = new ArrayList<>();
}
@Override
protected void onStart() {
super.onStart();
databaseReference.addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
for (DataSnapshot customerSnapshot : dataSnapshot.getChildren()) {
CustomerName customers = customerSnapshot.getValue(CustomerName.class);
customerNameList.add(customers);
}
CustomerInfoAdapter customerInfoAdapter = new CustomerInfoAdapter(CustomerDataRetrieved.this,customerNameList);
listView.setAdapter(customerInfoAdapter);
}
@Override
public void onCancelled(@NonNull DatabaseError databaseError) {
}
});
}
}
If this helps, this is an image of my Customer Information activity which uses a listview to display all the data from the database, and i am wondering if its possible to update specific information from each user if required through my app, for instance if the customers quoted price changes, or contact number has changed