I'm working on my first ionic app. So, my code is likely at fault here. However, the app is working fine until it throws an Exception when saving a calendar event. I'm using the Eddy Verbruggen cordova Calendar plugin found here (https://github.com/EddyVerbruggen/Calendar-PhoneGap-Plugin) My Code: $ionicPlatform.ready(function() {
var calOptions = window.plugins.calendar.getCalendarOptions(); // grab the defaults
calOptions.firstReminderMinutes = 120; // default is 60, pass in null for no reminder (alarm)
calOptions.secondReminderMinutes = 5;
calOptions.calendarName = "MyCreatedCalendar"; // iOS only
calOptions.calendarId = 1; // Android only, use id obtained from listCalendars() call which is described below. This will be ignored on iOS in favor of calendarName and vice versa. Default: 1.
calOptions.url = "https://www.google.com";
window.plugins.calendar.createEventInteractively(title,location,notes,formattedDate,formattedDate,calOptions, success,error);
}); After this code executes, the Calendar Create Event form correctly appears (things look great)...clicking the SAVE button productes this Exception in logcat:
W/Binder (30021): java.lang.NullPointerException
W/Binder (30021): at android.view.textservice.SpellCheckerSession$SpellCheckerSessionListenerImpl.onGetSentenceSuggestions(SpellCheckerSession.java:430)
W/Binder (30021): at com.android.internal.textservice.ISpellCheckerSessionListener$Stub.onTransact(ISpellCheckerSessionListener.java:61)
W/Binder (30021): at android.os.Binder.execTransact(Binder.java:404)
W/Binder (30021): at dalvik.system.NativeStart.run(Native Method)
I'm testing on an old HTC Sensation running CyanogenMod (Sultan-pyramid), Android =4.4.2
Has anyone recieved the same problem, or is this due to my junky device? thnks. ed
For the benefit of others encountering this problem. I tested my app on Android devices (4.4.4 and 5.0) and the plugin works. So, it appears at this time to be my clunky HTC Sensation running an old Android version.