In below code i download json from internet and want to show in list. if list is empty go to another activity but other activity not start. no error but no start activity. thank
This gets tricky. Some things to watch out for:
Intent i = new Intent(getApplicationContext(), login.class);
Make sure that the login class's type is in the manifest. Usually you reference the class by the class's name, not the instantiated variable. Honestly, it shouldn't make a difference but it's worth trying.
Sometimes you get weird side-effects using different contexts. I think startActivity is one that's pretty sensitive to this. You can try AllNotes.this to get the running activity's context. There's a slim chance that this needs to be run on the UI thread, so you can try runOnUiThread() if that doesn't work.