SteamyDave
Posts: 0
Joined: Wed Aug 05, 2015 9:40 am

how can i add an event

Thanks for the update - does that mean that you are no longer going to post items into the calendar on the phone, or did you just use the same technique as the toast plugin and adapt the use?
I would still love to post items into the calendar, or at least mark the app icon with the symbol to say that there are new messages for the user as I see described further down the article.
The app is intended to be used by our college students, to it would be great to remind them that there are exam, interview, event dates etc directly on their phone. If that could happen somehow in the background it would be great, as we probably can't rely on students opening the app or visiting a website to see new information without them being prompted to do so.
I will try again when I have a few hours spare.
Thanks again,
Dave

SteamyDave
Posts: 0
Joined: Wed Aug 05, 2015 9:40 am

how can i add an event

Something is working!

I have just got the local notification working as per the instructions.

YAY!

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

how can i add an event

Dave,
just follow it and instead of of TOAST use calendar plugin Screenshot below:
Image

Goodluck,
She

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

how can i add an event

and use the ff code as your guide:
var startDate = new Date("October 17, 2015 08:45:00");
var endDate = new Date("October 17, 2015 09:30:00");
var title = "xxxxxxxxxxx";
var location = "Manila Hotel";
var notes = "xxxxxxxxxx";
var success = function(message) { alert("Success: " + JSON.stringify(message)); };
var error = function(message) { alert("Error: " + message); };

//Android
CalendarPlugin.createEvent(title,location,notes,startDate,endDate,success,error);

Regards,
She

SteamyDave
Posts: 0
Joined: Wed Aug 05, 2015 9:40 am

how can i add an event

Hi She, thank you again for your time with this...
No calendar or toast!
Both give me the same error using F12 in chrome - Uncaught ReferenceError: ToastPlugin is not defined

.js files in place...

Image

Toast.js edited top and bottom
Image
Image

Clobbers added...
a href="https://d2r1vs3d9006ap.cloudfront.net/s3_images/1273103/clobbers.jpg?1441712838" rel="nofollow"Image

Features add in ...res-xml-config.xml
Image

Java files uploaded...
Image

Button on-click call for toast...
Image

Something is missing - it can't find the toast function. They both suffer the same problem, so I think I have missed something!

For the calendar, I basically replaced "Toast" with calendar, creating a call to "CalendarPlugin" rather than the "ToastPlugin"

Dave /a

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

how can i add an event

Hi Dave,
I didnt see any error about your screenshot. please check it again.

this is all my screenshot:
Image
Image
Image

and use this javascript in a button to run in "ANDROID"
var startDate = new Date("October 17, 2015 08:45:00");
var endDate = new Date("October 17, 2015 09:30:00");
var title = "xxxxxxxxxxx";
var location = "Manila Hotel";
var notes = "xxxxxxxxxx";
var success = function(message) { alert("Success: " + JSON.stringify(message)); };
var error = function(message) { alert("Error: " + message); };

//Android
CalendarPlugin.createEvent(title,location,notes,startDate,endDate,success,error);

Goodluck,
She

SteamyDave
Posts: 0
Joined: Wed Aug 05, 2015 9:40 am

how can i add an event

Hi She,
Thank you for your time. I can see from your other post that you are busy trying to hit your deadlines, so many thanks again for your help and support on this.

I created a new app - Toast, Calendar and Local Notifications all work as expected.

I think I might have damaged one of the source files on the original project, so now I can debug file by file to see if I can get the original project fixed.

Again, thank you for your precious time and help,

Dave

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

how can i add an event

Hi Sergiy,
the below code is not working in iOS:
code
var startDate = new Date("October 15, 2015 13:45:00");
var endDate = new Date("October 15, 2015 14:30:00");
var title = "Celeste B. Baldonado, MD&quot
var location = "Manila Hotel&quot
var notes = "Pelvic Emergencies, Ultrasound Finding – Obstetrics&quot
var success = function(message) { alert("Success: " + JSON.stringify(message)); };
var error = function(message) { alert("Error: " + message); };
var calendarName = "Jac 2015&quot
CalendarPlugin.createCalendar(calendarName,success,error);
CalendarPlugin.createEventInNamedCalendar(title,location,notes,startDate,endDate,calendarName,success,error);
/code
what do you think is the problem? no error shows in weinre

Thanks,
She

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

how can i add an event

I followed the instruction in how to install the plugins for iOS, and now, i put the code and there's no error and no calendar created. what should be the problem here? thank you

She
Posts: 0
Joined: Wed Oct 08, 2014 12:46 am

how can i add an event

I tried the this code to show some error in iOS:
function(message) { Appery("lblError").val("Error: " + message); };
but no error shows how can i debug this if there's no error .<

Return to “Issues”