How to Implement Calendar in CrossPlatForm

Hi ,

I Am new to the Mobile Cross Platform Development......

How to Access Default Calender(like Google Calculator for Android and default iOS Calender) for CrossPlatForm.

Am Using MasterList view user click on calender open the default calender based on Android or iOS.How to implement these feature in CrossPlatform.

Please Help us....Thanks in Advance.

Best Answers

Answers

  • SivaiOSSivaiOS INMember ✭✭

    Can you share any example r references

  • SivaiOSSivaiOS INMember ✭✭

    Hi @Alexander Sheety
    i have taken your code in C# class file i got the errors i am new to this programing language.

    i got the errors in this lines of code

    "// Inside this class 7 StackLayouts with clickable views/cells
    ******public StackLayoutGridClass CurrentGrid { get; set; } ** **** // StackLayout

        // This layout have buttons: previous and next and month label         
    

    ****public TopCalendarMenu CurrentMenu { get; set; } **** // AbsoluteLayout
    "
    can u share any example project its very helpfull to me.

    i have one question about "CrossPlatform" code i have write the code in C# it will comparable with iOS and Android calendar .

  • SivaiOSSivaiOS INMember ✭✭

    Hi @Alexander Sheety can u share any example project its very helpfull to me.

    i have taken your code in C# class file i got the errors i am new to this programing language.

    i got the errors in this lines of code

    "// Inside this class 7 StackLayouts with clickable views/cells
    ******public StackLayoutGridClass CurrentGrid { get; set; } ** **** // StackLayout

    // This layout have buttons: previous and next and month label         
    

    ****public TopCalendarMenu CurrentMenu { get; set; } **** // AbsoluteLayout
    "

    i have one question about "CrossPlatform" code i have write the code in C# it will comparable with iOS and Android calendar .

  • AlexanderSheetyAlexanderSheety RUMember ✭✭

    @SivaiOS

    can u share any example project its very helpfull to me.

    Sorry i can't share my project.

    i got the errors in this lines of code

    This is top part of code! Classes like StackLayoutGridClass and TopCalendarMenu you need implemented by yourself!

    i have one question about "CrossPlatform" code i have write the code in C# it will comparable with iOS and Android calendar .

    Yes! If you created Calendar by using Xamarin forms layouts and views.
    If you need get time, use DateTime class!
    Current time Example:
    DateTime today=DateTime.Now;

    If you want only access native ios and android calendar, use dependency service

  • SivaiOSSivaiOS INMember ✭✭

    Thank you so much @AlexanderSheety

    i have one more question "How to Access Default Calender(like Android Phone have Google Calculator and iOS Calendar for apple ) in CrossPlatForm" is it possible to implement in cross platform ?

    Thanks,
    Siva

  • SivaiOSSivaiOS INMember ✭✭

    @AlexanderSheety Thank you so much for your help :)

  • SivaiOSSivaiOS INMember ✭✭

    @AlexanderSheety

    i have verified below links its not useful to me

    https://developer.xamarin.com/guides/android/user_interface/calendar/
    You have access to android Calendar from your YourProject.Droid

    https://developer.xamarin.com/guides/ios/platform_features/introduction_to_event_kit/
    You have access to ios Calendar from your YourProject.iOS

    i am looking for the examples still.

    i dont no how to implement android calendar and iOS calendars in my project.

    we have alternate option 3rd party calendars am not intreasted to work on 3rd party calendars.

    please share any other info..........

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    @SivaiOS

    What do you mean by "not useful" to you? Those guides explain how the APIs work and have links to sample applications. What more are you looking for?

  • SivaiOSSivaiOS INMember ✭✭

    @David Hunt thanks for reply

    i have go through @AlexanderSheety shared links and
    iOS-----
    i am downloaded event kit source code its not opening the calendar its directly opening the reminder.
    Android--
    i am downloaded android code its not working.

    i need to implement default mobile calendars for both iOS and Android.

    How to open default calendars in my app is it possible...? @David Hunt

    i have searched in google i could not found any examples....Can u please share any related examples .

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    Both samples work with the built-in calendar, so I'm not sure what your issue is. As to the android code not working, I can't help there as I don't do Android.

  • SivaiOSSivaiOS INMember ✭✭

    @David Hunt

    i tried more then times i could not opened default calendar in iOS and Android.

  • SivaiOSSivaiOS INMember ✭✭

    We can access iOS default calendar use this line of code it will redirect the iPhone default calender

    " [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@calshow://] options:@{} completionHandler:nil];"

    Am using Form level i need to access default calendars in Xamarin

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    For a crossplatform project, there is no one way to access calendars on all platforms. You will have to use dependency injection and implement the calendar access separately on each platform.

  • SivaiOSSivaiOS INMember ✭✭

    @David Hunt

    Thanks you so much

Sign In or Register to comment.