Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Subscribe to shared calendar

$
0
0

In my Android app (which is being ported from iOS app) I have a button that says "Would you like to Subscribe to the Calendar". In iOS the following code confirms with the user and adds the shared calendar to the device.

subscribeButton = UIButton.FromType (UIButtonType.Custom);
subscribeButton.SetTitle ("Subscribe To The Team Calendar?", UIControlState.Normal);
subscribeButton.UserInteractionEnabled = true;
_tapSubscribe = new UITapGestureRecognizer();
_tapSubscribe.AddTarget(() => UIApplication.SharedApplication.OpenUrl(new NSUrl("http://<path to my calendar server>/teamcal.ics")));
_tapSubscribe.NumberOfTapsRequired = 1;
_tapSubscribe.DelaysTouchesBegan = false;
subscribeButton.AddGestureRecognizer(_tapSubscribe);

It works great and calendar is subscribed to.

How do I do the same thing in Android? I can fire up an intent and open the web page but it just downloads the .ics file.

Thanks for any help or direction!!

Cheers


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>