I'm new in android and trying to make an application that allows me to enter texts and once the button "Submit" is clicked it will send to another acitivty named "Receiver", and once the activity Receiver is open, it will display the texts I entered in edittext,
My problem is how can I get the row ID of the last entry I entered so it will be automatically displayed or without using textfield to manually get the row ID.
HERE IS MY CODE.
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.project_main);
try {
String s = "1";
long l = Long.parseLong(s);
DatabasePM amem = new DatabasePM(this);
amem.open();
String returnedName = amem.getNotif(l);
amem.close();
Dialog d = new Dialog(this);
d.setTitle("Notification!");
TextView tv = new TextView(this);
tv.setText(""+returnedName);
d.setContentView(tv);
d.show();
}