How to send notifications to all users using REST API in OneSignal (android)?

I have made an app in android which uses onesignal. Now I am building an another app which i will use as admin app for me. The problem here is that in the admin app I am performing a particular function on button click and at the same time I want to send notification to all the users who are using my app to inform them that some data has changed. But the problem is that I don’t know properly how to use it. So, I read the onesignal documentation and copied the sample java code under the onClickListener method of the button in my admin app and changed the REST API key and the app id. But nothing happened. I am really confused what to do right here. Please if anyone of you know the answer please help me. Here is my code –

Button submit = (Button) findViewById(R.id.submit);
submit.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            notify();
        }
    });



public void notify(){


try {
   String jsonResponse;

   URL url = new URL("https://onesignal.com/api/v1/notifications");
   HttpURLConnection con = (HttpURLConnection)url.openConnection();
   con.setUseCaches(false);
   con.setDoOutput(true);
   con.setDoInput(true);

   con.setRequestProperty("Content-Type", "application/json; charset=UTF-8");
   con.setRequestProperty("Authorization", "Basic NGEwMGZmMjItY2NkNy0xMWUzLTk5ZDUtMDAwYzI5NDBlNjJj");
   con.setRequestMethod("POST");

   String strJsonBody = "{"
                      +   ""app_id": "5eb5a37e-b458-11e3-ac11-000c2940e62c","
                      +   ""included_segments": ["All"],"
                      +   ""data": {"foo": "bar"},"
                      +   ""contents": {"en": "English Message"}"
                      + "}";


   System.out.println("strJsonBody:n" + strJsonBody);

   byte[] sendBytes = strJsonBody.getBytes("UTF-8");
   con.setFixedLengthStreamingMode(sendBytes.length);

   OutputStream outputStream = con.getOutputStream();
   outputStream.write(sendBytes);

   int httpResponse = con.getResponseCode();
   System.out.println("httpResponse: " + httpResponse);

   if (  httpResponse >= HttpURLConnection.HTTP_OK
      && httpResponse < HttpURLConnection.HTTP_BAD_REQUEST) {
      Scanner scanner = new Scanner(con.getInputStream(), "UTF-8");
      jsonResponse = scanner.useDelimiter("\A").hasNext() ? scanner.next() : "";
      scanner.close();
   }
   else {
      Scanner scanner = new Scanner(con.getErrorStream(), "UTF-8");
      jsonResponse = scanner.useDelimiter("\A").hasNext() ? scanner.next() : "";
      scanner.close();
   }
   System.out.println("jsonResponse:n" + jsonResponse);

} catch(Throwable t) {
   t.printStackTrace();
}

}