How to fix android.os.NetworkOnMainThreadException?

By using AsyncTask (recommended) import androidx.appcompat.app.AppCompatActivity; import android.os.AsyncTask; import android.os.Bundle; import android.widget.TextView; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.URL; public class MainActivity extends AppCompatActivity { TextView textLoad, textMessage; final String strMessage = “https://sites.google.com/site/androidersite/text.txt”; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); textLoad = findViewById(R.id.textLoad); textMessage = findViewById(R.id.textMessage); textLoad.setText(“Loading…”); new …

Read moreHow to fix android.os.NetworkOnMainThreadException?

Difference Between Social Media Marketing and Digital Marketing (With Table)

Social Media Marketing vs Digital Marketing The key difference between Social Media Marketing and Digital Marketing lies in the fact that social media marketing refers to the advertisement promoted on social sites while digital marketing promotes its brands, goods, company, etc. through the internet or without the internet. Social media …

Read moreDifference Between Social Media Marketing and Digital Marketing (With Table)