Android Open Source - BerryTube Berry Tube Binder

From Project

Back to project page BerryTube.


The source code is released under:

GNU General Public License

If you think the Android project BerryTube listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

 * BerryTube Service//w w  w.  j a v a 2  s  . co  m
 * Copyright (C) 2012 Daniel Triendl <>
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <>.
package com.trellmor.berrytube;

import java.lang.ref.WeakReference;

import android.os.Binder;

 * BerryTubeBinder is the <code>IBinder</code> implementations for applications to
 * communicate with the <code>BerryTube</code> service class.
 * @author Daniel Triendl
 * @see android.os.Binder
 * @see android.os.IBinder
 * @see
public class BerryTubeBinder extends Binder {
  private final WeakReference<BerryTube> service;

   * Constructs a Binder instance for the <code>BerryTube</code> service
   * @param service
   *            <code>BerryTube</code> service instance
   * @see BerryTube
  public BerryTubeBinder(BerryTube service) {
    this.service = new WeakReference<>(service);

   * Get the <code>BerryTube</code> service instance
   * @return Service instance
  public BerryTube getService() {
    return service.get();

Java Source Code List