I have in mind the provider on @xml/widget_info
o receiver
on Manifest the layout of the widget and the class Provider is that I have doubt. What does it need to have?
I have in mind the provider on @xml/widget_info
o receiver
on Manifest the layout of the widget and the class Provider is that I have doubt. What does it need to have?
To create a widget on Android you need:
AndroidManifest.xml
I learned how to make widgets by following this tutorial from Vogel, and I used this same article as a basis for answer here for you.
And answering your questions about the widget_info and receiver, widget_info needs to define the layout the widget used, the width and height of the widget, and the length of time your widget received updates, ie how long your receiver will be called. using the vogel example, follow the widget_info example:
<?xml version="1.0" encoding="utf-8"?>
<appwidget-provider
xmlns:android="http://schemas.android.com/apk/res/android"
android:initialLayout="@layout/widget_layout"
android:minHeight="72dp"
android:minWidth="300dp"
android:updatePeriodMillis="300000" >
</appwidget-provider>
and about receiver
, your class that extends the AppWidgetProvider will have one method called onUpdate , this method will be called during the interval you defined in the widget_info and in it you can make updates to the widget, such as swapping an image or text, or any type of update you want to place in the widget. p>