Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- View.OnClickListener searchButtonClicked = new View.OnClickListener() {
- public void onClick(View v) {
- Log.d(TAG, "works");
- CheckConnection connection = new CheckConnection();
- boolean isOnline = connection.isConnected();
- //get text field value and pass it to the get method
- EditText textValue = (EditText)findViewById(R.id.editText2);
- String result = textValue.getText().toString();
- Log.d(TAG, "result: " + result);
- try {
- URL queryURL = new URL(createURL(result));
- Log.d(TAG,"right before if");
- if (isOnline){
- Log.d(TAG,"connected!!!!!");
- new fetchInstagramData().execute(queryURL);
- }else{
- Log.d(TAG,"connection null");
- }
- }catch (Exception e){
- Log.e(TAG,"Illegal State Exception: " + e.toString());
- }
- //Log.d(TAG,result);
- hideKeyboard();
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement