Following statement is not executing on some devices.

```
AddEvent act1 = (AddEvent) getLocalActivityManager().getCurrentActivity();

```

Is there any alternate method for above statement. On some devices it works fine but on other devices it gives exception.

![Click here... Yellow text shows exception](https://i.stack.imgur.com/ZE4WU.jpg)

**Edit:** My application is developed in tab. OnActivity results is used for getting picture from camera activity. Dont know where the resides but when I puts the above statement in try catch then no force close occurs and exception is shown there.