I am trying to add an event to a Google Calendar in Android Studio. I have been trying to follow the steps at https://developers.google.com/google-apps/calendar/v3/reference/events/insert#request-body and https://developers.google.com/google-apps/calendar/quickstart/java for the Java example.
However I get the following runtime error when I run the app on my phone:
java.io.IOException: Unable to create the directory[credentials/calendar-java-quickstart.json]
Any ideas on why this might happen? This is sample code on the Google API pages for Java. Is there a different way of doing in android?
/home/username/credentials/calendar-java-quistart.json? - MeetTitan<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />on my manifest. Is this permission you are referring to? - omarpSystem.property("user.home")doens't return anything on android! You should look for an android example using android apis instead of using the vanilla java ones, you're making your life harder than it has to be. - MeetTitan