Advertisement
Guest User

Untitled

a guest
Jan 24th, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1.  
  2. /**
  3. * Created by freakycoder on 21/01/16.
  4. */
  5.  
  6.  
  7. public class BackgroundTask extends AsyncTask<MyTaskParams,Void,String> {
  8.  
  9. Context context;
  10. public BackgroundTask(Context context) {
  11. this.context = context;
  12. }
  13.  
  14. @Override
  15. protected void onPreExecute() {
  16. super.onPreExecute();
  17. }
  18.  
  19. @Override
  20. protected String doInBackground(MyTaskParams... params) {
  21.  
  22. String method = params[0].method;
  23. if(method.equals("Register")) {
  24. String username = params[0].username;
  25. String password = params[0].password;
  26. String email = params[0].email;
  27. String gender = params[0].gender;
  28. int age = params[0].age;
  29. String country = params[0].country;
  30. int daily_goal = params[0].daily_goal;
  31. Log.d("MyApp", "**** Information ***** \n" + username + "\n" + password + "\n" + email + "\n" + gender + "\n" + age + "\n" + country + "\n" + daily_goal);
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement