Sending data to my (homescreen) widget

前端 未结 1 1409
谎友^
谎友^ 2021-01-18 05:31

I am having some trouble sending data(strings) from my activity to my appWidgetProvide class.

I have a method called updateWidget. This gets called by the widget con

相关标签:
1条回答
  • 2021-01-18 06:06

    I suggest to try replacing i.putExtra("title", mTitleText.getText()); in updateWidget() with i.putExtra("title", mTitleText.getText().toString());

    String title1 = extras.getString("title");
    

    expects string, and mTitleText.getText() returns Editable - this is likely a mismatch

    0 讨论(0)
提交回复
热议问题