Data passing from a separate asynctask to a fragment
<p>I have a separate asynctask class which creates a url for me. I tried to use an interface in the onPostExecute to send the url to my fragment, but could not managed it. I was always doing the same process in the fragments by forcing to implement the interface in onAttach.</p>

<p>After myTask.execute(), i simply wait for the result with a progress dialog on the screen. Everything works fine until the interface's callback method is called.(nullpointerexception)</p>

<p>How can I force the fragment to make it implement the interface? (I need to send the data directly to the fragment, not via activity)</p>

<p>Thank you very much for your time.</p>
