1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Donation with Paypal!!!

    Go to your paypal account and send directly donation to [email protected]

    1 month - 10 $ - Standart VIP

    6 months - 20 $- Standart VIP

    1 year - 30 $- Standart VIP

    2 years - 50 $- Standart VIP

    Gold member for life - 150 $- Standart VIP

    High Vip (Standart VIP include) group please send PM or email to [email protected] for info

    After Donation please send email to [email protected]

  3. Donation Ways 2020


    Paysend
  4. Telegram
Dismiss Notice

Donation with Paypal!!!

Go to your paypal account and send directly donation to [email protected]

1 month - 10 $ - Standart VIP

6 months - 20 $- Standart VIP

1 year - 30 $- Standart VIP

2 years - 50 $- Standart VIP

Gold member for life - 150 $- Standart VIP

High Vip (Standart VIP include) group please send PM or email to [email protected] for info

After Donation please send email to [email protected]

Dismiss Notice
For open hidden message no need write thanks, thank etc. Enough is click to like button on right side of thread.

Firemonkey Android Access Calendar and Events

Discussion in 'Delphi Android And IOS' started by AdminDF, May 15, 2014.

  1. AdminDF
    Online

    AdminDFAdminDF is a Verified Member Delphifan Staff Member DF Staff

    To access the calendar you can use the Calendar class which is represented by the JCalendar class in Delphi.

    Code:
    uses
      Androidapi.JNI.GraphicsContentViewText,
      FMX.Helpers.Android,
      Androidapi.JNI.JavaTypes;
    
    
    procedure TForm1.Button1Click(Sender: TObject);
    var
      Intent: JIntent;
      Calendar: JCalendar;
    begin
      Calendar := TJCalendar.JavaClass.getInstance;
      Intent := TJIntent.Create;
      Intent.setType(StringToJString('vnd.android.cursor.item/event'));
      intent.putExtra(StringToJString('beginTime'), Calendar.getTimeInMillis());
      intent.putExtra(StringToJString('allDay'), true);
      intent.putExtra(StringToJString('rrule'), StringToJString('FREQ=YEARLY'));
      intent.putExtra(StringToJString('endTime'), Calendar.getTimeInMillis()+3600*1000);
      intent.putExtra(StringToJString('title'), StringToJString('Hello from Delphi'));
      SharedActivity.startActivity(Intent);
    end;
     

Share This Page