We need this if else since apparently lines after startActivity calls() still take time to happen.
Merge pull request #114 from rogerhu/push_notify

We need this if else since apparently lines after startActivity calls() still take time to happen.