Author Message
RasheedA
Joined: Jan 9, 2017
Messages: 5
Offline
Hi i need a little help, i have the below code outputted from the GOOGLE postman application.
i need to trigger this in an android app but i dont know how to initiate the below request through a button.
so when a button is pushed it will post and run the protocol below.
im using Android Studio

code from Postman on external trigger into breeze


OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW");
RequestBody body = RequestBody.create(mediaType, "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"family\"\r\n\r\nAppButtonEXPushed\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\nAppButtonEXPushedRest\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"version\"\r\n\r\n1\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"eventBody\"\r\n\r\n{\"TheCallednumber\":\"447920441676\"}\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--");
Request request = new Request.Builder()
.url("https://breeze2-111.collaboratory.avaya.com/services/EventingConnector/events")
.post(body)
.addHeader("content-type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW")
.addHeader("authorization", "Basic UmFqaWJvbGFAYXZheWEuY29tOkJyZWV6ZTEyMw==")
.addHeader("cache-control", "no-cache")
.addHeader("postman-token", "d7022116-c47e-f2dc-2b67-e04d604980eb")
.build();
JoelEzell
Joined: Nov 15, 2013
Messages: 780
Offline
Hi Rasheed, we unfortunately don't have any Android development expertise on the Avaya Breeze team. You may get lucky with somebody else replying to this, but you'll likely have to look to other resources for information on developing your Android application. Sorry.
Go to:   
Mobile view