Get TextView text in Android home widgets (not in action)?

I am just starting to program with Android home widgets, so I can set text to text view in home widgets from my widget provider using settextviewtext (), but when I want to get text from it, I have no ideal. You cannot use findViewById () as usual, as in action, and then getText (). Is there a way to get the text of the text view in the home widget from the widget provider? Or show me how to move from another activity?

+2
source share
2 answers

CommonsWare in this question says:

You can not. Application widgets are for writing only: you can transfer data to them, but you cannot read them.

Instead, when you update the application widget with new text, you will need to save this text somewhere, possibly in a file.

+7
source

read this for the widget tutorial and what you can do with it.

0
source

Source: https://habr.com/ru/post/1401963/


All Articles