Anroid startActivity not working after class switch
Clash Royale CLAN TAG #URR8PPP Anroid startActivity not working after class switch I want to start an activity and give out a Toast message after I parsed a JSON response. public class Sign_Up extends AppCompatActivity { .... register(); public void register() { final String url = "someURL"; new Json().checkJsonFile(url,getApplicationContext()); } //Now in an non-activity public class Json { public void checkJsonFile(final String url, final Context context) { new Thread(new Runnable() { public void run() { String result; String line; try { URL obj = new URL(url); HttpURLConnection conn = (HttpURLConnection) obj.openConnection(); conn.setReadTimeout(5000); conn.addRequestProperty("Accept-Language", "en-US,en;q=0.8"); conn.addRequestProperty("User-Age...