Question: I am facing this problem intermittently, the DDMS in Android does not show the name of any application as shown in the image below

![enter image description here](https://i.stack.imgur.com/bfdJo.jpg)

This becomes such a major problem given the number of log messages it becomes impossible to see the relevant messages without setting the filter for a particular application.

**My Question**

What changes are required in the DDMS settings so that it always show the name of application in messages?

Answer: 
`Substring` does not take two indices. It takes one index and a length. Probably, you want

```
indd2 - indd1

```

as the second parameter (and check that expression for off-by-one errors).
With what you have this is what you are getting

```
3211+4557 = 7768

```

and that is greater than the length of the string.

This is how substring works

```
substring(startindex, length)

```

Length of string should not be less than startIndex + length