The time interval for the refresh action (and other properties like minimum dimension) are described in xml file "my_widget_info.xml" which is stored in the resource folder of your project:
<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
android:minWidth="120dp"
android:minHeight="10dp"
android:updatePeriodMillis="300000"
android:initialLayout="@layout/my_widget"
android:resizeMode="horizontal|vertical"
android:widgetCategory="home_screen|keyguard"
android:previewImage="@drawable/calendar_edit_icon">
</appwidget-provider>
All needed information about your app widget package and the reference to the widget info from above is contained in the manifest file "AndroidManifest.xml":
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="eu.fahrnholz.gerald.gfacontrolwidget">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<receiver android:name="MyWidgetProvider">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<meta-data android:name="android.appwidget.provider"
android:resource="@xml/my_widget_info" />
</receiver>
</application>
</manifest>