Guest User

Untitled

a guest
May 21st, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. try {
  2. listener = new XMLRPCCallback() {
  3. @Override
  4. public void onResponse(long id, Object result) {
  5. if(iConexion==id) {
  6. code = String.valueOf(result);
  7. Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
  8. if (vibrator != null) {
  9. vibrator.vibrate(100);
  10. }
  11. Intent WindowCode = new Intent(MainActivity.this, WindowCode.class);
  12. WindowCode.putExtra(Constantes.CODE, code);
  13. startActivity(WindowCode);
  14. }else{
  15. Log.e("ID","Se han producido varios errores");
  16. }
  17. }
  18.  
  19. iConexion = client.callAsync(listener, Constantes.SERVER_PHP, new Object[]{user, passw});
Add Comment
Please, Sign In to add comment