Buggy code:
@ TargetApi ( VERSION_CODES . HONEYCOMB ) @ SuppressLint ( "NewApi" ) public class MainFragment extends Fragment { private static final String TAG = MainFragment . class . getSimpleName ( ) ; private Button btStart ; private Button btStop ; private Button btCaptain ; private Button btPlayer ; private DashProxyServer server ; public static ConfigureData configureData ; private static final boolean SEVER_START_TAG = true ; private static final boolean SEVER_STOP_TAG = false ; private static final String SETTING_DIALOG_TAG = "setting" ; public static String rateTag = "" ; private Handler myHandler ; private boolean adhocSelect = false ; private List < String > list = new ArrayList < String > ( ) ; private ArrayAdapter < String > adapter ; private Spinner mySpinner ; private WiFiPulic wifiInstance ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ SuppressLint ( "NewApi" ) @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup parent , Bundle savedInstanceState ) { View v = inflater . inflate ( fragment_main , parent , false ) ; btStart = ( ( Button ) ( v . findViewById ( R . id . btStart ) ) ) ; btStop = ( ( Button ) ( v . findViewById ( R . id . btStop ) ) ) ; btPlayer = ( ( Button ) ( v . findViewById ( btChoose ) ) ) ; btCaptain = ( ( Button ) ( v . findViewById ( R . id . btCaptain ) ) ) ; mySpinner = ( ( Spinner ) ( v . findViewById ( Spinner_wifi_ ) ) ) ; adapter = new ArrayAdapter < String > ( getActivity ( ) , layout . simple_spinner_item , list ) ; adapter . setDropDownViewResource ( simple_spinner_dropdown_item ) ; mySpinner . setAdapter ( adapter ) ; mySpinner . setOnItemSelectedListener ( new OnItemSelectedListener ( ) { @ Override public void onItemSelected ( AdapterView < ? > arg0 , View arg1 , int arg2 , long arg3 ) { switch ( arg2 ) { case 0 : adhocSelect = false ; break ; case 1 : adhocSelect = true ; wifiInstance = WiFiFactory . getInstance ( getActivity ( ) , BROAD ) ; break ; case 2 : adhocSelect = false ; break ; case 3 : adhocSelect = false ; break ; case 4 : adhocSelect = false ; break ; } } @ Override public void onNothingSelected ( AdapterView < ? > arg0 ) { } } ) ; btCaptain . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( adhocSelect ) { try { <START_BUG> WiFiBroad . send ( "I<seq2seq4repair_space>am<seq2seq4repair_space>captain!" ) ; <END_BUG> } catch ( Exception e ) { e . printStackTrace ( ) ; } myHandler . post ( new Runnable ( ) { @ Override public void run ( ) { Toast . makeText ( getActivity ( ) , "I<seq2seq4repair_space>am<seq2seq4repair_space>captain!" , LENGTH_SHORT ) . show ( ) ; } } ) ; } } } ) ; btStart . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { server = new DashProxyServer ( ) ; try { server . start ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } sendNotification ( MainFragment . SEVER_START_TAG ) ; MainFragment . configureData . setServiceAlive ( true ) ; getActivity ( ) . getActionBar ( ) . setSubtitle ( "Service<seq2seq4repair_space>is<seq2seq4repair_space>running" ) ; } } ) ; btStop . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( ( server ) != null ) { server . stop ( ) ; } sendNotification ( MainFragment . SEVER_STOP_TAG ) ; getActivity ( ) . getActionBar ( ) . setSubtitle ( "Service<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>running" ) ; MainFragment . configureData . setServiceAlive ( false ) ; } } ) ; MainFragment . configureData . setUrl ( "http:////127.0.0.1:9999//4//s-1.mp4" ) ; btPlayer . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( null == ( MainFragment . configureData . getUrl ( ) ) ) { Toast . makeText ( getActivity ( ) , "Please<seq2seq4repair_space>set<seq2seq4repair_space>URL!" , LENGTH_SHORT ) . show ( ) ; } else if ( ! ( MainFragment . configureData . isServiceAlive ( ) ) ) { Toast . makeText ( getActivity ( ) , "Please<seq2seq4repair_space>start<seq2seq4repair_space>Service!" , LENGTH_SHORT ) . show ( ) ; } else if ( ! ( isLegel ( MainFragment . configureData . getUrl ( ) ) ) ) { Toast . makeText ( getActivity ( ) , "Please<seq2seq4repair_space>give<seq2seq4repair_space>correct<seq2seq4repair_space>URL!" , LENGTH_SHORT ) . show ( ) ; } else { Intent j = new Intent ( ) ; j . setDataAndType ( Uri . parse ( MainFragment . configureData . getUrl ( ) ) , "video//*" ) ; startActivity ( j ) ; } } } ) ; return v ; } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void sendNotification ( boolean status ) { } public boolean isNetworkAvailable ( ) { } public boolean isLegel ( String url ) { } }

Fix:
WiFiBroad . send ( "I<seq2seq4repair_space>am<seq2seq4repair_space>Captain!" ) ;