Question: I work for my license project, and one part consist in an android client. All was ok, until I upgraded my phone to Android 4.0.4.

So, I have one AsyncTask. It looks like this:

```
public class TestTask extends AsyncTask<Context, Integer, Long> {

@Override
protected Long doInBackground(Context... params) {
    for (int i = 0; i < 10; i++) {
        System.out.println("nothing-" + i);
        if (i == 5) {
            TestTask2 testTask2 = new TestTask2();
            testTask2.execute(null);
        }
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
    return null;
}

```

}

This task wait 5 seconds, than it calls another async task, TestTask2.

```
public class TestTask2 extends AsyncTask<Context, Integer, Long> {

@Override
protected Long doInBackground(Context... params) {
    System.out.println("task 2 in action");
    return null;
}

```

}

In android 4.0.3 or lower, the output is:

> 
> nothing-0 nothing-1 nothing-2 nothing-3 nothing-4 nothing-5
> 
> 
> task 2 in action
> 
> 
> nothing-6 nothing-7 nothing-8 nothing-9
> 
> 
> 

When I upgraded to 4.0.4, the second task doesn't start until the first finished its job.

> 
> nothing-0 nothing-1 nothing-2 nothing-3 nothing-4 nothing-5 nothing-6 nothing-7 nothing-8 nothing-9  
> 
>  task 2 in action
> 
> 
> 

Is there any thread policy in android 4.0.4, or something else? what could be the problem?

Answer: 
There are a number of ways to accomplish what you want to do here. I will explain how you can do it with `$_GET`.

You can control this with a `$_GET` variable (at the end of the URL, just add `?varName=value` where `varName` is the name of a variable (this is arbitrary), and `value` is the value you want to assign it.

Then in your PHP code you can access this variable by **a)** checking if it exists and **b)** performing logic based on its value:

```
<?php
    $divToShow = isset($_GET['div']) ? $_GET['div'] : "";

    //logic here
?>

```

So for example, if you want `<div id="div_2">` to be displayed, you could plug this in to jQuery by writing:

```
<script language="javascript" type="text/javascript">
    $("div#div_<?= $divToShow ?>").show();
    $("div:not(#div_<?= $divToShow ?>)").hide();
</script>

```

OR you could simply force PHP to only print out div # 2:

```
<?php
// set $divId to a value

if ($divId == $divToShow) : ?>
    <div id="<?= $divId ?>">
        <!-- content here -->
    </div>
<?php endif; ?>

```
You could do this using Javascript/jQuery only by checking for the hash part of the URL on page load: 

`http://mydomain.com/some/path#showcontainer1` 

HTML

```
<div class="container_one" style="display:none;">Content</div>
<div class="container_two" style="display:none;">Other Content</div>

```

JS

```
$(function(){

  switch( window.location.hash ){
    case '#showcontainer1':  //if hash is #showcontainer1
      $('.container_one').fadeIn();   //fadein the container with some class 
      break;
    default:
      $('.container_two').fadeIn()   //else fade container with other class
      break;
  }

});

```