Android Question Show the Google Calendar for a specific date

tdocs2

Well-Known Member
Licensed User
Longtime User
Greetings, all.

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

B4X:
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.

B4X:
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
 
Top