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

  5. Delphifan Magazine
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.

Access Calendar Events And Reminders In Delphi XE6

Discussion in 'Delphi Android And IOS' started by AdminDF, Aug 2, 2014.

  1. AdminDF
    Online

    AdminDFAdminDF is a Verified Member Delphifan Staff Member DF Staff

    Example:

    Code:
    function TCalendarEventsManager.IsAppCalendarExist: integer;
    var
    wValues : TJavaObjectArray<JString>;
    wArgs : TJavaObjectArray<JString>;
    wCursor : JCursor;
    wFilter : JString;
    begin
    Result := -1;
    try
    wValues := TJavaObjectArray<JString>.Create(2); //Extracting only calendar name
    wValues[0] := StringToJString(‘_id’);
    wValues[1] := StringToJString(‘account_name’);
    wFilter := StringToJString(‘account_type = ? AND account_name = ?’); //filter
    wArgs := TJavaObjectArray<JString>.Create(2); // Arguments to filter calendars list
    wArgs[0] := StringToJString(‘LOCAL’);
    wArgs[1] := StringToJString(_App_Calendar_Name);
    wCursor := fContentResolver.query(StrToJURI(‘content://com.android.calendar/calendars’),wValues,wfilter,wArgs,nil);
    if wCursor.moveToFirst then
    Result := wCursor.getLong(0);
    except
    On E:Exception do
    Raise Exception.create(‘[TCalendarEventsManager.IfAppCalendarExist] : ‘+E.message);
    end;

    Download Source Code HERE
     

Share This Page