Question

Is it possible to create a widget and not have layout.What i mean is when created in the home screen and gets pressed, not to open and show you a layout, but to execute the code provided e.g if you have written a code about an alarm, when you press the widget directly from the home screen to make "on" the specific time alarm that you will have set,and not to transfer you to a layout and afterwards press a button.

Était-ce utile?

La solution

When you press on a widget, the system simply calls the PendingIntent you passed to the widget when setting it up.

It is up to you how you handle that intent.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top