package org.telegram;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.EditText;

import org.telegram.messenger.R;
import org.telegram.tgnet.ConnectionsManager;

public class MainActivity extends AppCompatActivity {

    EditText editText;
    ConnectionsManager connectionsManager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        editText = findViewById(R.id.editText);
        connectionsManager = new ConnectionsManager();

        ConnectionsManager.setProxySettings("52.47.197.51", 1128, "b40bcc741a4ae965c3aa200fed2637ca");
        findViewById(R.id.button).setOnClickListener(view -> {
            connectionsManager.checkProxy("52.47.197.51", 1128, "b40bcc741a4ae965c3aa200fed2637ca"
                    , time -> Log.e("HerePing", String.valueOf(time)));
        });
    }


}
