Android Open Source - receiver-test-app-android Cast Fragment






From Project

Back to project page receiver-test-app-android.

License

The source code is released under:

Apache License

If you think the Android project receiver-test-app-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

package com.castframework.android;
//from w w  w  .  j av  a  2  s . c o m
import android.app.Activity;
import android.support.v4.app.Fragment;

public class CastFragment extends Fragment {

    CastmanagerHost host;
    @Override
    public void onAttach(Activity activity) {
        super.onAttach(activity);
        if(activity instanceof CastmanagerHost) {
            host = (CastmanagerHost) activity;
        } else throw new ClassCastException("Activity must implement CastmanagerHost!");
    }

    protected CastmanagerHost getCastManagerHost() {
        return host;
    }
}




Java Source Code List

.CastmanagerHost.java
com.castframework.android.CastFragment.java
com.castframework.android.CastmanagerHost.java
com.castframework.android.MainActivity.java
com.castframework.android.WelcomeFragment.java
com.castframework.android.framework.CastApplication.java
com.castframework.android.framework.CastManager.java
com.castframework.android.framework.OnCastConnectedListener.java
com.castframework.android.framework.OnMessageReceivedListener.java