'JAVA microsoft graph create event

I want to call microsoft graph API in my android app to create an event on appropriate date. so first I must check if this date time interval is empty or not. But when I try to get the response from getschedule post request my App stops with no error. I also tried with batch request but got the same problem.

I followed this tutotrial https://docs.microsoft.com/en-us/graph/tutorials/android?tutorial-step=1

if someone has any idea

        String firstStep = batchRequestContent.addBatchRequestStep((IHttpRequest) mClient.me().calendar()
                .getSchedule(CalendarGetScheduleParameterSet
                        .newBuilder()
                        .withSchedules(schedulesList)
                        .withEndTime(endTime)
                        .withStartTime(startTime)
                        .withAvailabilityViewInterval(availabilityViewInterval)
                        .build()).buildRequest().post()
        );



        final BatchResponseContent batchResponseContent = mClient.batch().buildRequest().post(batchRequestContent);
        final EventCollectionResponse events = batchResponseContent.getResponseById(firstStep).getDeserializedBody(EventCollectionResponse.class);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source