Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. public class Pododroid extends Activity {
  2. public void onCreate(Bundle savedInstanceState) {
  3. super.onCreate(savedInstanceState);
  4. setContentView(R.layout.main);
  5.  
  6. mConection //haces lo que quieres con esto
  7. }
  8.  
  9. ServiceConnection mConection = new ServiceConnection() {
  10. public void onServiceConnected(ComponentName className, IBinder service) {
  11. mServicio = ((PasoService.PasoBinder)service).getService();
  12. mServicio.registerCallback(mCallback);
  13. mServicio.actualizaPreferencias();
  14. }
  15.  
  16. public void onServiceDisconnected(ComponentName className) {
  17. mServicio = null;
  18. }
  19. };
  20.  
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement