aboutsummaryrefslogtreecommitdiff
path: root/HelloWorld.java
blob: 45d4eb882fbf972faba91b0700c20df7af8b7feb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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!");
    }
}