Android Open Source - popcorn-android Popcorn Time

From Project

Back to project page popcorn-android.


The source code is released under:

GNU General Public License

If you think the Android project popcorn-android 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

//from w  w  w  . ja  v  a 2  s  .c om
import org.apache.cordova.Config;
import org.apache.cordova.CordovaActivity;
import org.nodejs.core.NodeJSService;
import org.nodejs.core.NodeJSService.LocalBinder;

import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.util.Log;
import android.widget.Toast;

public class PopcornTime extends CordovaActivity
    boolean mBound;
    NodeJSService mServer;

    ServiceConnection mConnection = new ServiceConnection() {
        public void onServiceConnected(ComponentName name, IBinder service) {
            Toast.makeText(PopcornTime.this, "Service is connected", Toast.LENGTH_LONG).show();

            mBound = true;
            mServer = ((LocalBinder) service).getActivity();

       public void onServiceDisconnected(ComponentName name) {
            Toast.makeText(PopcornTime.this, "Service is disconnected", Toast.LENGTH_LONG).show();

            mBound = false;
            mServer = null;

    public void onCreate(Bundle savedInstanceState)

        startService(new Intent(this, NodeJSService.class));

        Log.d("PopcornTime", "App created!");

Java Source Code List