1

I want to update record with specific position in RMS but by using setRecord method a new row has been inserted at the end so how to replace any record in RMS I am storing the value using pipe sign in this way.

AppData.java

    public static String lbl_private_key = "PRIVATEKEY|",
                    lbl_idnumber = "IDNUMBER|",
                    lbl_login_password = "PASSWORD|";

     int position = dataHelper.getProductPosition();
  dataHelper.getPosition_Response(new_response,position);

My Data Helper Class

public void getPosition_Response(String newresponse,int position) {
        try {
             ProductManager pm = new ProductManager(parent);

            byte[] data = res.getBytes();

                        System.out.println("records are been updated");

                        record.setRecord(position, data, 0, data.length);

            AppData.setProducts(pm.getProduct());

        } catch (Exception e) {
            e.printStackTrace();
            displayMessage(e.getMessage(), e.toString());

        }
    }
AndroidLearner
  • 4,500
  • 4
  • 31
  • 62
Nancy Jain
  • 204
  • 1
  • 7

0 Answers0