Android Question Show the Google Calendar for a specific date

Discussion in 'Android Questions' started by tdocs2, Apr 12, 2015.

  1. tdocs2

    tdocs2 Well-Known Member Licensed User

    Greetings, all.

    To show the Google Calendar for a specific date in a Webview:

    Code:
    Sub CalendarShow (SelectedDate As Long)
        
    'Load Google Calendar - with SelectedDate
        Dim CalStr1 As String
        
    DateTime.DateFormat="yyyyMMdd"
        CalStr1=
    "/render?date="&DateTime.Date(SelectedDate)
        
    Log("CalStr1 "&CalStr1)
        WebViewGCalendar.LoadUrl(
    "http://www.google.com/calendar"&CalStr1)
        
    DateTime.DateFormat=DateTime.DeviceDefaultDateFormat
    End Sub
    The same logic will apply to showing the Calendar in Chrome. Just add the CalStr1.

    Code:
    Try
    Private Browser As Intent
    Browser.Initialize(Browser.ACTION_VIEW, 
    "http://www.google.com/calendar")
    Browser.SetComponent(
    "com.android.chrome/com.google.android.apps.chrome.Main")
    StartActivity(Browser)
    Catch
          
    ToastMessageShow("Error starting Chrome.  Have you downloaded Chrome from Google Play?"True)
          
    Log(LastException)
    End Try
    The Chrome code (with minor exceptions) is posted elsewhere in the forum courtesy of NJDude.

    Sandy
     
    Peter Simpson and NJDude like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice