client/java/af01/app/src/main/java/com/sensiblesecurity/af01/SafetynetAttestUtil.java
private void sendDataToServer() {
        RequestQueue queue = Volley.newRequestQueue(getActivity());

        String url ="https://webbejava-000.appspot.com/demo";
/*
        // Request a string response from the provided URL.
        StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
                new Response.Listener<String>() {
                    @Override
                    public void onResponse(String response) {
                        // Display the response string.
                        mTextView.setText("Response is: "+ response);
                    }
                }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                mTextView.setText("That GET didn't work!");
            }
        });
*/

        StringRequest stringRequest = preparePostRequest();
        // Add the request to the RequestQueue.
        queue.add(stringRequest);

    }
/*
    Method to send data to server using an AsyncTask other than the main thread
     */
Method to send data to server using an AsyncTask other than the main thread
Method to send data to server using an AsyncTask other than the main thread
private void sendDataToServer() {
        RequestQueue queue = Volley.newRequestQueue(getActivity());
        String url ="https://webbejava-000.appspot.com/demo";
/*
        // Request a string response from the provided URL.
        StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
                new Response.Listener<String>() {
                    @Override
                    public void onResponse(String response) {
                        // Display the response string.
                        mTextView.setText("Response is: "+ response);
                    }
                }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                mTextView.setText("That GET didn't work!");
            }
        });
*/
        StringRequest stringRequest = preparePostRequest();
        queue.add(stringRequest);
    }
private void sendDataToServer ( ) { RequestQueue queue = Volley . newRequestQueue ( getActivity ( ) ) ; String url = "https://webbejava-000.appspot.com/demo" ; /*
        // Request a string response from the provided URL.
        StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
                new Response.Listener<String>() {
                    @Override
                    public void onResponse(String response) {
                        // Display the response string.
                        mTextView.setText("Response is: "+ response);
                    }
                }, new Response.ErrorListener() {
            @Override
            public void onErrorResponse(VolleyError error) {
                mTextView.setText("That GET didn't work!");
            }
        });
*/ StringRequest stringRequest = preparePostRequest ( ) ; queue . add ( stringRequest ) ; }
Method to send data to server using an AsyncTask other than the main thread
Method to send data to server using an AsyncTask other than the main thread
// Add the request to the RequestQueue.