title: how to pass string from Fragments to service in android
body: <p>I want to pass string from fragments to service. i tried by setvalue and bind but it works with activity not with startservice right?
  and what is "ServiceConnection" and by using  ServiceConnection is it possible to pass string?
  here is my fragment code to start service.</p>
  
  <pre><code> **Solved **
  </code></pre>
  
  <p>I have change my code to this and it works perfect</p>
  
  <pre><code>Intent intent = new Intent(getActivity(), myPlayService.class);
              Bundle b = new Bundle(); 
              b.putString("link", "http://94.23.154/bbc");  
              intent.putExtras(b);
              getActivity().startService(intent);
  </code></pre>
  
  <p>and in service i used </p>
  
  <pre><code>public int onStartCommand(Intent intent, int flags, int startId) {
      // TODO Auto-generated method stub
      if(intent != null){
          Bundle bundle = intent.getExtras();
          link = bundle.getString("link");
             }
  </code></pre>