Advertisement
Guest User

a

a guest
Jul 6th, 2015
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1.     public BubbleService createNewWithIcon(int resourceId) throws InterruptedException {
  2.         Intent bubbleServiceIntent = new Intent(context, BubbleService.class);
  3.         bubbleServiceIntent.putExtra(BUBBLE_ICON_ID, resourceId);
  4.         context.startService(bubbleServiceIntent);
  5.         bindBubbleService(bubbleServiceIntent);
  6.         doneSignal.await();
  7.         return bubbleService;
  8.     }
  9.  
  10.     private void bindBubbleService(Intent bubbleServiceIntent) {
  11.         context.bindService(bubbleServiceIntent, bubbleConnection, Context.BIND_AUTO_CREATE);
  12.         doneSignal.countDown();
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement