From 162f0d4f619f76b7fafc28f683ca8ddfa9d44a46 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Thu, 13 Apr 2023 00:00:19 +0200 Subject: Simplify down a bit --- HelloWorld.java | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 HelloWorld.java (limited to 'HelloWorld.java') diff --git a/HelloWorld.java b/HelloWorld.java new file mode 100644 index 0000000..45d4eb8 --- /dev/null +++ b/HelloWorld.java @@ -0,0 +1,26 @@ +import helloworld.R; +import android.app.Activity; +import android.os.Bundle; +import android.widget.TextView; +import java.net.HttpURLConnection; +import java.net.URL; + +public class HelloWorld extends Activity { + @Override + protected void onCreate(Bundle savedInstanceState) { + + try { + URL url = new URL("https://slcl.privatedns.org"); + + HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection(); + } catch (Exception e) { + //TODO: handle exception + } + + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_main); + + TextView text = (TextView)findViewById(R.id.my_text); + text.setText("Hello, world!"); + } +} -- cgit v1.2.3