Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public BubbleService createNewWithIcon(int resourceId) throws InterruptedException {
- Intent bubbleServiceIntent = new Intent(context, BubbleService.class);
- bubbleServiceIntent.putExtra(BUBBLE_ICON_ID, resourceId);
- context.startService(bubbleServiceIntent);
- bindBubbleService(bubbleServiceIntent);
- doneSignal.await();
- return bubbleService;
- }
- private void bindBubbleService(Intent bubbleServiceIntent) {
- context.bindService(bubbleServiceIntent, bubbleConnection, Context.BIND_AUTO_CREATE);
- doneSignal.countDown();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement