Back to project page receiver-test-app-android.
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.
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; } }