Not a great deal of information (no logcat output for example) in the question so the following is, of necessity, a bit speculative. I find it helpful to lard my code with
Log.e(tag, message);
calls when things aren't behaving as expected. You can always strip them out later.
So do you check logcat to see whether or not the
onPostExecute
exception handler is being invoked; i.e do you see a stack trace? If you do and it is a null exception then it
may be variation on a problem posted a few days ago. See
Question: Run java code in android application[
^]
protected void onPostExecute(String file_url) {
try{
txtFname.setText("Firstname: " + firstname);
txtMname.setText("Middle Name: " + middlename);
txtLname.setText("Last Name " + lastname);
}
catch(Exception e) {
e.printStackTrace();
}
If you are getting a null exception then I'd try rearranging the code as below.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
@Override
protected void onStart() {
super.onStart();
user = (EditText)findViewById(R.id.user);
txtFname = (TextView) findViewById(R.id.fname);
txtMname = (TextView) findViewById(R.id.lname);
txtLname = (TextView) findViewById(R.id.mname);
get = (Button)findViewById(R.id.get);
get.setOnClickListener(this);
}