In my app I use the CN1 Calendar lib to access the device calendar. I added the Android-build-hints so that my app is allowed to access the calendar (I can proof this in the App-Settings). But the method deviceCalender.getCalendars() returns null - which is documented with "no permissions". What can I do to access the calendar on an Android device? (btw: It works fine on iOS).
Test-Device: HUAWEI P-Smart with Android 8.0.0.138
This is the code I used:
if (deviceCalender.hasPermissions())
{
Collection<String> cals = deviceCalender.getCalendars();
if( cals != null )
{
System.out.println("Length of Calendar-List: " + cals.size());
}
else
{
System.out.println("No permission on getCalendars()");
}
}
else
System.out.println("No permission on hasPermissions()");
In Android-Studio I only get this console-output:
2019-07-25 11:30:35.185 25342-25375/de.zeitkuenstlervoll.gtd.gui I/System.out: No permission on getCalendars()
See also this question on stackexchange
In my app I use the CN1 Calendar lib to access the device calendar. I added the Android-build-hints so that my app is allowed to access the calendar (I can proof this in the App-Settings). But the method deviceCalender.getCalendars() returns null - which is documented with "no permissions". What can I do to access the calendar on an Android device? (btw: It works fine on iOS).
Test-Device: HUAWEI P-Smart with Android 8.0.0.138
This is the code I used:
In Android-Studio I only get this console-output:
2019-07-25 11:30:35.185 25342-25375/de.zeitkuenstlervoll.gtd.gui I/System.out: No permission on getCalendars()See also this question on stackexchange